CVS commit: src/sys/rump/kern/lib/libsys_sunos
Module Name:src Committed By: christos Date: Sun Mar 8 15:21:20 UTC 2015 Modified Files: src/sys/rump/kern/lib/libsys_sunos: Makefile rump_sunos_syscall.h rump_sunos_syscallargs.h rump_sunos_syscalls.c rump_sunos_sysent.c Log Message: regen To generate a diff of this commit: cvs rdiff -u -r1.3 -r1.4 src/sys/rump/kern/lib/libsys_sunos/Makefile cvs rdiff -u -r1.2 -r1.3 \ src/sys/rump/kern/lib/libsys_sunos/rump_sunos_syscall.h \ src/sys/rump/kern/lib/libsys_sunos/rump_sunos_syscallargs.h \ src/sys/rump/kern/lib/libsys_sunos/rump_sunos_syscalls.c \ src/sys/rump/kern/lib/libsys_sunos/rump_sunos_sysent.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/rump/kern/lib/libsys_sunos/Makefile diff -u src/sys/rump/kern/lib/libsys_sunos/Makefile:1.3 src/sys/rump/kern/lib/libsys_sunos/Makefile:1.4 --- src/sys/rump/kern/lib/libsys_sunos/Makefile:1.3 Sun Mar 16 10:14:40 2014 +++ src/sys/rump/kern/lib/libsys_sunos/Makefile Sun Mar 8 11:21:20 2015 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.3 2014/03/16 14:14:40 pooka Exp $ +# $NetBSD: Makefile,v 1.4 2015/03/08 15:21:20 christos Exp $ # LIB= rumpkern_sys_sunos @@ -11,3 +11,6 @@ CPPFLAGS+= -I${.CURDIR} -I${RUMPTOP}/lib .include .include + +SYS_P=rump_sunos_sys +.include "../Makefile.sys" Index: src/sys/rump/kern/lib/libsys_sunos/rump_sunos_syscall.h diff -u src/sys/rump/kern/lib/libsys_sunos/rump_sunos_syscall.h:1.2 src/sys/rump/kern/lib/libsys_sunos/rump_sunos_syscall.h:1.3 --- src/sys/rump/kern/lib/libsys_sunos/rump_sunos_syscall.h:1.2 Wed May 15 17:41:25 2013 +++ src/sys/rump/kern/lib/libsys_sunos/rump_sunos_syscall.h Sun Mar 8 11:21:20 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: rump_sunos_syscall.h,v 1.2 2013/05/15 21:41:25 pooka Exp $ */ +/* $NetBSD: rump_sunos_syscall.h,v 1.3 2015/03/08 15:21:20 christos Exp $ */ /* * System call numbers. Index: src/sys/rump/kern/lib/libsys_sunos/rump_sunos_syscallargs.h diff -u src/sys/rump/kern/lib/libsys_sunos/rump_sunos_syscallargs.h:1.2 src/sys/rump/kern/lib/libsys_sunos/rump_sunos_syscallargs.h:1.3 --- src/sys/rump/kern/lib/libsys_sunos/rump_sunos_syscallargs.h:1.2 Wed May 15 17:41:25 2013 +++ src/sys/rump/kern/lib/libsys_sunos/rump_sunos_syscallargs.h Sun Mar 8 11:21:20 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: rump_sunos_syscallargs.h,v 1.2 2013/05/15 21:41:25 pooka Exp $ */ +/* $NetBSD: rump_sunos_syscallargs.h,v 1.3 2015/03/08 15:21:20 christos Exp $ */ /* * System call argument lists. Index: src/sys/rump/kern/lib/libsys_sunos/rump_sunos_syscalls.c diff -u src/sys/rump/kern/lib/libsys_sunos/rump_sunos_syscalls.c:1.2 src/sys/rump/kern/lib/libsys_sunos/rump_sunos_syscalls.c:1.3 --- src/sys/rump/kern/lib/libsys_sunos/rump_sunos_syscalls.c:1.2 Wed May 15 17:41:25 2013 +++ src/sys/rump/kern/lib/libsys_sunos/rump_sunos_syscalls.c Sun Mar 8 11:21:20 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: rump_sunos_syscalls.c,v 1.2 2013/05/15 21:41:25 pooka Exp $ */ +/* $NetBSD: rump_sunos_syscalls.c,v 1.3 2015/03/08 15:21:20 christos Exp $ */ /* * System call names. @@ -8,7 +8,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: rump_sunos_syscalls.c,v 1.2 2013/05/15 21:41:25 pooka Exp $"); +__KERNEL_RCSID(0, "$NetBSD: rump_sunos_syscalls.c,v 1.3 2015/03/08 15:21:20 christos Exp $"); #if defined(_KERNEL_OPT) #include Index: src/sys/rump/kern/lib/libsys_sunos/rump_sunos_sysent.c diff -u src/sys/rump/kern/lib/libsys_sunos/rump_sunos_sysent.c:1.2 src/sys/rump/kern/lib/libsys_sunos/rump_sunos_sysent.c:1.3 --- src/sys/rump/kern/lib/libsys_sunos/rump_sunos_sysent.c:1.2 Wed May 15 17:41:25 2013 +++ src/sys/rump/kern/lib/libsys_sunos/rump_sunos_sysent.c Sun Mar 8 11:21:20 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: rump_sunos_sysent.c,v 1.2 2013/05/15 21:41:25 pooka Exp $ */ +/* $NetBSD: rump_sunos_sysent.c,v 1.3 2015/03/08 15:21:20 christos Exp $ */ /* * System call switch table. @@ -8,7 +8,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: rump_sunos_sysent.c,v 1.2 2013/05/15 21:41:25 pooka Exp $"); +__KERNEL_RCSID(0, "$NetBSD: rump_sunos_sysent.c,v 1.3 2015/03/08 15:21:20 christos Exp $"); #include #include @@ -22,1031 +22,1640 @@ __KERNEL_RCSID(0, "$NetBSD: rump_sunos_s #define s(type) sizeof(type) #define n(type) (sizeof(type)/sizeof (register_t)) -#define ns(type) n(type), s(type) +#define ns(type) .sy_narg = n(type), .sy_argsize = s(type) struct sysent rump_sunos_sysent[] = { - { 0, 0, 0, - (sy_call_t *)sys_nosys }, /* 0 = nosys */ - { 0, 0, 0, - sys_nosys }, /* 1 = unimplemented exit */ - { 0, 0, 0, - sys_nosys }, /* 2 = unimplemented fork */ - { ns(struct sys_read_args), SYCALL_ARG_PTR, - (sy_call_t *)sys_read }, /* 3 = read */ - { ns(struct sys_write_args), SYCALL_ARG_PTR, - (sy_call_t *)sys_write }, /* 4 = write */ - { ns(struct rump_sunos_sys_open_args), SYCALL_ARG_PTR, - (sy_call_t *)rump_sunos_sys_open }, /* 5 = open */ - { ns(struct sys_close
CVS commit: src/sys/rump/kern/lib/libsys_sunos
Module Name:src Committed By: pooka Date: Sun Mar 16 14:14:40 UTC 2014 Modified Files: src/sys/rump/kern/lib/libsys_sunos: Makefile Log Message: fix tyop To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 src/sys/rump/kern/lib/libsys_sunos/Makefile Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/rump/kern/lib/libsys_sunos/Makefile diff -u src/sys/rump/kern/lib/libsys_sunos/Makefile:1.2 src/sys/rump/kern/lib/libsys_sunos/Makefile:1.3 --- src/sys/rump/kern/lib/libsys_sunos/Makefile:1.2 Thu Mar 13 02:04:14 2014 +++ src/sys/rump/kern/lib/libsys_sunos/Makefile Sun Mar 16 14:14:40 2014 @@ -1,10 +1,10 @@ -# $NetBSD: Makefile,v 1.2 2014/03/13 02:04:14 pooka Exp $ +# $NetBSD: Makefile,v 1.3 2014/03/16 14:14:40 pooka Exp $ # LIB= rumpkern_sys_sunos SRCS= rump_sunos_compat.c rump_sunos_sysent.c -SRCS+ sys_sunos_component.c +SRCS+= sys_sunos_component.c # XXX CPPFLAGS+= -I${.CURDIR} -I${RUMPTOP}/librump/rumpkern
CVS commit: src/sys/rump/kern/lib/libsys_sunos
Module Name:src Committed By: pooka Date: Thu Mar 13 02:04:14 UTC 2014 Modified Files: src/sys/rump/kern/lib/libsys_sunos: Makefile Added Files: src/sys/rump/kern/lib/libsys_sunos: sys_sunos_component.c Removed Files: src/sys/rump/kern/lib/libsys_sunos: component.c Log Message: rename component.c -> sys_sunos_component.c To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 src/sys/rump/kern/lib/libsys_sunos/Makefile cvs rdiff -u -r1.1 -r0 src/sys/rump/kern/lib/libsys_sunos/component.c cvs rdiff -u -r0 -r1.1 \ src/sys/rump/kern/lib/libsys_sunos/sys_sunos_component.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/rump/kern/lib/libsys_sunos/Makefile diff -u src/sys/rump/kern/lib/libsys_sunos/Makefile:1.1 src/sys/rump/kern/lib/libsys_sunos/Makefile:1.2 --- src/sys/rump/kern/lib/libsys_sunos/Makefile:1.1 Tue Apr 9 13:08:33 2013 +++ src/sys/rump/kern/lib/libsys_sunos/Makefile Thu Mar 13 02:04:14 2014 @@ -1,9 +1,10 @@ -# $NetBSD: Makefile,v 1.1 2013/04/09 13:08:33 pooka Exp $ +# $NetBSD: Makefile,v 1.2 2014/03/13 02:04:14 pooka Exp $ # LIB= rumpkern_sys_sunos -SRCS= rump_sunos_compat.c rump_sunos_sysent.c component.c +SRCS= rump_sunos_compat.c rump_sunos_sysent.c +SRCS+ sys_sunos_component.c # XXX CPPFLAGS+= -I${.CURDIR} -I${RUMPTOP}/librump/rumpkern Added files: Index: src/sys/rump/kern/lib/libsys_sunos/sys_sunos_component.c diff -u /dev/null src/sys/rump/kern/lib/libsys_sunos/sys_sunos_component.c:1.1 --- /dev/null Thu Mar 13 02:04:14 2014 +++ src/sys/rump/kern/lib/libsys_sunos/sys_sunos_component.c Thu Mar 13 02:04:14 2014 @@ -0,0 +1,31 @@ +/* $NetBSD: sys_sunos_component.c,v 1.1 2014/03/13 02:04:14 pooka Exp $ */ + +#include +#include + +#include + +#include "rump_private.h" + +#include "rump_sunos_syscall.h" + +extern struct sysent rump_sunos_sysent[]; + +struct emul emul_rump_sys_sunos = { + .e_name = "sunos-rump", + .e_sysent = rump_sunos_sysent, +#ifndef __HAVE_MINIMAL_EMUL + .e_nsysent = RUMP_SUNOS_SYS_NSYSENT, +#endif + .e_vm_default_addr = uvm_default_mapaddr, +#ifdef __HAVE_SYSCALL_INTERN + .e_syscall_intern = syscall_intern, +#endif +}; + +RUMP_COMPONENT(RUMP_COMPONENT_KERN) +{ + extern struct emul *emul_default; + + emul_default = &emul_rump_sys_sunos; +}
CVS commit: src/sys/rump/kern/lib/libsys_sunos
Module Name:src Committed By: pooka Date: Tue Apr 9 13:08:33 UTC 2013 Added Files: src/sys/rump/kern/lib/libsys_sunos: Makefile component.c rump_sunos_compat.c shlib_version syscalls.conf syscalls.master Log Message: Add enough syscall compat for fs-utils to work on modern Solaris and derivatives. To generate a diff of this commit: cvs rdiff -u -r0 -r1.1 src/sys/rump/kern/lib/libsys_sunos/Makefile \ src/sys/rump/kern/lib/libsys_sunos/component.c \ src/sys/rump/kern/lib/libsys_sunos/rump_sunos_compat.c \ src/sys/rump/kern/lib/libsys_sunos/shlib_version \ src/sys/rump/kern/lib/libsys_sunos/syscalls.conf \ src/sys/rump/kern/lib/libsys_sunos/syscalls.master Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Added files: Index: src/sys/rump/kern/lib/libsys_sunos/Makefile diff -u /dev/null src/sys/rump/kern/lib/libsys_sunos/Makefile:1.1 --- /dev/null Tue Apr 9 13:08:33 2013 +++ src/sys/rump/kern/lib/libsys_sunos/Makefile Tue Apr 9 13:08:33 2013 @@ -0,0 +1,12 @@ +# $NetBSD: Makefile,v 1.1 2013/04/09 13:08:33 pooka Exp $ +# + +LIB= rumpkern_sys_sunos + +SRCS= rump_sunos_compat.c rump_sunos_sysent.c component.c + +# XXX +CPPFLAGS+= -I${.CURDIR} -I${RUMPTOP}/librump/rumpkern + +.include +.include Index: src/sys/rump/kern/lib/libsys_sunos/component.c diff -u /dev/null src/sys/rump/kern/lib/libsys_sunos/component.c:1.1 --- /dev/null Tue Apr 9 13:08:33 2013 +++ src/sys/rump/kern/lib/libsys_sunos/component.c Tue Apr 9 13:08:33 2013 @@ -0,0 +1,31 @@ +/* $NetBSD: component.c,v 1.1 2013/04/09 13:08:33 pooka Exp $ */ + +#include +#include + +#include + +#include "rump_private.h" + +#include "rump_sunos_syscall.h" + +extern struct sysent rump_sunos_sysent[]; + +struct emul emul_rump_sys_sunos = { + .e_name = "sunos-rump", + .e_sysent = rump_sunos_sysent, +#ifndef __HAVE_MINIMAL_EMUL + .e_nsysent = RUMP_SUNOS_SYS_NSYSENT, +#endif + .e_vm_default_addr = uvm_default_mapaddr, +#ifdef __HAVE_SYSCALL_INTERN + .e_syscall_intern = syscall_intern, +#endif +}; + +RUMP_COMPONENT(RUMP_COMPONENT_KERN) +{ + extern struct emul *emul_default; + + emul_default = &emul_rump_sys_sunos; +} Index: src/sys/rump/kern/lib/libsys_sunos/rump_sunos_compat.c diff -u /dev/null src/sys/rump/kern/lib/libsys_sunos/rump_sunos_compat.c:1.1 --- /dev/null Tue Apr 9 13:08:33 2013 +++ src/sys/rump/kern/lib/libsys_sunos/rump_sunos_compat.c Tue Apr 9 13:08:33 2013 @@ -0,0 +1,377 @@ +/* $NetBSD: rump_sunos_compat.c,v 1.1 2013/04/09 13:08:33 pooka Exp $ */ + +/* + * Copyright (c) 2013 Antti Kantee. All Rights Reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + *notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + *notice, this list of conditions and the following disclaimer in the + *documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS + * OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include + +#include "rump_sunos_syscallargs.h" + +#define SUNOS_MAXNAMLEN 255 + +struct sunos_dirent { + uint64_t d_fileno; + int64_t d_off; + unsigned short d_reclen; + char d_name[SUNOS_MAXNAMLEN + 1]; +}; + +#define SUNOS_NAMEOFF(dp) ((char *)&(dp)->d_name - (char *)dp) +#define SUNOS_RECLEN(de,namlen) ALIGN((SUNOS_NAMEOFF(de) + (namlen) + 1)) + +/* + * Rump kernels always use the _FILE_OFFSET_BITS=64 API. + */ +#ifdef __LP64__ +struct sunos_stat { +unsigned long st_dev; +uint64_t st_ino; +unsigned int st_mode; +unsigned int st_nlink; +unsigned int st_uid; +unsigned int st_gid; +unsigned long st_rdev; +off_t st_size; + +struct timespec st_atim; +struct timespec st_mtim; +struct timespec st_ctim; +int st_blksize; +uint64_t st_blocks; +char st_fstype[16]; +}; +#else +struct sunos_stat { +unsigned lo