CVS commit: src/sys/compat/linux32/common
Module Name:src Committed By: njoly Date: Fri Nov 20 11:54:08 UTC 2009 Modified Files: src/sys/compat/linux32/common: linux32_ipc.h Log Message: Make linux32_msqid_ds l_msg_[src]time members use the right type, linux32_time_t. To generate a diff of this commit: cvs rdiff -u -r1.3 -r1.4 src/sys/compat/linux32/common/linux32_ipc.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/compat/linux32/common/linux32_ipc.h diff -u src/sys/compat/linux32/common/linux32_ipc.h:1.3 src/sys/compat/linux32/common/linux32_ipc.h:1.4 --- src/sys/compat/linux32/common/linux32_ipc.h:1.3 Mon Nov 16 13:32:40 2009 +++ src/sys/compat/linux32/common/linux32_ipc.h Fri Nov 20 11:54:08 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: linux32_ipc.h,v 1.3 2009/11/16 13:32:40 joerg Exp $ */ +/* $NetBSD: linux32_ipc.h,v 1.4 2009/11/20 11:54:08 njoly Exp $ */ /* * Copyright (c) 2008 Nicolas Joly @@ -59,9 +59,9 @@ struct linux32_ipc_perm l_msg_perm; netbsd32_pointer_t l_msg_first; netbsd32_pointer_t l_msg_last; - linux_time_t l_msg_stime; - linux_time_t l_msg_rtime; - linux_time_t l_msg_ctime; + linux32_time_t l_msg_stime; + linux32_time_t l_msg_rtime; + linux32_time_t l_msg_ctime; netbsd32_pointer_t l_wwait; /* Linux internal */ netbsd32_pointer_t l_rwait; /* Linux internal */ ushort l_msg_cbytes;
CVS commit: src/sys/compat
Module Name:src Committed By: njoly Date: Wed Nov 18 15:19:24 UTC 2009 Modified Files: src/sys/compat/linux/common: linux_msg.h src/sys/compat/linux32/common: linux32_ipccall.c Log Message: Make compat linux/linux32 msgrcv_msgarg type member of type long/netbsd32_long to match linux definition. To generate a diff of this commit: cvs rdiff -u -r1.12 -r1.13 src/sys/compat/linux/common/linux_msg.h cvs rdiff -u -r1.8 -r1.9 src/sys/compat/linux32/common/linux32_ipccall.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/compat/linux/common/linux_msg.h diff -u src/sys/compat/linux/common/linux_msg.h:1.12 src/sys/compat/linux/common/linux_msg.h:1.13 --- src/sys/compat/linux/common/linux_msg.h:1.12 Tue Dec 9 11:09:11 2008 +++ src/sys/compat/linux/common/linux_msg.h Wed Nov 18 15:19:24 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: linux_msg.h,v 1.12 2008/12/09 11:09:11 njoly Exp $ */ +/* $NetBSD: linux_msg.h,v 1.13 2009/11/18 15:19:24 njoly Exp $ */ /*- * Copyright (c) 1995, 1998 The NetBSD Foundation, Inc. @@ -95,7 +95,7 @@ */ struct linux_msgrcv_msgarg { struct linux_mymsg *msg; - int type; + long type; }; /* * For msgctl calls. Index: src/sys/compat/linux32/common/linux32_ipccall.c diff -u src/sys/compat/linux32/common/linux32_ipccall.c:1.8 src/sys/compat/linux32/common/linux32_ipccall.c:1.9 --- src/sys/compat/linux32/common/linux32_ipccall.c:1.8 Wed Nov 18 12:27:58 2009 +++ src/sys/compat/linux32/common/linux32_ipccall.c Wed Nov 18 15:19:24 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: linux32_ipccall.c,v 1.8 2009/11/18 12:27:58 njoly Exp $ */ +/* $NetBSD: linux32_ipccall.c,v 1.9 2009/11/18 15:19:24 njoly Exp $ */ /* * Copyright (c) 2008 Nicolas Joly @@ -27,7 +27,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: linux32_ipccall.c,v 1.8 2009/11/18 12:27:58 njoly Exp $"); +__KERNEL_RCSID(0, "$NetBSD: linux32_ipccall.c,v 1.9 2009/11/18 15:19:24 njoly Exp $"); #if defined(_KERNEL_OPT) #include "opt_sysv.h" @@ -386,7 +386,7 @@ */ struct linux32_msgrcv_msgarg { netbsd32_pointer_t msg; - int type; + netbsd32_long type; }; static int
CVS commit: src/sys/compat/linux32/common
Module Name:src Committed By: njoly Date: Wed Nov 18 12:27:58 UTC 2009 Modified Files: src/sys/compat/linux32/common: linux32_ipccall.c Log Message: Make linux32 msgsnd/msgrcv use the netbsd32 syscalls instead of native ones, to ensure that msgbuf mtype member will be of the right type. To generate a diff of this commit: cvs rdiff -u -r1.7 -r1.8 src/sys/compat/linux32/common/linux32_ipccall.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/compat/linux32/common/linux32_ipccall.c diff -u src/sys/compat/linux32/common/linux32_ipccall.c:1.7 src/sys/compat/linux32/common/linux32_ipccall.c:1.8 --- src/sys/compat/linux32/common/linux32_ipccall.c:1.7 Wed Nov 18 12:01:25 2009 +++ src/sys/compat/linux32/common/linux32_ipccall.c Wed Nov 18 12:27:58 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: linux32_ipccall.c,v 1.7 2009/11/18 12:01:25 njoly Exp $ */ +/* $NetBSD: linux32_ipccall.c,v 1.8 2009/11/18 12:27:58 njoly Exp $ */ /* * Copyright (c) 2008 Nicolas Joly @@ -27,7 +27,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: linux32_ipccall.c,v 1.7 2009/11/18 12:01:25 njoly Exp $"); +__KERNEL_RCSID(0, "$NetBSD: linux32_ipccall.c,v 1.8 2009/11/18 12:27:58 njoly Exp $"); #if defined(_KERNEL_OPT) #include "opt_sysv.h" @@ -42,6 +42,7 @@ #include #include +#include #include #include @@ -369,14 +370,14 @@ static int linux32_msgsnd(struct lwp *l, const struct linux32_sys_ipc_args *uap, register_t *retval) { - struct sys_msgsnd_args bma; + struct netbsd32_msgsnd_args bma; SCARG(&bma, msqid) = SCARG(uap, a1); - SCARG(&bma, msgp) = SCARG_P32(uap, ptr); + SCARG(&bma, msgp) = SCARG(uap, ptr); SCARG(&bma, msgsz) = SCARG(uap, a2); SCARG(&bma, msgflg) = SCARG(uap, a3); - return sys_msgsnd(l, &bma, retval); + return netbsd32_msgsnd(l, &bma, retval); } /* @@ -391,7 +392,7 @@ static int linux32_msgrcv(struct lwp *l, const struct linux32_sys_ipc_args *uap, register_t *retval) { - struct sys_msgrcv_args bma; + struct netbsd32_msgrcv_args bma; struct linux32_msgrcv_msgarg kluge; int error; @@ -399,12 +400,12 @@ return error; SCARG(&bma, msqid) = SCARG(uap, a1); - SCARG(&bma, msgp) = NETBSD32PTR64(kluge.msg); + SCARG(&bma, msgp) = kluge.msg; SCARG(&bma, msgsz) = SCARG(uap, a2); SCARG(&bma, msgtyp) = kluge.type; SCARG(&bma, msgflg) = SCARG(uap, a3); - return sys_msgrcv(l, &bma, retval); + return netbsd32_msgrcv(l, &bma, retval); } static int
CVS commit: src/sys/compat/linux32/common
Module Name:src Committed By: njoly Date: Wed Nov 18 12:01:26 UTC 2009 Modified Files: src/sys/compat/linux32/common: linux32_ipccall.c Log Message: Kill noisy debug printf. To generate a diff of this commit: cvs rdiff -u -r1.6 -r1.7 src/sys/compat/linux32/common/linux32_ipccall.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/compat/linux32/common/linux32_ipccall.c diff -u src/sys/compat/linux32/common/linux32_ipccall.c:1.6 src/sys/compat/linux32/common/linux32_ipccall.c:1.7 --- src/sys/compat/linux32/common/linux32_ipccall.c:1.6 Mon Nov 16 13:32:40 2009 +++ src/sys/compat/linux32/common/linux32_ipccall.c Wed Nov 18 12:01:25 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: linux32_ipccall.c,v 1.6 2009/11/16 13:32:40 joerg Exp $ */ +/* $NetBSD: linux32_ipccall.c,v 1.7 2009/11/18 12:01:25 njoly Exp $ */ /* * Copyright (c) 2008 Nicolas Joly @@ -27,7 +27,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: linux32_ipccall.c,v 1.6 2009/11/16 13:32:40 joerg Exp $"); +__KERNEL_RCSID(0, "$NetBSD: linux32_ipccall.c,v 1.7 2009/11/18 12:01:25 njoly Exp $"); #if defined(_KERNEL_OPT) #include "opt_sysv.h" @@ -376,8 +376,6 @@ SCARG(&bma, msgsz) = SCARG(uap, a2); SCARG(&bma, msgflg) = SCARG(uap, a3); - printf("linux32_msgsnd: %d %zu\n", SCARG(&bma, msqid), SCARG(&bma, msgsz)); - return sys_msgsnd(l, &bma, retval); } @@ -406,8 +404,6 @@ SCARG(&bma, msgtyp) = kluge.type; SCARG(&bma, msgflg) = SCARG(uap, a3); - printf("linux32_msgrcv: %d %zu\n", SCARG(&bma, msqid), SCARG(&bma, msgsz)); - return sys_msgrcv(l, &bma, retval); }
CVS commit: src/sys/compat/linux32/common
Module Name:src Committed By: joerg Date: Mon Nov 16 13:32:40 UTC 2009 Modified Files: src/sys/compat/linux32/common: linux32_ipc.h linux32_ipccall.c Log Message: Follow up commit to fix breakage that somehow passed by the compiler. To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 src/sys/compat/linux32/common/linux32_ipc.h cvs rdiff -u -r1.5 -r1.6 src/sys/compat/linux32/common/linux32_ipccall.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/compat/linux32/common/linux32_ipc.h diff -u src/sys/compat/linux32/common/linux32_ipc.h:1.2 src/sys/compat/linux32/common/linux32_ipc.h:1.3 --- src/sys/compat/linux32/common/linux32_ipc.h:1.2 Mon Nov 16 08:49:32 2009 +++ src/sys/compat/linux32/common/linux32_ipc.h Mon Nov 16 13:32:40 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: linux32_ipc.h,v 1.2 2009/11/16 08:49:32 joerg Exp $ */ +/* $NetBSD: linux32_ipc.h,v 1.3 2009/11/16 13:32:40 joerg Exp $ */ /* * Copyright (c) 2008 Nicolas Joly @@ -64,15 +64,15 @@ linux_time_t l_msg_ctime; netbsd32_pointer_t l_wwait; /* Linux internal */ netbsd32_pointer_t l_rwait; /* Linux internal */ - netbsd32_u_short l_msg_cbytes; - netbsd32_u_short l_msg_qnum; - netbsd32_u_short l_msg_qbytes; - netbsd32_u_short l_msg_lspid; - netbsd32_u_short l_msg_lrpid; + ushort l_msg_cbytes; + ushort l_msg_qnum; + ushort l_msg_qbytes; + ushort l_msg_lspid; + ushort l_msg_lrpid; }; -struct linux_msqid64_ds { - struct linux_ipc64_perm l_msg_perm; +struct linux32_msqid64_ds { + struct linux32_ipc64_perm l_msg_perm; linux32_time_t l_msg_stime; netbsd32_u_long l___unused1; linux32_time_t l_msg_rtime; @@ -82,8 +82,8 @@ netbsd32_u_long l_msg_cbytes; netbsd32_u_long l_msg_qnum; netbsd32_u_long l_msg_qbytes; - netbsd32_int l_msg_lspid; - netbsd32_int l_msg_lrpid; + int l_msg_lspid; + int l_msg_lrpid; netbsd32_u_long l___unused4; netbsd32_u_long l___unused5; Index: src/sys/compat/linux32/common/linux32_ipccall.c diff -u src/sys/compat/linux32/common/linux32_ipccall.c:1.5 src/sys/compat/linux32/common/linux32_ipccall.c:1.6 --- src/sys/compat/linux32/common/linux32_ipccall.c:1.5 Mon Nov 16 08:49:32 2009 +++ src/sys/compat/linux32/common/linux32_ipccall.c Mon Nov 16 13:32:40 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: linux32_ipccall.c,v 1.5 2009/11/16 08:49:32 joerg Exp $ */ +/* $NetBSD: linux32_ipccall.c,v 1.6 2009/11/16 13:32:40 joerg Exp $ */ /* * Copyright (c) 2008 Nicolas Joly @@ -27,7 +27,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: linux32_ipccall.c,v 1.5 2009/11/16 08:49:32 joerg Exp $"); +__KERNEL_RCSID(0, "$NetBSD: linux32_ipccall.c,v 1.6 2009/11/16 13:32:40 joerg Exp $"); #if defined(_KERNEL_OPT) #include "opt_sysv.h" @@ -441,12 +441,12 @@ bmp->msg_ctime = lmp->l_msg_ctime; } -void +static void linux32_to_bsd_msqid64_ds(struct linux32_msqid64_ds *lmp, struct msqid_ds *bmp) { memset(bmp, 0, sizeof(*bmp)); - linux_to_bsd_ipc64_perm(&lmp->l_msg_perm, &bmp->msg_perm); + linux32_to_bsd_ipc64_perm(&lmp->l_msg_perm, &bmp->msg_perm); bmp->msg_stime = lmp->l_msg_stime; bmp->msg_rtime = lmp->l_msg_rtime; bmp->msg_ctime = lmp->l_msg_ctime; @@ -475,14 +475,14 @@ lmp->l_msg_ctime = bmp->msg_ctime; } -void +static void bsd_to_linux32_msqid64_ds(struct msqid_ds *bmp, struct linux32_msqid64_ds *lmp) { memset(lmp, 0, sizeof(*lmp)); - bsd_to_linux_ipc64_perm(&bmp->msg_perm, &lmp->l_msg_perm); - NETBSD32PTR32(lmp->l_msg_stime, bmp->msg_stime); - NETBSD32PTR32(lmp->l_msg_rtime, bmp->msg_rtime); + bsd_to_linux32_ipc64_perm(&bmp->msg_perm, &lmp->l_msg_perm); + lmp->l_msg_stime = bmp->msg_stime; + lmp->l_msg_rtime = bmp->msg_rtime; lmp->l_msg_ctime = bmp->msg_ctime; lmp->l_msg_cbytes = bmp->_msg_cbytes; lmp->l_msg_qnum = bmp->msg_qnum;
CVS commit: src/sys/compat/linux32/common
Module Name:src Committed By: joerg Date: Mon Nov 16 08:49:32 UTC 2009 Modified Files: src/sys/compat/linux32/common: linux32_ipc.h linux32_ipccall.c Log Message: Add SYSVMSG support for linux32. To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 src/sys/compat/linux32/common/linux32_ipc.h cvs rdiff -u -r1.4 -r1.5 src/sys/compat/linux32/common/linux32_ipccall.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/compat/linux32/common/linux32_ipc.h diff -u src/sys/compat/linux32/common/linux32_ipc.h:1.1 src/sys/compat/linux32/common/linux32_ipc.h:1.2 --- src/sys/compat/linux32/common/linux32_ipc.h:1.1 Tue May 20 17:31:56 2008 +++ src/sys/compat/linux32/common/linux32_ipc.h Mon Nov 16 08:49:32 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: linux32_ipc.h,v 1.1 2008/05/20 17:31:56 njoly Exp $ */ +/* $NetBSD: linux32_ipc.h,v 1.2 2009/11/16 08:49:32 joerg Exp $ */ /* * Copyright (c) 2008 Nicolas Joly @@ -55,6 +55,40 @@ netbsd32_u_long l___unused2; }; +struct linux32_msqid_ds { + struct linux32_ipc_perm l_msg_perm; + netbsd32_pointer_t l_msg_first; + netbsd32_pointer_t l_msg_last; + linux_time_t l_msg_stime; + linux_time_t l_msg_rtime; + linux_time_t l_msg_ctime; + netbsd32_pointer_t l_wwait; /* Linux internal */ + netbsd32_pointer_t l_rwait; /* Linux internal */ + netbsd32_u_short l_msg_cbytes; + netbsd32_u_short l_msg_qnum; + netbsd32_u_short l_msg_qbytes; + netbsd32_u_short l_msg_lspid; + netbsd32_u_short l_msg_lrpid; +}; + +struct linux_msqid64_ds { + struct linux_ipc64_perm l_msg_perm; + linux32_time_t l_msg_stime; + netbsd32_u_long l___unused1; + linux32_time_t l_msg_rtime; + netbsd32_u_long l___unused2; + linux32_time_t l_msg_ctime; + netbsd32_u_long l___unused3; + netbsd32_u_long l_msg_cbytes; + netbsd32_u_long l_msg_qnum; + netbsd32_u_long l_msg_qbytes; + netbsd32_int l_msg_lspid; + netbsd32_int l_msg_lrpid; + netbsd32_u_long l___unused4; + netbsd32_u_long l___unused5; + +}; + #define LINUX32_IPC_RMID 0 #define LINUX32_IPC_SET 1 #define LINUX32_IPC_STAT 2 Index: src/sys/compat/linux32/common/linux32_ipccall.c diff -u src/sys/compat/linux32/common/linux32_ipccall.c:1.4 src/sys/compat/linux32/common/linux32_ipccall.c:1.5 --- src/sys/compat/linux32/common/linux32_ipccall.c:1.4 Mon Apr 27 13:24:18 2009 +++ src/sys/compat/linux32/common/linux32_ipccall.c Mon Nov 16 08:49:32 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: linux32_ipccall.c,v 1.4 2009/04/27 13:24:18 njoly Exp $ */ +/* $NetBSD: linux32_ipccall.c,v 1.5 2009/11/16 08:49:32 joerg Exp $ */ /* * Copyright (c) 2008 Nicolas Joly @@ -27,7 +27,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: linux32_ipccall.c,v 1.4 2009/04/27 13:24:18 njoly Exp $"); +__KERNEL_RCSID(0, "$NetBSD: linux32_ipccall.c,v 1.5 2009/11/16 08:49:32 joerg Exp $"); #if defined(_KERNEL_OPT) #include "opt_sysv.h" @@ -35,6 +35,7 @@ #include #include +#include #include #include @@ -42,6 +43,7 @@ #include +#include #include #include #include @@ -99,6 +101,17 @@ linux32_shmctl(struct lwp *, const struct linux32_sys_ipc_args *, register_t *); #endif /* SYSVSHM */ +#ifdef SYSVMSG +static int linux32_msgsnd(struct lwp *, const struct linux32_sys_ipc_args *, +register_t *); +static int linux32_msgrcv(struct lwp *, const struct linux32_sys_ipc_args *, +register_t *); +static int linux32_msgget(struct lwp *, const struct linux32_sys_ipc_args *, +register_t *); +static int linux32_msgctl(struct lwp *, const struct linux32_sys_ipc_args *, +register_t *); +#endif + int linux32_sys_ipc(struct lwp *l, const struct linux32_sys_ipc_args *uap, register_t *retval) @@ -120,6 +133,16 @@ case LINUX32_IPC_semctl: return linux32_semctl(l, uap, retval); #endif /* SYSVSEM */ +#ifdef SYSVMSG + case LINUX32_IPC_msgsnd: + return linux32_msgsnd(l, uap, retval); + case LINUX32_IPC_msgrcv: + return linux32_msgrcv(l, uap, retval); + case LINUX32_IPC_msgget: + return linux32_msgget(l, uap, retval); + case LINUX32_IPC_msgctl: + return linux32_msgctl(l, uap, retval); +#endif #ifdef SYSVSHM case LINUX32_IPC_shmat: return linux32_shmat(l, uap, retval); @@ -341,6 +364,189 @@ } #endif /* SYSVSEM */ +#ifdef SYSVMSG + +static int +linux32_msgsnd(struct lwp *l, const struct linux32_sys_ipc_args *uap, register_t *retval) +{ + struct sys_msgsnd_args bma; + + SCARG(&bma, msqid) = SCARG(uap, a1); + SCARG(&bma, msgp) = SCARG_P32(uap, ptr); + SCARG(&bma, msgsz) = SCARG(uap, a2); + SCARG(&bma, msgflg) = SCARG(uap, a3); + + printf("linux32_msgsnd: %d %zu\n", SCARG(&bma, msqid), SCARG(&bma, msgsz)); + + return sys_msgsnd(l, &bma, retval); +} + +/* + * This kludge is used for the 6th argument to the msgrcv system + * call, to get around the maximum of 5 arguments to a syscall in Linux. + */ +struct linux32_msgrcv_msgarg { + netbsd32_pointer_t msg; + int type; +}; + +static int +linux32_msgrcv(struct lwp *l, const struct l
CVS commit: src/sys/compat/linux/common
Module Name:src Committed By: joerg Date: Mon Nov 16 08:44:21 UTC 2009 Modified Files: src/sys/compat/linux/common: linux_ipc.c Log Message: Make sure to never leak padding space before copyout or copyin uninitialized fields by explicitly using memset in the conversion routines. To generate a diff of this commit: cvs rdiff -u -r1.53 -r1.54 src/sys/compat/linux/common/linux_ipc.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/compat/linux/common/linux_ipc.c diff -u src/sys/compat/linux/common/linux_ipc.c:1.53 src/sys/compat/linux/common/linux_ipc.c:1.54 --- src/sys/compat/linux/common/linux_ipc.c:1.53 Thu Apr 23 17:40:57 2009 +++ src/sys/compat/linux/common/linux_ipc.c Mon Nov 16 08:44:19 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: linux_ipc.c,v 1.53 2009/04/23 17:40:57 njoly Exp $ */ +/* $NetBSD: linux_ipc.c,v 1.54 2009/11/16 08:44:19 joerg Exp $ */ /*- * Copyright (c) 1995, 1998 The NetBSD Foundation, Inc. @@ -30,7 +30,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: linux_ipc.c,v 1.53 2009/04/23 17:40:57 njoly Exp $"); +__KERNEL_RCSID(0, "$NetBSD: linux_ipc.c,v 1.54 2009/11/16 08:44:19 joerg Exp $"); #if defined(_KERNEL_OPT) #include "opt_sysv.h" @@ -306,6 +306,7 @@ linux_to_bsd_msqid_ds(struct linux_msqid_ds *lmp, struct msqid_ds *bmp) { + memset(bmp, 0, sizeof(*bmp)); linux_to_bsd_ipc_perm(&lmp->l_msg_perm, &bmp->msg_perm); bmp->_msg_first = lmp->l_msg_first; bmp->_msg_last = lmp->l_msg_last; @@ -322,6 +323,8 @@ void linux_to_bsd_msqid64_ds(struct linux_msqid64_ds *lmp, struct msqid_ds *bmp) { + + memset(bmp, 0, sizeof(*bmp)); linux_to_bsd_ipc64_perm(&lmp->l_msg_perm, &bmp->msg_perm); bmp->msg_stime = lmp->l_msg_stime; bmp->msg_rtime = lmp->l_msg_rtime; @@ -337,6 +340,7 @@ bsd_to_linux_msqid_ds(struct msqid_ds *bmp, struct linux_msqid_ds *lmp) { + memset(lmp, 0, sizeof(*lmp)); bsd_to_linux_ipc_perm(&bmp->msg_perm, &lmp->l_msg_perm); lmp->l_msg_first = bmp->_msg_first; lmp->l_msg_last = bmp->_msg_last; @@ -353,6 +357,8 @@ void bsd_to_linux_msqid64_ds(struct msqid_ds *bmp, struct linux_msqid64_ds *lmp) { + + memset(lmp, 0, sizeof(*lmp)); bsd_to_linux_ipc64_perm(&bmp->msg_perm, &lmp->l_msg_perm); lmp->l_msg_stime = bmp->msg_stime; lmp->l_msg_rtime = bmp->msg_rtime;
CVS commit: src/sys/compat
Module Name:src Committed By: joerg Date: Fri Nov 13 22:39:35 UTC 2009 Modified Files: src/sys/compat/linux/common: linux_socket.c src/sys/compat/linux32/common: linux32_socket.c Log Message: Return the result of copyout. Reminded by Niolas Joly. To generate a diff of this commit: cvs rdiff -u -r1.105 -r1.106 src/sys/compat/linux/common/linux_socket.c cvs rdiff -u -r1.11 -r1.12 src/sys/compat/linux32/common/linux32_socket.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/compat/linux/common/linux_socket.c diff -u src/sys/compat/linux/common/linux_socket.c:1.105 src/sys/compat/linux/common/linux_socket.c:1.106 --- src/sys/compat/linux/common/linux_socket.c:1.105 Fri Nov 13 21:45:03 2009 +++ src/sys/compat/linux/common/linux_socket.c Fri Nov 13 22:39:35 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: linux_socket.c,v 1.105 2009/11/13 21:45:03 joerg Exp $ */ +/* $NetBSD: linux_socket.c,v 1.106 2009/11/13 22:39:35 joerg Exp $ */ /*- * Copyright (c) 1995, 1998, 2008 The NetBSD Foundation, Inc. @@ -35,7 +35,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: linux_socket.c,v 1.105 2009/11/13 21:45:03 joerg Exp $"); +__KERNEL_RCSID(0, "$NetBSD: linux_socket.c,v 1.106 2009/11/13 22:39:35 joerg Exp $"); #if defined(_KERNEL_OPT) #include "opt_inet.h" @@ -1025,9 +1025,7 @@ strncpy(ifr.ifr_name, ifp->if_xname, sizeof(ifr.ifr_name)); - error = copyout(&ifr, data, sizeof(ifr)); - - return 0; + return copyout(&ifr, data, sizeof(ifr)); } int Index: src/sys/compat/linux32/common/linux32_socket.c diff -u src/sys/compat/linux32/common/linux32_socket.c:1.11 src/sys/compat/linux32/common/linux32_socket.c:1.12 --- src/sys/compat/linux32/common/linux32_socket.c:1.11 Fri Nov 13 21:45:03 2009 +++ src/sys/compat/linux32/common/linux32_socket.c Fri Nov 13 22:39:35 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: linux32_socket.c,v 1.11 2009/11/13 21:45:03 joerg Exp $ */ +/* $NetBSD: linux32_socket.c,v 1.12 2009/11/13 22:39:35 joerg Exp $ */ /*- * Copyright (c) 2006 Emmanuel Dreyfus, all rights reserved. @@ -33,7 +33,7 @@ #include -__KERNEL_RCSID(0, "$NetBSD: linux32_socket.c,v 1.11 2009/11/13 21:45:03 joerg Exp $"); +__KERNEL_RCSID(0, "$NetBSD: linux32_socket.c,v 1.12 2009/11/13 22:39:35 joerg Exp $"); #include #include @@ -407,9 +407,7 @@ strncpy(ifr.ifr_name, ifp->if_xname, sizeof(ifr.ifr_name)); - error = copyout(&ifr, data, sizeof(ifr)); - - return 0; + return copyout(&ifr, data, sizeof(ifr)); } int
CVS commit: src/sys/compat
Module Name:src Committed By: joerg Date: Fri Nov 13 21:45:03 UTC 2009 Modified Files: src/sys/compat/linux/common: linux_socket.c linux_sockio.h src/sys/compat/linux32/common: linux32_socket.c linux32_sockio.h Log Message: Provide SIOCGIFNAME. To generate a diff of this commit: cvs rdiff -u -r1.104 -r1.105 src/sys/compat/linux/common/linux_socket.c cvs rdiff -u -r1.16 -r1.17 src/sys/compat/linux/common/linux_sockio.h cvs rdiff -u -r1.10 -r1.11 src/sys/compat/linux32/common/linux32_socket.c cvs rdiff -u -r1.2 -r1.3 src/sys/compat/linux32/common/linux32_sockio.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/compat/linux/common/linux_socket.c diff -u src/sys/compat/linux/common/linux_socket.c:1.104 src/sys/compat/linux/common/linux_socket.c:1.105 --- src/sys/compat/linux/common/linux_socket.c:1.104 Wed Jun 17 14:18:51 2009 +++ src/sys/compat/linux/common/linux_socket.c Fri Nov 13 21:45:03 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: linux_socket.c,v 1.104 2009/06/17 14:18:51 njoly Exp $ */ +/* $NetBSD: linux_socket.c,v 1.105 2009/11/13 21:45:03 joerg Exp $ */ /*- * Copyright (c) 1995, 1998, 2008 The NetBSD Foundation, Inc. @@ -35,7 +35,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: linux_socket.c,v 1.104 2009/06/17 14:18:51 njoly Exp $"); +__KERNEL_RCSID(0, "$NetBSD: linux_socket.c,v 1.105 2009/11/13 21:45:03 joerg Exp $"); #if defined(_KERNEL_OPT) #include "opt_inet.h" @@ -114,6 +114,7 @@ int linux_to_bsd_ip_sockopt(int); int linux_to_bsd_tcp_sockopt(int); int linux_to_bsd_udp_sockopt(int); +int linux_getifname(struct lwp *, register_t *, void *); int linux_getifconf(struct lwp *, register_t *, void *); int linux_getifhwaddr(struct lwp *, register_t *, u_int, void *); static int linux_get_sa(struct lwp *, int, struct mbuf **, @@ -1005,6 +1006,31 @@ } int +linux_getifname(struct lwp *l, register_t *retval, void *data) +{ + struct ifnet *ifp; + struct linux_ifreq ifr; + int error; + + error = copyin(data, &ifr, sizeof(ifr)); + if (error) + return error; + + if (ifr.ifr_ifru.ifru_ifindex >= if_indexlim) + return ENODEV; + + ifp = ifindex2ifnet[ifr.ifr_ifru.ifru_ifindex]; + if (ifp == NULL) + return ENODEV; + + strncpy(ifr.ifr_name, ifp->if_xname, sizeof(ifr.ifr_name)); + + error = copyout(&ifr, data, sizeof(ifr)); + + return 0; +} + +int linux_getifconf(struct lwp *l, register_t *retval, void *data) { struct linux_ifreq ifr, *ifrp; @@ -1225,6 +1251,10 @@ retval[0] = 0; switch (com) { + case LINUX_SIOCGIFNAME: + error = linux_getifname(l, retval, SCARG(uap, data)); + dosys = 0; + break; case LINUX_SIOCGIFCONF: error = linux_getifconf(l, retval, SCARG(uap, data)); dosys = 0; Index: src/sys/compat/linux/common/linux_sockio.h diff -u src/sys/compat/linux/common/linux_sockio.h:1.16 src/sys/compat/linux/common/linux_sockio.h:1.17 --- src/sys/compat/linux/common/linux_sockio.h:1.16 Thu Jul 3 14:07:09 2008 +++ src/sys/compat/linux/common/linux_sockio.h Fri Nov 13 21:45:03 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: linux_sockio.h,v 1.16 2008/07/03 14:07:09 njoly Exp $ */ +/* $NetBSD: linux_sockio.h,v 1.17 2009/11/13 21:45:03 joerg Exp $ */ /*- * Copyright (c) 1995, 1998 The NetBSD Foundation, Inc. @@ -32,6 +32,7 @@ #ifndef _LINUX_SOCKIO_H #define _LINUX_SOCKIO_H +#define LINUX_SIOCGIFNAME _LINUX_IO(0x89, 0x10) #define LINUX_SIOCGIFCONF _LINUX_IO(0x89, 0x12) #define LINUX_SIOCGIFFLAGS _LINUX_IO(0x89, 0x13) #define LINUX_SIOCSIFFLAGS _LINUX_IO(0x89, 0x14) @@ -66,6 +67,7 @@ struct osockaddr ifru_addr; struct osockaddr ifru_hwaddr; struct linux_ifmap ifru_map; + int ifru_ifindex; } ifr_ifru; #define ifr_name ifr_ifrn.ifrn_name /* interface name */ #define ifr_addr ifr_ifru.ifru_addr /* address */ Index: src/sys/compat/linux32/common/linux32_socket.c diff -u src/sys/compat/linux32/common/linux32_socket.c:1.10 src/sys/compat/linux32/common/linux32_socket.c:1.11 --- src/sys/compat/linux32/common/linux32_socket.c:1.10 Wed Nov 19 18:36:04 2008 +++ src/sys/compat/linux32/common/linux32_socket.c Fri Nov 13 21:45:03 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: linux32_socket.c,v 1.10 2008/11/19 18:36:04 ad Exp $ */ +/* $NetBSD: linux32_socket.c,v 1.11 2009/11/13 21:45:03 joerg Exp $ */ /*- * Copyright (c) 2006 Emmanuel Dreyfus, all rights reserved. @@ -33,7 +33,7 @@ #include -__KERNEL_RCSID(0, "$NetBSD: linux32_socket.c,v 1.10 2008/11/19 18:36:04 ad Exp $"); +__KERNEL_RCSID(0, "$NetBSD: linux32_socket.c,v 1.11 2009/11/13 21:45:03 joerg Exp $"); #include #include @@ -91,6 +91,7 @@ #include #include +int linux32_getifname(struct lwp *, register_t *, void *); int linux32_getifconf(struct lwp *, register_t *, void *); int linux32_getifhwaddr(struct lwp *, register_t *, u_int, void *); @@ -387,6 +388,31 @@ } int +linux32_getifname(struct lwp *l, register_t *retval, void *data) +{ + struct ifnet *ifp; + struc
CVS commit: src/sys/compat
Module Name:src Committed By: rafal Date: Thu Nov 5 18:39:38 UTC 2009 Modified Files: src/sys/compat/svr4: svr4_misc.c src/sys/compat/svr4_32: svr4_32_misc.c Log Message: Fix fallout from do_sys_wait changes (hi, rmind!) To generate a diff of this commit: cvs rdiff -u -r1.147 -r1.148 src/sys/compat/svr4/svr4_misc.c cvs rdiff -u -r1.66 -r1.67 src/sys/compat/svr4_32/svr4_32_misc.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/compat/svr4/svr4_misc.c diff -u src/sys/compat/svr4/svr4_misc.c:1.147 src/sys/compat/svr4/svr4_misc.c:1.148 --- src/sys/compat/svr4/svr4_misc.c:1.147 Wed Nov 4 21:23:03 2009 +++ src/sys/compat/svr4/svr4_misc.c Thu Nov 5 18:39:38 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: svr4_misc.c,v 1.147 2009/11/04 21:23:03 rmind Exp $ */ +/* $NetBSD: svr4_misc.c,v 1.148 2009/11/05 18:39:38 rafal Exp $ */ /*- * Copyright (c) 1994, 2008 The NetBSD Foundation, Inc. @@ -37,7 +37,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: svr4_misc.c,v 1.147 2009/11/04 21:23:03 rmind Exp $"); +__KERNEL_RCSID(0, "$NetBSD: svr4_misc.c,v 1.148 2009/11/05 18:39:38 rafal Exp $"); #include #include @@ -999,7 +999,6 @@ { int options, status; int error; - int was_zombie; struct rusage ru; svr4_siginfo_t i; int id = SCARG(uap, id); @@ -1037,8 +1036,7 @@ SCARG(uap, grp), id, SCARG(uap, info), SCARG(uap, options))); - error = do_sys_wait(l, &id, &status, options, &ru, - &was_zombie); + error = do_sys_wait(&id, &status, options, &ru); retval[0] = id; if (error != 0) Index: src/sys/compat/svr4_32/svr4_32_misc.c diff -u src/sys/compat/svr4_32/svr4_32_misc.c:1.66 src/sys/compat/svr4_32/svr4_32_misc.c:1.67 --- src/sys/compat/svr4_32/svr4_32_misc.c:1.66 Wed Nov 4 21:23:03 2009 +++ src/sys/compat/svr4_32/svr4_32_misc.c Thu Nov 5 18:39:38 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: svr4_32_misc.c,v 1.66 2009/11/04 21:23:03 rmind Exp $ */ +/* $NetBSD: svr4_32_misc.c,v 1.67 2009/11/05 18:39:38 rafal Exp $ */ /*- * Copyright (c) 1994, 2008 The NetBSD Foundation, Inc. @@ -37,7 +37,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: svr4_32_misc.c,v 1.66 2009/11/04 21:23:03 rmind Exp $"); +__KERNEL_RCSID(0, "$NetBSD: svr4_32_misc.c,v 1.67 2009/11/05 18:39:38 rafal Exp $"); #include #include @@ -1006,7 +1006,7 @@ int svr4_32_sys_waitsys(struct lwp *l, const struct svr4_32_sys_waitsys_args *uap, register_t *retval) { - int options, error, status, was_zombie;; + int options, error, status; struct rusage ru; int id = SCARG(uap, id); @@ -1041,8 +1041,7 @@ if (SCARG(uap, options) & (SVR4_WSTOPPED|SVR4_WCONTINUED)) options |= WUNTRACED; - error = do_sys_wait(l, &id, &status, options, &ru, - &was_zombie); + error = do_sys_wait(&id, &status, options, &ru); retval[0] = id; if (error != 0)
CVS commit: src/sys/compat/linux/arch/amd64
Module Name:src Committed By: njoly Date: Fri Oct 30 10:58:15 UTC 2009 Modified Files: src/sys/compat/linux/arch/amd64: linux_syscall.h linux_syscallargs.h linux_syscalls.c linux_sysent.c Log Message: Regen for struct linux_stat64 fix. To generate a diff of this commit: cvs rdiff -u -r1.34 -r1.35 src/sys/compat/linux/arch/amd64/linux_syscall.h \ src/sys/compat/linux/arch/amd64/linux_syscallargs.h \ src/sys/compat/linux/arch/amd64/linux_syscalls.c \ src/sys/compat/linux/arch/amd64/linux_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/compat/linux/arch/amd64/linux_syscall.h diff -u src/sys/compat/linux/arch/amd64/linux_syscall.h:1.34 src/sys/compat/linux/arch/amd64/linux_syscall.h:1.35 --- src/sys/compat/linux/arch/amd64/linux_syscall.h:1.34 Wed Jun 17 14:20:08 2009 +++ src/sys/compat/linux/arch/amd64/linux_syscall.h Fri Oct 30 10:58:15 2009 @@ -1,10 +1,10 @@ -/* $NetBSD: linux_syscall.h,v 1.34 2009/06/17 14:20:08 njoly Exp $ */ +/* $NetBSD: linux_syscall.h,v 1.35 2009/10/30 10:58:15 njoly Exp $ */ /* * System call numbers. * * DO NOT EDIT-- this file is automatically generated. - * created from NetBSD: syscalls.master,v 1.32 2009/06/17 14:18:51 njoly Exp + * created from NetBSD: syscalls.master,v 1.33 2009/10/30 10:57:40 njoly Exp */ #ifndef _LINUX_SYS_SYSCALL_H_ @@ -24,13 +24,13 @@ /* syscall: "close" ret: "int" args: "int" */ #define LINUX_SYS_close 3 -/* syscall: "stat64" ret: "int" args: "const char *" "struct linux_stat *" */ +/* syscall: "stat64" ret: "int" args: "const char *" "struct linux_stat64 *" */ #define LINUX_SYS_stat64 4 -/* syscall: "fstat64" ret: "int" args: "int" "struct linux_stat *" */ +/* syscall: "fstat64" ret: "int" args: "int" "struct linux_stat64 *" */ #define LINUX_SYS_fstat64 5 -/* syscall: "lstat64" ret: "int" args: "const char *" "struct linux_stat *" */ +/* syscall: "lstat64" ret: "int" args: "const char *" "struct linux_stat64 *" */ #define LINUX_SYS_lstat64 6 /* syscall: "poll" ret: "int" args: "struct pollfd *" "u_int" "int" */ Index: src/sys/compat/linux/arch/amd64/linux_syscallargs.h diff -u src/sys/compat/linux/arch/amd64/linux_syscallargs.h:1.34 src/sys/compat/linux/arch/amd64/linux_syscallargs.h:1.35 --- src/sys/compat/linux/arch/amd64/linux_syscallargs.h:1.34 Wed Jun 17 14:20:08 2009 +++ src/sys/compat/linux/arch/amd64/linux_syscallargs.h Fri Oct 30 10:58:15 2009 @@ -1,10 +1,10 @@ -/* $NetBSD: linux_syscallargs.h,v 1.34 2009/06/17 14:20:08 njoly Exp $ */ +/* $NetBSD: linux_syscallargs.h,v 1.35 2009/10/30 10:58:15 njoly Exp $ */ /* * System call argument lists. * * DO NOT EDIT-- this file is automatically generated. - * created from NetBSD: syscalls.master,v 1.32 2009/06/17 14:18:51 njoly Exp + * created from NetBSD: syscalls.master,v 1.33 2009/10/30 10:57:40 njoly Exp */ #ifndef _LINUX_SYS_SYSCALLARGS_H_ @@ -46,19 +46,19 @@ struct linux_sys_stat64_args { syscallarg(const char *) path; - syscallarg(struct linux_stat *) sp; + syscallarg(struct linux_stat64 *) sp; }; check_syscall_args(linux_sys_stat64) struct linux_sys_fstat64_args { syscallarg(int) fd; - syscallarg(struct linux_stat *) sp; + syscallarg(struct linux_stat64 *) sp; }; check_syscall_args(linux_sys_fstat64) struct linux_sys_lstat64_args { syscallarg(const char *) path; - syscallarg(struct linux_stat *) sp; + syscallarg(struct linux_stat64 *) sp; }; check_syscall_args(linux_sys_lstat64) Index: src/sys/compat/linux/arch/amd64/linux_syscalls.c diff -u src/sys/compat/linux/arch/amd64/linux_syscalls.c:1.34 src/sys/compat/linux/arch/amd64/linux_syscalls.c:1.35 --- src/sys/compat/linux/arch/amd64/linux_syscalls.c:1.34 Wed Jun 17 14:20:08 2009 +++ src/sys/compat/linux/arch/amd64/linux_syscalls.c Fri Oct 30 10:58:15 2009 @@ -1,14 +1,14 @@ -/* $NetBSD: linux_syscalls.c,v 1.34 2009/06/17 14:20:08 njoly Exp $ */ +/* $NetBSD: linux_syscalls.c,v 1.35 2009/10/30 10:58:15 njoly Exp $ */ /* * System call names. * * DO NOT EDIT-- this file is automatically generated. - * created from NetBSD: syscalls.master,v 1.32 2009/06/17 14:18:51 njoly Exp + * created from NetBSD: syscalls.master,v 1.33 2009/10/30 10:57:40 njoly Exp */ #include -__KERNEL_RCSID(0, "$NetBSD: linux_syscalls.c,v 1.34 2009/06/17 14:20:08 njoly Exp $"); +__KERNEL_RCSID(0, "$NetBSD: linux_syscalls.c,v 1.35 2009/10/30 10:58:15 njoly Exp $"); #if defined(_KERNEL_OPT) #if defined(_KERNEL_OPT) Index: src/sys/compat/linux/arch/amd64/linux_sysent.c diff -u src/sys/compat/linux/arch/amd64/linux_sysent.c:1.34 src/sys/compat/linux/arch/amd64/linux_sysent.c:1.35 --- src/sys/compat/linux/arch/amd64/linux_sysent.c:1.34 Wed Jun 17 14:20:08 2009 +++ src/sys/compat/linux/arch/amd64/linux_sysent.c Fri Oct 30 10:58:15 2009 @@ -1,14 +1,14 @@ -/* $NetBSD: linux_sysent.c,v 1.34 2009/06/17 14:20:08 njoly Exp $ */ +/* $NetBSD: linux_sysent.c,v 1
CVS commit: src/sys/compat/linux/arch/amd64
Module Name:src Committed By: njoly Date: Fri Oct 30 10:57:41 UTC 2009 Modified Files: src/sys/compat/linux/arch/amd64: syscalls.master Log Message: stat64 syscalls require struct linux_stat64. To generate a diff of this commit: cvs rdiff -u -r1.32 -r1.33 src/sys/compat/linux/arch/amd64/syscalls.master Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/compat/linux/arch/amd64/syscalls.master diff -u src/sys/compat/linux/arch/amd64/syscalls.master:1.32 src/sys/compat/linux/arch/amd64/syscalls.master:1.33 --- src/sys/compat/linux/arch/amd64/syscalls.master:1.32 Wed Jun 17 14:18:51 2009 +++ src/sys/compat/linux/arch/amd64/syscalls.master Fri Oct 30 10:57:40 2009 @@ -1,4 +1,4 @@ - $NetBSD: syscalls.master,v 1.32 2009/06/17 14:18:51 njoly Exp $ + $NetBSD: syscalls.master,v 1.33 2009/10/30 10:57:40 njoly Exp $ ; @(#)syscalls.master 8.1 (Berkeley) 7/19/93 @@ -70,11 +70,11 @@ int mode); } 3 NOARGS { int|sys||close(int fd); } 4 STD { int|linux_sys||stat64(const char *path, \ - struct linux_stat *sp); } + struct linux_stat64 *sp); } 5 STD { int|linux_sys||fstat64(int fd, \ - struct linux_stat *sp); } + struct linux_stat64 *sp); } 6 STD { int|linux_sys||lstat64(const char *path, \ - struct linux_stat *sp); } + struct linux_stat64 *sp); } 7 NOARGS { int|sys||poll(struct pollfd *fds, u_int nfds, \ int timeout); } 8 NOARGS { long|compat_43_sys||lseek(int fd, long offset, \
CVS commit: src/sys/compat/common
Module Name:src Committed By: yamt Date: Mon Oct 12 23:41:51 UTC 2009 Modified Files: src/sys/compat/common: kern_time_50.c Log Message: compat_50_sys_aio_suspend: - fix the buffer size. - use kmem_alloc instead of kmem_zalloc for buffers which we will overwrite soon. To generate a diff of this commit: cvs rdiff -u -r1.9 -r1.10 src/sys/compat/common/kern_time_50.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/compat/common/kern_time_50.c diff -u src/sys/compat/common/kern_time_50.c:1.9 src/sys/compat/common/kern_time_50.c:1.10 --- src/sys/compat/common/kern_time_50.c:1.9 Mon Oct 5 23:49:47 2009 +++ src/sys/compat/common/kern_time_50.c Mon Oct 12 23:41:51 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: kern_time_50.c,v 1.9 2009/10/05 23:49:47 rmind Exp $ */ +/* $NetBSD: kern_time_50.c,v 1.10 2009/10/12 23:41:51 yamt Exp $ */ /*- * Copyright (c) 2008, 2009 The NetBSD Foundation, Inc. @@ -29,7 +29,7 @@ * POSSIBILITY OF SUCH DAMAGE. */ #include -__KERNEL_RCSID(0, "$NetBSD: kern_time_50.c,v 1.9 2009/10/05 23:49:47 rmind Exp $"); +__KERNEL_RCSID(0, "$NetBSD: kern_time_50.c,v 1.10 2009/10/12 23:41:51 yamt Exp $"); #ifdef _KERNEL_OPT #include "opt_aio.h" @@ -386,13 +386,13 @@ return error; timespec50_to_timespec(&ts50, &ts); } - list = kmem_zalloc(nent * sizeof(struct aio_job), KM_SLEEP); - error = copyin(SCARG(uap, list), list, nent * sizeof(struct aiocb)); + list = kmem_alloc(nent * sizeof(*list), KM_SLEEP); + error = copyin(SCARG(uap, list), list, nent * sizeof(*list)); if (error) goto out; error = aio_suspend1(l, list, nent, SCARG(uap, timeout) ? &ts : NULL); out: - kmem_free(list, nent * sizeof(struct aio_job)); + kmem_free(list, nent * sizeof(*list)); return error; #else return ENOSYS;
CVS commit: src/sys/compat/linux/arch/i386
Module Name:src Committed By: taca Date: Sun Sep 20 10:29:30 UTC 2009 Modified Files: src/sys/compat/linux/arch/i386: linux_exec_machdep.c Log Message: Trying to fix build problem. Thanks to joerg's advise. To generate a diff of this commit: cvs rdiff -u -r1.12 -r1.13 \ src/sys/compat/linux/arch/i386/linux_exec_machdep.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/compat/linux/arch/i386/linux_exec_machdep.c diff -u src/sys/compat/linux/arch/i386/linux_exec_machdep.c:1.12 src/sys/compat/linux/arch/i386/linux_exec_machdep.c:1.13 --- src/sys/compat/linux/arch/i386/linux_exec_machdep.c:1.12 Sun Mar 29 01:02:50 2009 +++ src/sys/compat/linux/arch/i386/linux_exec_machdep.c Sun Sep 20 10:29:30 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: linux_exec_machdep.c,v 1.12 2009/03/29 01:02:50 mrg Exp $ */ +/* $NetBSD: linux_exec_machdep.c,v 1.13 2009/09/20 10:29:30 taca Exp $ */ /*- * Copyright (c) 2004 The NetBSD Foundation, Inc. @@ -30,7 +30,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: linux_exec_machdep.c,v 1.12 2009/03/29 01:02:50 mrg Exp $"); +__KERNEL_RCSID(0, "$NetBSD: linux_exec_machdep.c,v 1.13 2009/09/20 10:29:30 taca Exp $"); #if defined(_KERNEL_OPT) #include "opt_vm86.h" @@ -137,7 +137,7 @@ static __inline void load_gs(u_int sel) { -__asm __volatile("movl %0,%%gs" : : "rm" (sel)); +__asm __volatile("movw %0,%%gs" : : "rm" ((unsigned short)sel)); }
CVS commit: src/sys/compat/linux/common
Module Name:src Committed By: njoly Date: Thu Sep 3 17:15:17 UTC 2009 Modified Files: src/sys/compat/linux/common: linux_sched.c Log Message: Use correct sched_setscheduler syscall 3rd argument type. To generate a diff of this commit: cvs rdiff -u -r1.60 -r1.61 src/sys/compat/linux/common/linux_sched.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/compat/linux/common/linux_sched.c diff -u src/sys/compat/linux/common/linux_sched.c:1.60 src/sys/compat/linux/common/linux_sched.c:1.61 --- src/sys/compat/linux/common/linux_sched.c:1.60 Tue Jun 23 13:18:59 2009 +++ src/sys/compat/linux/common/linux_sched.c Thu Sep 3 17:15:17 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: linux_sched.c,v 1.60 2009/06/23 13:18:59 njoly Exp $ */ +/* $NetBSD: linux_sched.c,v 1.61 2009/09/03 17:15:17 njoly Exp $ */ /*- * Copyright (c) 1999 The NetBSD Foundation, Inc. @@ -35,7 +35,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: linux_sched.c,v 1.60 2009/06/23 13:18:59 njoly Exp $"); +__KERNEL_RCSID(0, "$NetBSD: linux_sched.c,v 1.61 2009/09/03 17:15:17 njoly Exp $"); #include #include @@ -351,7 +351,7 @@ /* { syscallarg(linux_pid_t) pid; syscallarg(int) policy; - syscallarg(cont struct linux_sched_scheduler *) sp; + syscallarg(cont struct linux_sched_param *) sp; } */ int error, policy; struct linux_sched_param lp;
CVS commit: src/sys/compat/irix
Module Name:src Committed By: dholland Date: Mon Aug 31 05:36:23 UTC 2009 Modified Files: src/sys/compat/irix: irix_kmem.c Log Message: Use uintptr_t instead of uint32_t as an intermediate stage when casting from off_t to a pointer. This way it compiles in a 64-bit world. Dunno if it'll work though with 64-bit mips kernel addresses, which are in the negative range of 64-bit off_t. To generate a diff of this commit: cvs rdiff -u -r1.9 -r1.10 src/sys/compat/irix/irix_kmem.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/compat/irix/irix_kmem.c diff -u src/sys/compat/irix/irix_kmem.c:1.9 src/sys/compat/irix/irix_kmem.c:1.10 --- src/sys/compat/irix/irix_kmem.c:1.9 Sat Mar 14 21:04:18 2009 +++ src/sys/compat/irix/irix_kmem.c Mon Aug 31 05:36:23 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: irix_kmem.c,v 1.9 2009/03/14 21:04:18 dsl Exp $ */ +/* $NetBSD: irix_kmem.c,v 1.10 2009/08/31 05:36:23 dholland Exp $ */ /*- * Copyright (c) 2002 The NetBSD Foundation, Inc. @@ -30,7 +30,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: irix_kmem.c,v 1.9 2009/03/14 21:04:18 dsl Exp $"); +__KERNEL_RCSID(0, "$NetBSD: irix_kmem.c,v 1.10 2009/08/31 05:36:23 dholland Exp $"); #include #include @@ -95,7 +95,7 @@ printf("irix_kmemread(): addr = %p\n", uio->uio_iov->iov_base); printf("irix_kmemread(): len = 0x%08lx\n", (long)uio->uio_iov->iov_len); #endif - offset = (void *)(uint32_t)uio->uio_offset; /* XXX */ + offset = (void *)(uintptr_t)uio->uio_offset; /* XXX */ if (offset == &averunnable) { /* load average */ struct irix_loadavg iav; int scale = averunnable.fscale / IRIX_LOADAVG_SCALE;
CVS commit: src/sys/compat/irix
Module Name:src Committed By: dholland Date: Mon Aug 31 05:34:16 UTC 2009 Modified Files: src/sys/compat/irix: irix_fcntl.c Log Message: Use uintptr_t instead of int when munging fcntl flags, which are pointer-sized integers. Now builds in a 64-bit world, might even work :-) To generate a diff of this commit: cvs rdiff -u -r1.26 -r1.27 src/sys/compat/irix/irix_fcntl.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/compat/irix/irix_fcntl.c diff -u src/sys/compat/irix/irix_fcntl.c:1.26 src/sys/compat/irix/irix_fcntl.c:1.27 --- src/sys/compat/irix/irix_fcntl.c:1.26 Sun Jun 28 09:50:57 2009 +++ src/sys/compat/irix/irix_fcntl.c Mon Aug 31 05:34:16 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: irix_fcntl.c,v 1.26 2009/06/28 09:50:57 tsutsui Exp $ */ +/* $NetBSD: irix_fcntl.c,v 1.27 2009/08/31 05:34:16 dholland Exp $ */ /*- * Copyright (c) 2001-2002 The NetBSD Foundation, Inc. @@ -30,7 +30,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: irix_fcntl.c,v 1.26 2009/06/28 09:50:57 tsutsui Exp $"); +__KERNEL_RCSID(0, "$NetBSD: irix_fcntl.c,v 1.27 2009/08/31 05:34:16 dholland Exp $"); #include #include @@ -62,8 +62,8 @@ #include static int fd_truncate(struct lwp *, int, int, off_t, register_t *); -static int bsd_to_irix_fcntl_flags(int); -static int irix_to_bsd_fcntl_flags(int); +static uintptr_t bsd_to_irix_fcntl_flags(uintptr_t); +static uintptr_t irix_to_bsd_fcntl_flags(uintptr_t); int irix_sys_lseek64(struct lwp *l, const struct irix_sys_lseek64_args *uap, register_t *retval) @@ -161,12 +161,12 @@ * All unsupported flags are silently ignored * except FDIRECT taht will return EINVAL */ - if ((int)SCARG(uap, arg) & IRIX_FDIRECT) + if ((uintptr_t)SCARG(uap, arg) & IRIX_FDIRECT) return EINVAL; SCARG(&bsd_ua, fd) = SCARG(uap, fd); SCARG(&bsd_ua, arg) = - (char *)irix_to_bsd_fcntl_flags((int)SCARG(uap, arg)); + (char *)irix_to_bsd_fcntl_flags((uintptr_t)SCARG(uap, arg)); SCARG(&bsd_ua, cmd) = F_SETFL; return sys_fcntl(l, &bsd_ua, retval); break; @@ -329,10 +329,10 @@ return 0; } -static int -irix_to_bsd_fcntl_flags(int flags) +static uintptr_t +irix_to_bsd_fcntl_flags(uintptr_t flags) { - int ret = 0; + uintptr_t ret = 0; if (flags & IRIX_FNDELAY) ret |= FNDELAY; if (flags & IRIX_FAPPEND) ret |= FAPPEND; @@ -355,10 +355,10 @@ return ret; } -static int -bsd_to_irix_fcntl_flags(int flags) +static uintptr_t +bsd_to_irix_fcntl_flags(uintptr_t flags) { - int ret = 0; + uintptr_t ret = 0; if (flags & FNDELAY) ret |= IRIX_FNDELAY; if (flags & FAPPEND) ret |= IRIX_FAPPEND;
CVS commit: src/sys/compat/linux/common
Module Name:src Committed By: dholland Date: Fri Aug 28 01:39:03 UTC 2009 Modified Files: src/sys/compat/linux/common: linux_uselib.c Log Message: Another one that needs . To generate a diff of this commit: cvs rdiff -u -r1.29 -r1.30 src/sys/compat/linux/common/linux_uselib.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/compat/linux/common/linux_uselib.c diff -u src/sys/compat/linux/common/linux_uselib.c:1.29 src/sys/compat/linux/common/linux_uselib.c:1.30 --- src/sys/compat/linux/common/linux_uselib.c:1.29 Sat Aug 15 23:39:35 2009 +++ src/sys/compat/linux/common/linux_uselib.c Fri Aug 28 01:39:03 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: linux_uselib.c,v 1.29 2009/08/15 23:39:35 matt Exp $ */ +/* $NetBSD: linux_uselib.c,v 1.30 2009/08/28 01:39:03 dholland Exp $ */ /*- * Copyright (c) 1995, 1998 The NetBSD Foundation, Inc. @@ -30,7 +30,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: linux_uselib.c,v 1.29 2009/08/15 23:39:35 matt Exp $"); +__KERNEL_RCSID(0, "$NetBSD: linux_uselib.c,v 1.30 2009/08/28 01:39:03 dholland Exp $"); #include #include @@ -41,6 +41,7 @@ #include #include #include +#include #include #include @@ -48,11 +49,6 @@ #include #include -#ifndef EXEC_AOUT -/* define EXEC_AOUT to get prototype from linux_syscall.h */ -#define EXEC_AOUT -#endif - #include #include #include @@ -61,6 +57,11 @@ #include #include +#ifndef EXEC_AOUT +/* define EXEC_AOUT to get prototype from linux_syscall.h */ +#define EXEC_AOUT +#endif + #include #include
CVS commit: src/sys/compat/ossaudio
Module Name:src Committed By: christos Date: Sat Aug 22 23:31:16 UTC 2009 Modified Files: src/sys/compat/ossaudio: ossaudio.c Log Message: add a lot more debugging and error checking. Alas, skype seems to be happy getting back our values, but still does not work. To generate a diff of this commit: cvs rdiff -u -r1.64 -r1.65 src/sys/compat/ossaudio/ossaudio.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/compat/ossaudio/ossaudio.c diff -u src/sys/compat/ossaudio/ossaudio.c:1.64 src/sys/compat/ossaudio/ossaudio.c:1.65 --- src/sys/compat/ossaudio/ossaudio.c:1.64 Thu Nov 13 05:05:52 2008 +++ src/sys/compat/ossaudio/ossaudio.c Sat Aug 22 19:31:16 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: ossaudio.c,v 1.64 2008/11/13 10:05:52 ad Exp $ */ +/* $NetBSD: ossaudio.c,v 1.65 2009/08/22 23:31:16 christos Exp $ */ /*- * Copyright (c) 1997, 2008 The NetBSD Foundation, Inc. @@ -27,7 +27,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: ossaudio.c,v 1.64 2008/11/13 10:05:52 ad Exp $"); +__KERNEL_RCSID(0, "$NetBSD: ossaudio.c,v 1.65 2009/08/22 23:31:16 christos Exp $"); #include #include @@ -66,6 +66,88 @@ static void setblocksize(file_t *, struct audio_info *); +#ifdef AUDIO_DEBUG +static const char * +compat_ossaudio_getcmd(u_long cmd) +{ + static char buf[64]; + switch (cmd) { +#define _DO(_a) \ + case _a: \ + return # _a; +_DO(OSS_SNDCTL_DSP_RESET) +_DO(OSS_SNDCTL_DSP_SYNC) +_DO(OSS_SNDCTL_DSP_SPEED) +_DO(OSS_SOUND_PCM_READ_RATE) +_DO(OSS_SNDCTL_DSP_STEREO) +_DO(OSS_SNDCTL_DSP_GETBLKSIZE) +_DO(OSS_SNDCTL_DSP_SETFMT) +_DO(OSS_SOUND_PCM_READ_BITS) +_DO(OSS_SNDCTL_DSP_CHANNELS) +_DO(OSS_SOUND_PCM_READ_CHANNELS) +_DO(OSS_SOUND_PCM_WRITE_FILTER) +_DO(OSS_SOUND_PCM_READ_FILTER) +_DO(OSS_SNDCTL_DSP_POST) +_DO(OSS_SNDCTL_DSP_SUBDIVIDE) +_DO(OSS_SNDCTL_DSP_SETFRAGMENT) +_DO(OSS_SNDCTL_DSP_GETFMTS) +_DO(OSS_SNDCTL_DSP_GETOSPACE) +_DO(OSS_SNDCTL_DSP_GETISPACE) +_DO(OSS_SNDCTL_DSP_NONBLOCK) +_DO(OSS_SNDCTL_DSP_GETCAPS) +_DO(OSS_SNDCTL_DSP_GETTRIGGER) +_DO(OSS_SNDCTL_DSP_SETTRIGGER) +_DO(OSS_SNDCTL_DSP_GETIPTR) +_DO(OSS_SNDCTL_DSP_GETOPTR) +_DO(OSS_SNDCTL_DSP_MAPINBUF) +_DO(OSS_SNDCTL_DSP_MAPOUTBUF) +_DO(OSS_SNDCTL_DSP_SETSYNCRO) +_DO(OSS_SNDCTL_DSP_SETDUPLEX) +_DO(OSS_SNDCTL_DSP_GETODELAY) +_DO(OSS_SNDCTL_DSP_PROFILE) +_DO(OSS_SOUND_MIXER_INFO) +_DO(OSS_SOUND_OLD_MIXER_INFO) +_DO(OSS_GET_VERSION) +_DO(OSS_SEQ_RESET) +_DO(OSS_SEQ_SYNC) +_DO(OSS_SYNTH_INFO) +_DO(OSS_SEQ_CTRLRATE) +_DO(OSS_SEQ_GETOUTCOUNT) +_DO(OSS_SEQ_GETINCOUNT) +_DO(OSS_SEQ_PERCMODE) +_DO(OSS_SEQ_TESTMIDI) +_DO(OSS_SEQ_RESETSAMPLES) +_DO(OSS_SEQ_NRSYNTHS) +_DO(OSS_SEQ_NRMIDIS) +#ifdef notyet +_DO(OSS_MIDI_INFO) +#endif +_DO(OSS_SEQ_THRESHOLD) +_DO(OSS_MEMAVL) +_DO(OSS_FM_4OP_ENABLE) +_DO(OSS_SEQ_PANIC) +_DO(OSS_SEQ_OUTOFBAND) +_DO(OSS_SEQ_GETTIME) +_DO(OSS_ID) +_DO(OSS_CONTROL) +_DO(OSS_REMOVESAMPLE) +_DO(OSS_TMR_TIMEBASE) +_DO(OSS_TMR_START) +_DO(OSS_TMR_STOP) +_DO(OSS_TMR_CONTINUE) +_DO(OSS_TMR_TEMPO) +_DO(OSS_TMR_SOURCE) +_DO(OSS_TMR_METRONOME) +_DO(OSS_TMR_SELECT) +#undef _DO + default: + (void)snprintf(buf, sizeof(buf), "*0x%lx*", cmd); + return buf; + } +} +#endif + + static int compat_ossaudio_modcmd(modcmd_t cmd, void *arg) { @@ -108,7 +190,7 @@ } com = SCARG(uap, com); - DPRINTF(("oss_ioctl_audio: com=%08lx\n", com)); + DPRINTF(("%s: com=%s\n", __func__, compat_ossaudio_getcmd(com))); retval[0] = 0; @@ -116,13 +198,17 @@ switch (com) { case OSS_SNDCTL_DSP_RESET: error = ioctlf(fp, AUDIO_FLUSH, NULL); - if (error) + if (error) { + DPRINTF(("%s: AUDIO_FLUSH %d\n", __func__, error)); goto out; + } break; case OSS_SNDCTL_DSP_SYNC: error = ioctlf(fp, AUDIO_DRAIN, NULL); - if (error) + if (error) { + DPRINTF(("%s: AUDIO_DRAIN %d\n", __func__, error)); goto out; + } break; case OSS_SNDCTL_DSP_POST: /* This call is merely advisory, and may be a nop. */ @@ -130,56 +216,93 @@ case OSS_SNDCTL_DSP_SPEED: AUDIO_INITINFO(&tmpinfo); error = copyin(SCARG(uap, data), &idat, sizeof idat); - if (error) + if (error) { + DPRINTF(("%s: SNDCTL_DSP_SPEED %d\n", + __func__, error)); goto out; + } tmpinfo.play.sample_rate = tmpinfo.record.sample_rate = idat; + DPRINTF(("%s: SNDCTL_DSP_SPEED > %d\n", __func__, idat)); error = ioctlf(fp, AUDIO_SETINFO, &tmpinfo); - DPRINTF(("oss_sys_ioctl: SNDCTL_DSP_SPEED %d = %d\n", - idat, error)); - if (error) + if (error) { + DPRINTF(("%s: SNDCTL_DSP_SPEED %d = %d\n", + __func__, idat, error)); goto out; + } /* fall into ... */ case OSS_SOUND_PCM_READ_RATE: error = ioctlf(fp, AUDIO_GETBUFINFO, &tmpinfo); - if (error) + if (error) { + DPRINTF(("%s: AUDIO_GETBUFINFO %d\n", + __func__, error)); goto out; + } idat = tmpinfo.play.sample_rate; + DPRINTF(("%s: SNDCTL_PCM_READ_RATE < %d\n", __func__, idat)); error = copyout(&idat, SCARG(uap, data), sizeof idat); - if (error) + if
CVS commit: src/sys/compat/linux/common
Module Name:src Committed By: drochner Date: Tue Aug 18 11:22:09 UTC 2009 Modified Files: src/sys/compat/linux/common: linux_ipccall.c linux_ipccall.h Log Message: remove some "inline" from functions which are defined in a .c file but used elsewhere -- gcc-4.4.1 doesn't like it and I doubt it had any effect To generate a diff of this commit: cvs rdiff -u -r1.31 -r1.32 src/sys/compat/linux/common/linux_ipccall.c cvs rdiff -u -r1.14 -r1.15 src/sys/compat/linux/common/linux_ipccall.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/compat/linux/common/linux_ipccall.c diff -u src/sys/compat/linux/common/linux_ipccall.c:1.31 src/sys/compat/linux/common/linux_ipccall.c:1.32 --- src/sys/compat/linux/common/linux_ipccall.c:1.31 Mon Apr 28 20:23:43 2008 +++ src/sys/compat/linux/common/linux_ipccall.c Tue Aug 18 11:22:09 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: linux_ipccall.c,v 1.31 2008/04/28 20:23:43 martin Exp $ */ +/* $NetBSD: linux_ipccall.c,v 1.32 2009/08/18 11:22:09 drochner Exp $ */ /*- * Copyright (c) 1998 The NetBSD Foundation, Inc. @@ -30,7 +30,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: linux_ipccall.c,v 1.31 2008/04/28 20:23:43 martin Exp $"); +__KERNEL_RCSID(0, "$NetBSD: linux_ipccall.c,v 1.32 2009/08/18 11:22:09 drochner Exp $"); #if defined(_KERNEL_OPT) #include "opt_sysv.h" @@ -160,7 +160,7 @@ } #ifdef SYSVSEM -inline int +int linux_semop(struct lwp *l, const struct linux_sys_ipc_args *uap, register_t *retval) { /* { @@ -179,7 +179,7 @@ return sys_semop(l, &bsa, retval); } -inline int +int linux_semget(struct lwp *l, const struct linux_sys_ipc_args *uap, register_t *retval) { /* { @@ -202,7 +202,7 @@ #ifdef SYSVMSG -inline int +int linux_msgsnd(struct lwp *l, const struct linux_sys_ipc_args *uap, register_t *retval) { struct sys_msgsnd_args bma; @@ -215,7 +215,7 @@ return sys_msgsnd(l, &bma, retval); } -inline int +int linux_msgrcv(struct lwp *l, const struct linux_sys_ipc_args *uap, register_t *retval) { struct sys_msgrcv_args bma; @@ -234,7 +234,7 @@ return sys_msgrcv(l, &bma, retval); } -inline int +int linux_msgget(struct lwp *l, const struct linux_sys_ipc_args *uap, register_t *retval) { struct sys_msgget_args bma; @@ -252,7 +252,7 @@ * shmdt(): this could have been mapped directly, if it wasn't for * the extra indirection by the linux_ipc system call. */ -inline int +int linux_shmdt(struct lwp *l, const struct linux_sys_ipc_args *uap, register_t *retval) { struct sys_shmdt_args bsa; @@ -265,7 +265,7 @@ /* * Same story as shmdt. */ -inline int +int linux_shmget(struct lwp *l, const struct linux_sys_ipc_args *uap, register_t *retval) { struct linux_sys_shmget_args bsa; Index: src/sys/compat/linux/common/linux_ipccall.h diff -u src/sys/compat/linux/common/linux_ipccall.h:1.14 src/sys/compat/linux/common/linux_ipccall.h:1.15 --- src/sys/compat/linux/common/linux_ipccall.h:1.14 Mon Apr 28 20:23:43 2008 +++ src/sys/compat/linux/common/linux_ipccall.h Tue Aug 18 11:22:09 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: linux_ipccall.h,v 1.14 2008/04/28 20:23:43 martin Exp $ */ +/* $NetBSD: linux_ipccall.h,v 1.15 2009/08/18 11:22:09 drochner Exp $ */ /*- * Copyright (c) 1995, 1998 The NetBSD Foundation, Inc. @@ -59,27 +59,27 @@ # ifdef SYSVSEM -__inline int linux_semop(struct lwp *, const struct linux_sys_ipc_args *, +int linux_semop(struct lwp *, const struct linux_sys_ipc_args *, register_t *); -__inline int linux_semget(struct lwp *, const struct linux_sys_ipc_args *, +int linux_semget(struct lwp *, const struct linux_sys_ipc_args *, register_t *); # endif # ifdef SYSVMSG -__inline int linux_msgsnd(struct lwp *, const struct linux_sys_ipc_args *, +int linux_msgsnd(struct lwp *, const struct linux_sys_ipc_args *, register_t *); -__inline int linux_msgrcv(struct lwp *, const struct linux_sys_ipc_args *, +int linux_msgrcv(struct lwp *, const struct linux_sys_ipc_args *, register_t *); -__inline int linux_msgget(struct lwp *, const struct linux_sys_ipc_args *, +int linux_msgget(struct lwp *, const struct linux_sys_ipc_args *, register_t *); # endif # ifdef SYSVSHM -__inline int linux_shmdt(struct lwp *, const struct linux_sys_ipc_args *, +int linux_shmdt(struct lwp *, const struct linux_sys_ipc_args *, register_t *); -__inline int linux_shmget(struct lwp *, const struct linux_sys_ipc_args *, +int linux_shmget(struct lwp *, const struct linux_sys_ipc_args *, register_t *); # endif
CVS commit: src/sys/compat/linux/common
Module Name:src Committed By: christos Date: Tue Aug 18 02:04:14 UTC 2009 Modified Files: src/sys/compat/linux/common: linux_oldmmap.c Log Message: more debugging for mmap To generate a diff of this commit: cvs rdiff -u -r1.71 -r1.72 src/sys/compat/linux/common/linux_oldmmap.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/compat/linux/common/linux_oldmmap.c diff -u src/sys/compat/linux/common/linux_oldmmap.c:1.71 src/sys/compat/linux/common/linux_oldmmap.c:1.72 --- src/sys/compat/linux/common/linux_oldmmap.c:1.71 Wed Dec 3 07:51:11 2008 +++ src/sys/compat/linux/common/linux_oldmmap.c Mon Aug 17 22:04:14 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: linux_oldmmap.c,v 1.71 2008/12/03 12:51:11 ad Exp $ */ +/* $NetBSD: linux_oldmmap.c,v 1.72 2009/08/18 02:04:14 christos Exp $ */ /*- * Copyright (c) 1995, 1998 The NetBSD Foundation, Inc. @@ -30,7 +30,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: linux_oldmmap.c,v 1.71 2008/12/03 12:51:11 ad Exp $"); +__KERNEL_RCSID(0, "$NetBSD: linux_oldmmap.c,v 1.72 2009/08/18 02:04:14 christos Exp $"); #include #include @@ -86,8 +86,10 @@ if ((error = copyin(SCARG(uap, lmp), &lmap, sizeof lmap))) return error; - if (lmap.lm_offset & PAGE_MASK) + if (lmap.lm_offset & PAGE_MASK) { + DPRINTF(("old_mmap: 0x%x\n", lmap.lm_offset)); return EINVAL; + } SCARG(&nlmap,addr) = lmap.lm_addr; SCARG(&nlmap,len) = lmap.lm_len; @@ -95,9 +97,10 @@ SCARG(&nlmap,flags) = lmap.lm_flags; SCARG(&nlmap,fd) = lmap.lm_fd; SCARG(&nlmap,offset) = lmap.lm_offset; - DPRINTF(("old_mmap(%#x, %u, %u, %u, %d, %u)\n", + error = linux_sys_mmap(l, &nlmap, retval); + DPRINTF(("old_mmap(%#x, %u, %u, %u, %d, %u) = %d\n", lmap.lm_addr, lmap.lm_len, lmap.lm_prot, lmap.lm_flags, - lmap.lm_fd, lmap.lm_offset)); - return linux_sys_mmap(l, &nlmap, retval); + lmap.lm_fd, lmap.lm_offset, error)); + return error; }
CVS commit: src/sys/compat/linux32/common
Module Name:src Committed By: christos Date: Tue Aug 18 02:02:58 UTC 2009 Modified Files: src/sys/compat/linux32/common: linux32_ioctl.c Log Message: add the video ioctls so that the 32 bit skype works with video more commits to come To generate a diff of this commit: cvs rdiff -u -r1.12 -r1.13 src/sys/compat/linux32/common/linux32_ioctl.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/compat/linux32/common/linux32_ioctl.c diff -u src/sys/compat/linux32/common/linux32_ioctl.c:1.12 src/sys/compat/linux32/common/linux32_ioctl.c:1.13 --- src/sys/compat/linux32/common/linux32_ioctl.c:1.12 Wed Nov 19 13:36:04 2008 +++ src/sys/compat/linux32/common/linux32_ioctl.c Mon Aug 17 22:02:58 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: linux32_ioctl.c,v 1.12 2008/11/19 18:36:04 ad Exp $ */ +/* $NetBSD: linux32_ioctl.c,v 1.13 2009/08/18 02:02:58 christos Exp $ */ /*- * Copyright (c) 2006 Emmanuel Dreyfus, all rights reserved. @@ -32,12 +32,13 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: linux32_ioctl.c,v 1.12 2008/11/19 18:36:04 ad Exp $"); +__KERNEL_RCSID(0, "$NetBSD: linux32_ioctl.c,v 1.13 2009/08/18 02:02:58 christos Exp $"); #include #include #include #include +#include #include #include @@ -102,6 +103,23 @@ break; } break; + case 'V': /* video4linux2 */ + case 'd': /* drm */ + { + struct sys_ioctl_args ua; + u_long com = 0; + if (SCARG(uap, com) & IOC_IN) + com |= IOC_OUT; + if (SCARG(uap, com) & IOC_OUT) + com |= IOC_IN; + SCARG(&ua, fd) = SCARG(uap, fd); + SCARG(&ua, com) = SCARG(uap, com); + SCARG(&ua, com) &= ~IOC_DIRMASK; + SCARG(&ua, com) |= com; + SCARG(&ua, data) = SCARG_P32(uap, data); + error = sys_ioctl(l, (const void *)&ua, retval); + break; + } case 0x89: error = linux32_ioctl_socket(l, uap, retval); break;
CVS commit: src/sys/compat/m68k4k
Module Name:src Committed By: cegger Date: Mon Aug 17 06:00:05 UTC 2009 Modified Files: src/sys/compat/m68k4k: m68k4k_exec.c Log Message: buildfix: #include To generate a diff of this commit: cvs rdiff -u -r1.21 -r1.22 src/sys/compat/m68k4k/m68k4k_exec.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/compat/m68k4k/m68k4k_exec.c diff -u src/sys/compat/m68k4k/m68k4k_exec.c:1.21 src/sys/compat/m68k4k/m68k4k_exec.c:1.22 --- src/sys/compat/m68k4k/m68k4k_exec.c:1.21 Fri Nov 21 19:55:38 2008 +++ src/sys/compat/m68k4k/m68k4k_exec.c Mon Aug 17 06:00:05 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: m68k4k_exec.c,v 1.21 2008/11/21 19:55:38 he Exp $ */ +/* $NetBSD: m68k4k_exec.c,v 1.22 2009/08/17 06:00:05 cegger Exp $ */ /* * Copyright (c) 1993, 1994 Christopher G. Demetriou @@ -41,7 +41,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: m68k4k_exec.c,v 1.21 2008/11/21 19:55:38 he Exp $"); +__KERNEL_RCSID(0, "$NetBSD: m68k4k_exec.c,v 1.22 2009/08/17 06:00:05 cegger Exp $"); #if !defined(__m68k__) #error YOU GOTTA BE KIDDING! @@ -54,6 +54,7 @@ #include #include #include +#include #include #include
CVS commit: src/sys/compat/freebsd
Module Name:src Committed By: martin Date: Sun Aug 16 15:41:51 UTC 2009 Modified Files: src/sys/compat/freebsd: freebsd_mod.c Log Message: Add missing include To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 src/sys/compat/freebsd/freebsd_mod.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/compat/freebsd/freebsd_mod.c diff -u src/sys/compat/freebsd/freebsd_mod.c:1.1 src/sys/compat/freebsd/freebsd_mod.c:1.2 --- src/sys/compat/freebsd/freebsd_mod.c:1.1 Wed Nov 19 18:36:02 2008 +++ src/sys/compat/freebsd/freebsd_mod.c Sun Aug 16 15:41:51 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: freebsd_mod.c,v 1.1 2008/11/19 18:36:02 ad Exp $ */ +/* $NetBSD: freebsd_mod.c,v 1.2 2009/08/16 15:41:51 martin Exp $ */ /*- * Copyright (c) 2008 The NetBSD Foundation, Inc. @@ -30,7 +30,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: freebsd_mod.c,v 1.1 2008/11/19 18:36:02 ad Exp $"); +__KERNEL_RCSID(0, "$NetBSD: freebsd_mod.c,v 1.2 2009/08/16 15:41:51 martin Exp $"); #ifdef _KERNEL_OPT #include "opt_execfmt.h" @@ -40,6 +40,7 @@ #include #include #include +#include #include #include
CVS commit: src/sys/compat/freebsd
Module Name:src Committed By: martin Date: Sun Aug 16 15:39:30 UTC 2009 Modified Files: src/sys/compat/freebsd: freebsd_exec_aout.c Log Message: Include for a.out specific defines. To generate a diff of this commit: cvs rdiff -u -r1.8 -r1.9 src/sys/compat/freebsd/freebsd_exec_aout.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/compat/freebsd/freebsd_exec_aout.c diff -u src/sys/compat/freebsd/freebsd_exec_aout.c:1.8 src/sys/compat/freebsd/freebsd_exec_aout.c:1.9 --- src/sys/compat/freebsd/freebsd_exec_aout.c:1.8 Sat Dec 8 18:35:58 2007 +++ src/sys/compat/freebsd/freebsd_exec_aout.c Sun Aug 16 15:39:30 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: freebsd_exec_aout.c,v 1.8 2007/12/08 18:35:58 dsl Exp $ */ +/* $NetBSD: freebsd_exec_aout.c,v 1.9 2009/08/16 15:39:30 martin Exp $ */ /* * Copyright (c) 1993, 1994 Christopher G. Demetriou @@ -31,12 +31,13 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: freebsd_exec_aout.c,v 1.8 2007/12/08 18:35:58 dsl Exp $"); +__KERNEL_RCSID(0, "$NetBSD: freebsd_exec_aout.c,v 1.9 2009/08/16 15:39:30 martin Exp $"); #include #include #include #include +#include #ifndef EXEC_AOUT #define EXEC_AOUT /* to get a.out specific stuff */
CVS commit: src/sys/compat
Module Name:src Committed By: matt Date: Sat Aug 15 23:39:35 UTC 2009 Modified Files: src/sys/compat/common: compat_exec.c src/sys/compat/linux/common: linux_exec.h linux_exec_aout.c linux_uselib.c src/sys/compat/netbsd32: netbsd32_exec.h src/sys/compat/sunos: sunos_exec_aout.c src/sys/compat/vax1k: vax1k_exec.h Log Message: Include explicitly instead of relying on to do it for you. To generate a diff of this commit: cvs rdiff -u -r1.16 -r1.17 src/sys/compat/common/compat_exec.c cvs rdiff -u -r1.45 -r1.46 src/sys/compat/linux/common/linux_exec.h cvs rdiff -u -r1.65 -r1.66 src/sys/compat/linux/common/linux_exec_aout.c cvs rdiff -u -r1.28 -r1.29 src/sys/compat/linux/common/linux_uselib.c cvs rdiff -u -r1.29 -r1.30 src/sys/compat/netbsd32/netbsd32_exec.h cvs rdiff -u -r1.17 -r1.18 src/sys/compat/sunos/sunos_exec_aout.c cvs rdiff -u -r1.7 -r1.8 src/sys/compat/vax1k/vax1k_exec.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/compat/common/compat_exec.c diff -u src/sys/compat/common/compat_exec.c:1.16 src/sys/compat/common/compat_exec.c:1.17 --- src/sys/compat/common/compat_exec.c:1.16 Thu Aug 13 03:53:13 2009 +++ src/sys/compat/common/compat_exec.c Sat Aug 15 23:39:35 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: compat_exec.c,v 1.16 2009/08/13 03:53:13 matt Exp $ */ +/* $NetBSD: compat_exec.c,v 1.17 2009/08/15 23:39:35 matt Exp $ */ /* * Copyright (c) 1993, 1994 Christopher G. Demetriou @@ -31,7 +31,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: compat_exec.c,v 1.16 2009/08/13 03:53:13 matt Exp $"); +__KERNEL_RCSID(0, "$NetBSD: compat_exec.c,v 1.17 2009/08/15 23:39:35 matt Exp $"); #ifdef _KERNEL_OPT #include "opt_execfmt.h" @@ -45,6 +45,8 @@ #include #ifdef EXEC_AOUT +#include + /* * exec_aout_prep_oldzmagic(): * Prepare the vmcmds to build a vmspace for an old ZMAGIC Index: src/sys/compat/linux/common/linux_exec.h diff -u src/sys/compat/linux/common/linux_exec.h:1.45 src/sys/compat/linux/common/linux_exec.h:1.46 --- src/sys/compat/linux/common/linux_exec.h:1.45 Wed Nov 19 18:36:03 2008 +++ src/sys/compat/linux/common/linux_exec.h Sat Aug 15 23:39:35 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: linux_exec.h,v 1.45 2008/11/19 18:36:03 ad Exp $ */ +/* $NetBSD: linux_exec.h,v 1.46 2009/08/15 23:39:35 matt Exp $ */ /*- * Copyright (c) 1995, 1998 The NetBSD Foundation, Inc. @@ -32,6 +32,10 @@ #ifndef _LINUX_EXEC_H #define _LINUX_EXEC_H +#if defined(EXEC_AOUT) +#include +#endif + #if defined(EXEC_ELF32) || defined(EXEC_ELF64) #include #endif @@ -125,9 +129,11 @@ int linux_sysctl(int *, u_int, void *, size_t *, void *, size_t, struct lwp *); void linux_setregs(struct lwp *, struct exec_package *, u_long); +#ifdef EXEC_AOUT int exec_linux_aout_makecmds(struct lwp *, struct exec_package *); int linux_aout_copyargs(struct lwp *, struct exec_package *, struct ps_strings *, char **, void *); +#endif void linux_trapsignal(struct lwp *, ksiginfo_t *); int linux_usertrap(struct lwp *, vaddr_t, void *); #ifdef LINUX_NPTL Index: src/sys/compat/linux/common/linux_exec_aout.c diff -u src/sys/compat/linux/common/linux_exec_aout.c:1.65 src/sys/compat/linux/common/linux_exec_aout.c:1.66 --- src/sys/compat/linux/common/linux_exec_aout.c:1.65 Mon Apr 28 20:23:43 2008 +++ src/sys/compat/linux/common/linux_exec_aout.c Sat Aug 15 23:39:35 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: linux_exec_aout.c,v 1.65 2008/04/28 20:23:43 martin Exp $ */ +/* $NetBSD: linux_exec_aout.c,v 1.66 2009/08/15 23:39:35 matt Exp $ */ /*- * Copyright (c) 1995, 1998 The NetBSD Foundation, Inc. @@ -34,7 +34,11 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: linux_exec_aout.c,v 1.65 2008/04/28 20:23:43 martin Exp $"); +__KERNEL_RCSID(0, "$NetBSD: linux_exec_aout.c,v 1.66 2009/08/15 23:39:35 matt Exp $"); + +#ifdef _KERNEL_OPT +#include "opt_execfmt.h" +#endif #include #include @@ -45,7 +49,6 @@ #include #include #include -#include #include #include Index: src/sys/compat/linux/common/linux_uselib.c diff -u src/sys/compat/linux/common/linux_uselib.c:1.28 src/sys/compat/linux/common/linux_uselib.c:1.29 --- src/sys/compat/linux/common/linux_uselib.c:1.28 Mon Jun 29 05:08:16 2009 +++ src/sys/compat/linux/common/linux_uselib.c Sat Aug 15 23:39:35 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: linux_uselib.c,v 1.28 2009/06/29 05:08:16 dholland Exp $ */ +/* $NetBSD: linux_uselib.c,v 1.29 2009/08/15 23:39:35 matt Exp $ */ /*- * Copyright (c) 1995, 1998 The NetBSD Foundation, Inc. @@ -30,7 +30,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: linux_uselib.c,v 1.28 2009/06/29 05:08:16 dholland Exp $"); +__KERNEL_RCSID(0, "$NetBSD: linux_uselib.c,v 1.29 2009/08/15 23:39:35 matt Exp $"); #include #include @@ -41,7 +41,6 @@ #include #include #include -#include #include #include @@ -49,6 +48,11 @@ #include #include +#ifndef EXEC_AOUT +/*
CVS commit: src/sys/compat/linux/arch/mips
Module Name:src Committed By: matt Date: Thu Aug 13 03:56:32 UTC 2009 Modified Files: src/sys/compat/linux/arch/mips: linux_exec.h Log Message: Don't include EXEC_AOUT stuff by default. To generate a diff of this commit: cvs rdiff -u -r1.13 -r1.14 src/sys/compat/linux/arch/mips/linux_exec.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/compat/linux/arch/mips/linux_exec.h diff -u src/sys/compat/linux/arch/mips/linux_exec.h:1.13 src/sys/compat/linux/arch/mips/linux_exec.h:1.14 --- src/sys/compat/linux/arch/mips/linux_exec.h:1.13 Mon Apr 28 20:23:43 2008 +++ src/sys/compat/linux/arch/mips/linux_exec.h Thu Aug 13 03:56:32 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: linux_exec.h,v 1.13 2008/04/28 20:23:43 martin Exp $ */ +/* $NetBSD: linux_exec.h,v 1.14 2009/08/13 03:56:32 matt Exp $ */ /*- * Copyright (c) 1998, 2001 The NetBSD Foundation, Inc. @@ -32,7 +32,9 @@ #ifndef _MIPS_LINUX_EXEC_H #define _MIPS_LINUX_EXEC_H +#ifdef EXEC_AOUT #include +#endif #include #include @@ -41,11 +43,13 @@ */ #define LINUX_ELF_HWCAP (0) +#ifdef EXEC_AOUT /* * Linux a.out format parameters */ #define LINUX_M_MIPS MID_MIPS #define LINUX_MID_MACHINE LINUX_M_MIPS +#endif /* * Linux Elf32 format parameters
CVS commit: src/sys/compat/common
Module Name:src Committed By: matt Date: Thu Aug 13 03:53:13 UTC 2009 Modified Files: src/sys/compat/common: compat_exec.c Log Message: #include "opt_execfmt.h" and only compile innards if EXEC_AOUT is defined. To generate a diff of this commit: cvs rdiff -u -r1.15 -r1.16 src/sys/compat/common/compat_exec.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/compat/common/compat_exec.c diff -u src/sys/compat/common/compat_exec.c:1.15 src/sys/compat/common/compat_exec.c:1.16 --- src/sys/compat/common/compat_exec.c:1.15 Sat Dec 8 18:35:53 2007 +++ src/sys/compat/common/compat_exec.c Thu Aug 13 03:53:13 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: compat_exec.c,v 1.15 2007/12/08 18:35:53 dsl Exp $ */ +/* $NetBSD: compat_exec.c,v 1.16 2009/08/13 03:53:13 matt Exp $ */ /* * Copyright (c) 1993, 1994 Christopher G. Demetriou @@ -31,7 +31,11 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: compat_exec.c,v 1.15 2007/12/08 18:35:53 dsl Exp $"); +__KERNEL_RCSID(0, "$NetBSD: compat_exec.c,v 1.16 2009/08/13 03:53:13 matt Exp $"); + +#ifdef _KERNEL_OPT +#include "opt_execfmt.h" +#endif #include #include @@ -40,6 +44,7 @@ #include #include +#ifdef EXEC_AOUT /* * exec_aout_prep_oldzmagic(): * Prepare the vmcmds to build a vmspace for an old ZMAGIC @@ -174,3 +179,4 @@ epp->ep_dsize = (dsize > 0) ? dsize : 0; return (*epp->ep_esch->es_setup_stack)(l, epp); } +#endif /* EXEC_AOUT */
CVS commit: src/sys/compat/svr4_32
Module Name:src Committed By: rjs Date: Mon Aug 10 17:36:00 UTC 2009 Modified Files: src/sys/compat/svr4_32: svr4_32_misc.c Log Message: Add enum uio_seg argument to do_sys_mknod(). To generate a diff of this commit: cvs rdiff -u -r1.64 -r1.65 src/sys/compat/svr4_32/svr4_32_misc.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/compat/svr4_32/svr4_32_misc.c diff -u src/sys/compat/svr4_32/svr4_32_misc.c:1.64 src/sys/compat/svr4_32/svr4_32_misc.c:1.65 --- src/sys/compat/svr4_32/svr4_32_misc.c:1.64 Sun Jan 11 13:14:14 2009 +++ src/sys/compat/svr4_32/svr4_32_misc.c Mon Aug 10 17:36:00 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: svr4_32_misc.c,v 1.64 2009/01/11 13:14:14 nakayama Exp $ */ +/* $NetBSD: svr4_32_misc.c,v 1.65 2009/08/10 17:36:00 rjs Exp $ */ /*- * Copyright (c) 1994, 2008 The NetBSD Foundation, Inc. @@ -37,7 +37,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: svr4_32_misc.c,v 1.64 2009/01/11 13:14:14 nakayama Exp $"); +__KERNEL_RCSID(0, "$NetBSD: svr4_32_misc.c,v 1.65 2009/08/10 17:36:00 rjs Exp $"); #include #include @@ -535,7 +535,7 @@ SCARG(&ap, mode) = mode; return sys_mkfifo(l, &ap, retval); } else { - return do_sys_mknod(l, path, mode, dev, retval); + return do_sys_mknod(l, path, mode, dev, retval, UIO_USERSPACE); } }
CVS commit: src/sys/compat/netbsd32
Module Name:src Committed By: njoly Date: Wed Jul 22 17:19:44 UTC 2009 Modified Files: src/sys/compat/netbsd32: netbsd32_socket.c Log Message: Make compat netbsd32 sendmsg follow the native version by allowing empty messages. This let unfdpass regression test work as expected. To generate a diff of this commit: cvs rdiff -u -r1.35 -r1.36 src/sys/compat/netbsd32/netbsd32_socket.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/compat/netbsd32/netbsd32_socket.c diff -u src/sys/compat/netbsd32/netbsd32_socket.c:1.35 src/sys/compat/netbsd32/netbsd32_socket.c:1.36 --- src/sys/compat/netbsd32/netbsd32_socket.c:1.35 Mon Jun 15 22:59:53 2009 +++ src/sys/compat/netbsd32/netbsd32_socket.c Wed Jul 22 17:19:44 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: netbsd32_socket.c,v 1.35 2009/06/15 22:59:53 njoly Exp $ */ +/* $NetBSD: netbsd32_socket.c,v 1.36 2009/07/22 17:19:44 njoly Exp $ */ /* * Copyright (c) 1998, 2001 Matthew R. Green @@ -27,7 +27,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: netbsd32_socket.c,v 1.35 2009/06/15 22:59:53 njoly Exp $"); +__KERNEL_RCSID(0, "$NetBSD: netbsd32_socket.c,v 1.36 2009/07/22 17:19:44 njoly Exp $"); #include #include @@ -238,10 +238,8 @@ iov = (struct iovec *)malloc( sizeof(struct iovec) * (u_int)msg.msg_iovlen, M_IOV, M_WAITOK); - } else if ((u_int)msg.msg_iovlen > 0) + } else iov = aiov; - else - return (EMSGSIZE); iov32 = NETBSD32PTR64(msg32.msg_iov); error = netbsd32_to_iovecin(iov32, iov, msg.msg_iovlen);
CVS commit: src/sys/compat
Module Name:src Committed By: njoly Date: Wed Jul 22 15:49:29 UTC 2009 Modified Files: src/sys/compat/linux/common: linux_misc.c src/sys/compat/linux32/common: linux32_dirent.c Log Message: Make compat linux/linux32 getdents(2) fail with ENOTDIR instead of EINVAL when file descriptor does not refer to a directory. To generate a diff of this commit: cvs rdiff -u -r1.208 -r1.209 src/sys/compat/linux/common/linux_misc.c cvs rdiff -u -r1.8 -r1.9 src/sys/compat/linux32/common/linux32_dirent.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/compat/linux/common/linux_misc.c diff -u src/sys/compat/linux/common/linux_misc.c:1.208 src/sys/compat/linux/common/linux_misc.c:1.209 --- src/sys/compat/linux/common/linux_misc.c:1.208 Fri May 15 17:02:54 2009 +++ src/sys/compat/linux/common/linux_misc.c Wed Jul 22 15:49:29 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: linux_misc.c,v 1.208 2009/05/15 17:02:54 pooka Exp $ */ +/* $NetBSD: linux_misc.c,v 1.209 2009/07/22 15:49:29 njoly Exp $ */ /*- * Copyright (c) 1995, 1998, 1999, 2008 The NetBSD Foundation, Inc. @@ -57,7 +57,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: linux_misc.c,v 1.208 2009/05/15 17:02:54 pooka Exp $"); +__KERNEL_RCSID(0, "$NetBSD: linux_misc.c,v 1.209 2009/07/22 15:49:29 njoly Exp $"); #include #include @@ -702,7 +702,7 @@ vp = (struct vnode *)fp->f_data; if (vp->v_type != VDIR) { - error = EINVAL; + error = ENOTDIR; goto out1; } Index: src/sys/compat/linux32/common/linux32_dirent.c diff -u src/sys/compat/linux32/common/linux32_dirent.c:1.8 src/sys/compat/linux32/common/linux32_dirent.c:1.9 --- src/sys/compat/linux32/common/linux32_dirent.c:1.8 Mon Dec 29 14:33:40 2008 +++ src/sys/compat/linux32/common/linux32_dirent.c Wed Jul 22 15:49:29 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: linux32_dirent.c,v 1.8 2008/12/29 14:33:40 njoly Exp $ */ +/* $NetBSD: linux32_dirent.c,v 1.9 2009/07/22 15:49:29 njoly Exp $ */ /*- * Copyright (c) 2006 Emmanuel Dreyfus, all rights reserved. @@ -33,7 +33,7 @@ #include -__KERNEL_RCSID(0, "$NetBSD: linux32_dirent.c,v 1.8 2008/12/29 14:33:40 njoly Exp $"); +__KERNEL_RCSID(0, "$NetBSD: linux32_dirent.c,v 1.9 2009/07/22 15:49:29 njoly Exp $"); #include #include @@ -126,7 +126,7 @@ vp = (struct vnode *)fp->f_data; if (vp->v_type != VDIR) { - error = EINVAL; + error = ENOTDIR; goto out1; }
CVS commit: src/sys/compat/linux32/common
Module Name:src Committed By: njoly Date: Tue Jul 21 18:50:43 UTC 2009 Modified Files: src/sys/compat/linux32/common: linux32_time.c Log Message: Kill unreachable return statement. To generate a diff of this commit: cvs rdiff -u -r1.28 -r1.29 src/sys/compat/linux32/common/linux32_time.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/compat/linux32/common/linux32_time.c diff -u src/sys/compat/linux32/common/linux32_time.c:1.28 src/sys/compat/linux32/common/linux32_time.c:1.29 --- src/sys/compat/linux32/common/linux32_time.c:1.28 Fri Jan 16 13:10:47 2009 +++ src/sys/compat/linux32/common/linux32_time.c Tue Jul 21 18:50:43 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: linux32_time.c,v 1.28 2009/01/16 13:10:47 njoly Exp $ */ +/* $NetBSD: linux32_time.c,v 1.29 2009/07/21 18:50:43 njoly Exp $ */ /*- * Copyright (c) 2006 Emmanuel Dreyfus, all rights reserved. @@ -33,7 +33,7 @@ #include -__KERNEL_RCSID(0, "$NetBSD: linux32_time.c,v 1.28 2009/01/16 13:10:47 njoly Exp $"); +__KERNEL_RCSID(0, "$NetBSD: linux32_time.c,v 1.29 2009/07/21 18:50:43 njoly Exp $"); #include #include @@ -349,8 +349,6 @@ ts.tv_nsec = 10 / tc_getfrequency(); native_to_linux32_timespec(
CVS commit: src/sys/compat/linux/common
Module Name:src Committed By: njoly Date: Tue Jul 21 18:42:56 UTC 2009 Modified Files: src/sys/compat/linux/common: linux_time.c Log Message: Do reject unknown/invalid linux clockid. To generate a diff of this commit: cvs rdiff -u -r1.28 -r1.29 src/sys/compat/linux/common/linux_time.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/compat/linux/common/linux_time.c diff -u src/sys/compat/linux/common/linux_time.c:1.28 src/sys/compat/linux/common/linux_time.c:1.29 --- src/sys/compat/linux/common/linux_time.c:1.28 Sun Jan 11 02:45:48 2009 +++ src/sys/compat/linux/common/linux_time.c Tue Jul 21 18:42:56 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: linux_time.c,v 1.28 2009/01/11 02:45:48 christos Exp $ */ +/* $NetBSD: linux_time.c,v 1.29 2009/07/21 18:42:56 njoly Exp $ */ /*- * Copyright (c) 2001 The NetBSD Foundation, Inc. @@ -30,7 +30,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: linux_time.c,v 1.28 2009/01/11 02:45:48 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: linux_time.c,v 1.29 2009/07/21 18:42:56 njoly Exp $"); #include #include @@ -181,6 +181,7 @@ case LINUX_CLOCK_THREAD_CPUTIME_ID: case LINUX_CLOCK_REALTIME_HR: case LINUX_CLOCK_MONOTONIC_HR: + default: return EINVAL; }
CVS commit: src/sys/compat/common
Module Name:src Committed By: rmind Date: Sun Jul 19 02:41:27 UTC 2009 Modified Files: src/sys/compat/common: compat_mod.c kern_time_50.c Log Message: - Use #ifdef AIO, instead of #ifdef notyet. Not a solution, but at least gets it working for MONOLITHIC kernel. - Similarily add #ifdef MQUEUE for mqueue compat. - Amend TNF license to be 2-clause. Approved by . To generate a diff of this commit: cvs rdiff -u -r1.7 -r1.8 src/sys/compat/common/compat_mod.c \ src/sys/compat/common/kern_time_50.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/compat/common/compat_mod.c diff -u src/sys/compat/common/compat_mod.c:1.7 src/sys/compat/common/compat_mod.c:1.8 --- src/sys/compat/common/compat_mod.c:1.7 Tue Jan 13 20:47:47 2009 +++ src/sys/compat/common/compat_mod.c Sun Jul 19 02:41:27 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: compat_mod.c,v 1.7 2009/01/13 20:47:47 martin Exp $ */ +/* $NetBSD: compat_mod.c,v 1.8 2009/07/19 02:41:27 rmind Exp $ */ /*- * Copyright (c) 2008 The NetBSD Foundation, Inc. @@ -34,7 +34,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: compat_mod.c,v 1.7 2009/01/13 20:47:47 martin Exp $"); +__KERNEL_RCSID(0, "$NetBSD: compat_mod.c,v 1.8 2009/07/19 02:41:27 rmind Exp $"); #ifdef _KERNEL_OPT #include "opt_compat_netbsd.h" @@ -231,6 +231,8 @@ # endif { SYS_compat_50___fhstat40, 0, (sy_call_t *)compat_50_sys___fhstat40 }, { SYS_compat_50_aio_suspend, 0, (sy_call_t *)compat_50_sys_aio_suspend }, + { SYS_compat_50_mq_timedreceive, 0, (sy_call_t *)compat_50_sys_mq_timedreceive }, + { SYS_compat_50_mq_timedsend, 0, (sy_call_t *)compat_50_sys_mq_timedsend }, #endif { 0, 0, NULL }, }; Index: src/sys/compat/common/kern_time_50.c diff -u src/sys/compat/common/kern_time_50.c:1.7 src/sys/compat/common/kern_time_50.c:1.8 --- src/sys/compat/common/kern_time_50.c:1.7 Sun Mar 29 19:21:19 2009 +++ src/sys/compat/common/kern_time_50.c Sun Jul 19 02:41:27 2009 @@ -1,7 +1,7 @@ -/* $NetBSD: kern_time_50.c,v 1.7 2009/03/29 19:21:19 christos Exp $ */ +/* $NetBSD: kern_time_50.c,v 1.8 2009/07/19 02:41:27 rmind Exp $ */ /*- - * Copyright (c) 2008 The NetBSD Foundation, Inc. + * Copyright (c) 2008, 2009 The NetBSD Foundation, Inc. * All rights reserved. * * This code is derived from software contributed to The NetBSD Foundation @@ -15,13 +15,6 @@ * 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. - * 3. All advertising materials mentioning features or use of this software - *must display the following acknowledgement: - *This product includes software developed by the NetBSD - *Foundation, Inc. and its contributors. - * 4. Neither the name of The NetBSD Foundation nor the names of its - *contributors may be used to endorse or promote products derived - *from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED @@ -36,10 +29,12 @@ * POSSIBILITY OF SUCH DAMAGE. */ #include -__KERNEL_RCSID(0, "$NetBSD: kern_time_50.c,v 1.7 2009/03/29 19:21:19 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: kern_time_50.c,v 1.8 2009/07/19 02:41:27 rmind Exp $"); #ifdef _KERNEL_OPT +#include "opt_aio.h" #include "opt_ntp.h" +#include "opt_mqueue.h" #endif #include @@ -373,7 +368,7 @@ syscallarg(int) nent; syscallarg(const struct timespec50 *) timeout; } */ -#ifdef notyet +#ifdef AIO struct aiocb **list; struct timespec ts; struct timespec50 ts50; @@ -542,6 +537,7 @@ syscallarg(unsigned) msg_prio; syscallarg(const struct timespec50 *) abs_timeout; } */ +#ifdef MQUEUE int t; int error; struct timespec50 ts50; @@ -561,6 +557,9 @@ return mq_send1(l, SCARG(uap, mqdes), SCARG(uap, msg_ptr), SCARG(uap, msg_len), SCARG(uap, msg_prio), t); +#else + return ENOSYS; +#endif } int @@ -574,6 +573,7 @@ syscallarg(unsigned *) msg_prio; syscallarg(const struct timespec50 *) abs_timeout; } */ +#ifdef MQUEUE int error, t; ssize_t mlen; struct timespec ts; @@ -598,6 +598,9 @@ *retval = mlen; return error; +#else + return ENOSYS; +#endif } static int
CVS commit: src/sys/compat/irix
Module Name:src Committed By: tsutsui Date: Sun Jun 28 09:50:57 UTC 2009 Modified Files: src/sys/compat/irix: irix_fcntl.c Log Message: pad -> PAD, to follow src/sys/kern/makesyscalls.sh rev 1.87. To generate a diff of this commit: cvs rdiff -u -r1.25 -r1.26 src/sys/compat/irix/irix_fcntl.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/compat/irix/irix_fcntl.c diff -u src/sys/compat/irix/irix_fcntl.c:1.25 src/sys/compat/irix/irix_fcntl.c:1.26 --- src/sys/compat/irix/irix_fcntl.c:1.25 Mon Apr 28 20:23:41 2008 +++ src/sys/compat/irix/irix_fcntl.c Sun Jun 28 09:50:57 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: irix_fcntl.c,v 1.25 2008/04/28 20:23:41 martin Exp $ */ +/* $NetBSD: irix_fcntl.c,v 1.26 2009/06/28 09:50:57 tsutsui Exp $ */ /*- * Copyright (c) 2001-2002 The NetBSD Foundation, Inc. @@ -30,7 +30,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: irix_fcntl.c,v 1.25 2008/04/28 20:23:41 martin Exp $"); +__KERNEL_RCSID(0, "$NetBSD: irix_fcntl.c,v 1.26 2009/06/28 09:50:57 tsutsui Exp $"); #include #include @@ -92,7 +92,7 @@ SCARG(uap, pad4)); #endif SCARG(&cup, fd) = SCARG(uap, fd); - SCARG(&cup, pad) = 0; + SCARG(&cup, PAD) = 0; SCARG(&cup, offset) = SCARG(uap, offset); SCARG(&cup, whence) = SCARG(uap, whence);
CVS commit: src/sys/compat/linux/common
Module Name:src Committed By: njoly Date: Tue Jun 23 13:18:59 UTC 2009 Modified Files: src/sys/compat/linux/common: linux_sched.c Log Message: sched_getaffinity(2) update: - dynamically calculate the cpu mask size, - return it upon success, - fix generated cpu mask. To generate a diff of this commit: cvs rdiff -u -r1.59 -r1.60 src/sys/compat/linux/common/linux_sched.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/compat/linux/common/linux_sched.c diff -u src/sys/compat/linux/common/linux_sched.c:1.59 src/sys/compat/linux/common/linux_sched.c:1.60 --- src/sys/compat/linux/common/linux_sched.c:1.59 Thu Jun 18 20:36:28 2009 +++ src/sys/compat/linux/common/linux_sched.c Tue Jun 23 13:18:59 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: linux_sched.c,v 1.59 2009/06/18 20:36:28 njoly Exp $ */ +/* $NetBSD: linux_sched.c,v 1.60 2009/06/23 13:18:59 njoly Exp $ */ /*- * Copyright (c) 1999 The NetBSD Foundation, Inc. @@ -35,7 +35,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: linux_sched.c,v 1.59 2009/06/18 20:36:28 njoly Exp $"); +__KERNEL_RCSID(0, "$NetBSD: linux_sched.c,v 1.60 2009/06/23 13:18:59 njoly Exp $"); #include #include @@ -622,15 +622,12 @@ syscallarg(unsigned int) len; syscallarg(unsigned long *) mask; } */ - int error; - int ret; - char *data; - int *retp; - - if (SCARG(uap, mask) == NULL) - return EINVAL; + int error, size, nb = ncpu; + unsigned long *p, *data; - if (SCARG(uap, len) < sizeof(int)) + /* Unlike Linux, dynamically calculate cpu mask size */ + size = sizeof(long) * ((ncpu + LONG_BIT - 1) / LONG_BIT); + if (SCARG(uap, len) < size) return EINVAL; if (pfind(SCARG(uap, pid)) == NULL) @@ -641,14 +638,18 @@ * The result is a mask, the first CPU being in the least significant * bit. */ - ret = (1 << ncpu) - 1; - data = malloc(SCARG(uap, len), M_TEMP, M_WAITOK|M_ZERO); - retp = (int *)&data[SCARG(uap, len) - sizeof(ret)]; - *retp = ret; - - error = copyout(data, SCARG(uap, mask), SCARG(uap, len)); + data = malloc(size, M_TEMP, M_WAITOK|M_ZERO); + p = data; + while (nb > LONG_BIT) { + *p++ = ~0UL; + nb -= LONG_BIT; + } + if (nb) + *p = (1 << ncpu) - 1; + error = copyout(data, SCARG(uap, mask), size); free(data, M_TEMP); + *retval = size; return error;
CVS commit: src/sys/compat/linux/common
Module Name:src Committed By: njoly Date: Thu Jun 18 20:36:28 UTC 2009 Modified Files: src/sys/compat/linux/common: linux_sched.c Log Message: In linux_sys_sched_getaffinity(), do not leak memory on error. To generate a diff of this commit: cvs rdiff -u -r1.58 -r1.59 src/sys/compat/linux/common/linux_sched.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/compat/linux/common/linux_sched.c diff -u src/sys/compat/linux/common/linux_sched.c:1.58 src/sys/compat/linux/common/linux_sched.c:1.59 --- src/sys/compat/linux/common/linux_sched.c:1.58 Sat Oct 25 23:38:28 2008 +++ src/sys/compat/linux/common/linux_sched.c Thu Jun 18 20:36:28 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: linux_sched.c,v 1.58 2008/10/25 23:38:28 christos Exp $ */ +/* $NetBSD: linux_sched.c,v 1.59 2009/06/18 20:36:28 njoly Exp $ */ /*- * Copyright (c) 1999 The NetBSD Foundation, Inc. @@ -35,7 +35,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: linux_sched.c,v 1.58 2008/10/25 23:38:28 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: linux_sched.c,v 1.59 2009/06/18 20:36:28 njoly Exp $"); #include #include @@ -646,12 +646,11 @@ retp = (int *)&data[SCARG(uap, len) - sizeof(ret)]; *retp = ret; - if ((error = copyout(data, SCARG(uap, mask), SCARG(uap, len))) != 0) - return error; + error = copyout(data, SCARG(uap, mask), SCARG(uap, len)); free(data, M_TEMP); - return 0; + return error; }
CVS commit: src/sys/compat/linux/arch
Module Name:src Committed By: njoly Date: Wed Jun 17 14:20:08 UTC 2009 Modified Files: src/sys/compat/linux/arch/alpha: linux_syscall.h linux_syscallargs.h linux_syscalls.c linux_sysent.c src/sys/compat/linux/arch/amd64: linux_syscall.h linux_syscallargs.h linux_syscalls.c linux_sysent.c src/sys/compat/linux/arch/mips: linux_syscall.h linux_syscallargs.h linux_syscalls.c linux_sysent.c Log Message: Regen for sendmsg/recvmsg definitions update. To generate a diff of this commit: cvs rdiff -u -r1.74 -r1.75 src/sys/compat/linux/arch/alpha/linux_syscall.h \ src/sys/compat/linux/arch/alpha/linux_sysent.c cvs rdiff -u -r1.73 -r1.74 \ src/sys/compat/linux/arch/alpha/linux_syscallargs.h cvs rdiff -u -r1.75 -r1.76 src/sys/compat/linux/arch/alpha/linux_syscalls.c cvs rdiff -u -r1.33 -r1.34 src/sys/compat/linux/arch/amd64/linux_syscall.h \ src/sys/compat/linux/arch/amd64/linux_syscallargs.h \ src/sys/compat/linux/arch/amd64/linux_syscalls.c \ src/sys/compat/linux/arch/amd64/linux_sysent.c cvs rdiff -u -r1.39 -r1.40 src/sys/compat/linux/arch/mips/linux_syscall.h cvs rdiff -u -r1.38 -r1.39 src/sys/compat/linux/arch/mips/linux_syscallargs.h \ src/sys/compat/linux/arch/mips/linux_syscalls.c \ src/sys/compat/linux/arch/mips/linux_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/compat/linux/arch/alpha/linux_syscall.h diff -u src/sys/compat/linux/arch/alpha/linux_syscall.h:1.74 src/sys/compat/linux/arch/alpha/linux_syscall.h:1.75 --- src/sys/compat/linux/arch/alpha/linux_syscall.h:1.74 Mon Jun 8 13:29:00 2009 +++ src/sys/compat/linux/arch/alpha/linux_syscall.h Wed Jun 17 14:20:08 2009 @@ -1,10 +1,10 @@ -/* $NetBSD: linux_syscall.h,v 1.74 2009/06/08 13:29:00 njoly Exp $ */ +/* $NetBSD: linux_syscall.h,v 1.75 2009/06/17 14:20:08 njoly Exp $ */ /* * System call numbers. * * DO NOT EDIT-- this file is automatically generated. - * created from NetBSD: syscalls.master,v 1.69 2009/06/08 13:26:57 njoly Exp + * created from NetBSD: syscalls.master,v 1.70 2009/06/17 14:18:51 njoly Exp */ #ifndef _LINUX_SYS_SYSCALL_H_ @@ -216,10 +216,10 @@ /* syscall: "sigstack" ret: "int" args: "struct sigstack *" "struct sigstack *" */ #define LINUX_SYS_sigstack 112 -/* syscall: "recvmsg" ret: "ssize_t" args: "int" "struct msghdr *" "int" */ +/* syscall: "recvmsg" ret: "ssize_t" args: "int" "struct linux_msghdr *" "int" */ #define LINUX_SYS_recvmsg 113 -/* syscall: "sendmsg" ret: "ssize_t" args: "int" "const struct msghdr *" "int" */ +/* syscall: "sendmsg" ret: "ssize_t" args: "int" "const struct linux_msghdr *" "int" */ #define LINUX_SYS_sendmsg 114 /* syscall: "getsockopt" ret: "int" args: "int" "int" "int" "void *" "int *" */ Index: src/sys/compat/linux/arch/alpha/linux_sysent.c diff -u src/sys/compat/linux/arch/alpha/linux_sysent.c:1.74 src/sys/compat/linux/arch/alpha/linux_sysent.c:1.75 --- src/sys/compat/linux/arch/alpha/linux_sysent.c:1.74 Mon Jun 8 13:29:00 2009 +++ src/sys/compat/linux/arch/alpha/linux_sysent.c Wed Jun 17 14:20:08 2009 @@ -1,14 +1,14 @@ -/* $NetBSD: linux_sysent.c,v 1.74 2009/06/08 13:29:00 njoly Exp $ */ +/* $NetBSD: linux_sysent.c,v 1.75 2009/06/17 14:20:08 njoly Exp $ */ /* * System call switch table. * * DO NOT EDIT-- this file is automatically generated. - * created from NetBSD: syscalls.master,v 1.69 2009/06/08 13:26:57 njoly Exp + * created from NetBSD: syscalls.master,v 1.70 2009/06/17 14:18:51 njoly Exp */ #include -__KERNEL_RCSID(0, "$NetBSD: linux_sysent.c,v 1.74 2009/06/08 13:29:00 njoly Exp $"); +__KERNEL_RCSID(0, "$NetBSD: linux_sysent.c,v 1.75 2009/06/17 14:20:08 njoly Exp $"); #if defined(_KERNEL_OPT) #include "opt_sysv.h" Index: src/sys/compat/linux/arch/alpha/linux_syscallargs.h diff -u src/sys/compat/linux/arch/alpha/linux_syscallargs.h:1.73 src/sys/compat/linux/arch/alpha/linux_syscallargs.h:1.74 --- src/sys/compat/linux/arch/alpha/linux_syscallargs.h:1.73 Mon Jun 8 13:29:00 2009 +++ src/sys/compat/linux/arch/alpha/linux_syscallargs.h Wed Jun 17 14:20:08 2009 @@ -1,10 +1,10 @@ -/* $NetBSD: linux_syscallargs.h,v 1.73 2009/06/08 13:29:00 njoly Exp $ */ +/* $NetBSD: linux_syscallargs.h,v 1.74 2009/06/17 14:20:08 njoly Exp $ */ /* * System call argument lists. * * DO NOT EDIT-- this file is automatically generated. - * created from NetBSD: syscalls.master,v 1.69 2009/06/08 13:26:57 njoly Exp + * created from NetBSD: syscalls.master,v 1.70 2009/06/17 14:18:51 njoly Exp */ #ifndef _LINUX_SYS_SYSCALLARGS_H_ @@ -300,14 +300,14 @@ struct linux_sys_recvmsg_args { syscallarg(int) s; - syscallarg(struct msghdr *) msg; + syscallarg(struct linux_msghdr *) msg; syscallarg(int) flags; }; check_syscall_args(linux_sys_recvmsg) struct linux_sys_sendmsg_args { syscallarg(int) s; - syscallarg(const struct msghdr *) msg; + syscallarg(const s
CVS commit: src/sys/compat/linux
Module Name:src Committed By: njoly Date: Wed Jun 17 14:18:51 UTC 2009 Modified Files: src/sys/compat/linux/arch/alpha: syscalls.master src/sys/compat/linux/arch/amd64: syscalls.master src/sys/compat/linux/arch/mips: syscalls.master src/sys/compat/linux/common: linux_socket.c linux_socket.h linux_socketcall.h Log Message: Add a new linux_msghdr structure, as its size differs on 64bit archs. Do the needed conversions in sendmsg/recvmsg syscalls, and adjust their definitions accordingly. To generate a diff of this commit: cvs rdiff -u -r1.69 -r1.70 src/sys/compat/linux/arch/alpha/syscalls.master cvs rdiff -u -r1.31 -r1.32 src/sys/compat/linux/arch/amd64/syscalls.master cvs rdiff -u -r1.35 -r1.36 src/sys/compat/linux/arch/mips/syscalls.master cvs rdiff -u -r1.103 -r1.104 src/sys/compat/linux/common/linux_socket.c cvs rdiff -u -r1.17 -r1.18 src/sys/compat/linux/common/linux_socket.h cvs rdiff -u -r1.15 -r1.16 src/sys/compat/linux/common/linux_socketcall.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/compat/linux/arch/alpha/syscalls.master diff -u src/sys/compat/linux/arch/alpha/syscalls.master:1.69 src/sys/compat/linux/arch/alpha/syscalls.master:1.70 --- src/sys/compat/linux/arch/alpha/syscalls.master:1.69 Mon Jun 8 13:26:57 2009 +++ src/sys/compat/linux/arch/alpha/syscalls.master Wed Jun 17 14:18:51 2009 @@ -1,4 +1,4 @@ - $NetBSD: syscalls.master,v 1.69 2009/06/08 13:26:57 njoly Exp $ + $NetBSD: syscalls.master,v 1.70 2009/06/17 14:18:51 njoly Exp $ ; ; @(#)syscalls.master 8.1 (Berkeley) 7/19/93 @@ -233,10 +233,10 @@ ;112 ALIAS osf1_sys_sigstack 112 NOARGS { int|compat_43_sys||sigstack(struct sigstack *nss, \ struct sigstack *oss); } -113 STD { ssize_t|linux_sys||recvmsg(int s, struct msghdr *msg, \ -int flags); } +113 STD { ssize_t|linux_sys||recvmsg(int s, \ + struct linux_msghdr *msg, int flags); } 114 STD { ssize_t|linux_sys||sendmsg(int s, \ -const struct msghdr *msg, int flags); } +const struct linux_msghdr *msg, int flags); } 115 UNIMPL 116 NODEF { int|osf1_sys||gettimeofday(struct osf1_timeval *tv, \ struct osf1_timezone *tzp); } Index: src/sys/compat/linux/arch/amd64/syscalls.master diff -u src/sys/compat/linux/arch/amd64/syscalls.master:1.31 src/sys/compat/linux/arch/amd64/syscalls.master:1.32 --- src/sys/compat/linux/arch/amd64/syscalls.master:1.31 Mon Jun 8 13:26:57 2009 +++ src/sys/compat/linux/arch/amd64/syscalls.master Wed Jun 17 14:18:51 2009 @@ -1,4 +1,4 @@ - $NetBSD: syscalls.master,v 1.31 2009/06/08 13:26:57 njoly Exp $ + $NetBSD: syscalls.master,v 1.32 2009/06/17 14:18:51 njoly Exp $ ; @(#)syscalls.master 8.1 (Berkeley) 7/19/93 @@ -154,9 +154,9 @@ size_t len, int flags, struct osockaddr *from, \ unsigned int *fromlenaddr); } 46 STD { int|linux_sys||sendmsg(int s, \ - const struct msghdr *msg, int flags); } + const struct linux_msghdr *msg, int flags); } 47 STD { ssize_t|linux_sys||recvmsg(int s, \ - struct msghdr *msg, int flags); } + struct linux_msghdr *msg, int flags); } 48 NOARGS { int|sys||shutdown(int s, int how); } 49 STD { int|linux_sys||bind(int s, \ const struct osockaddr *name, \ Index: src/sys/compat/linux/arch/mips/syscalls.master diff -u src/sys/compat/linux/arch/mips/syscalls.master:1.35 src/sys/compat/linux/arch/mips/syscalls.master:1.36 --- src/sys/compat/linux/arch/mips/syscalls.master:1.35 Mon Jun 8 13:26:57 2009 +++ src/sys/compat/linux/arch/mips/syscalls.master Wed Jun 17 14:18:51 2009 @@ -1,4 +1,4 @@ - $NetBSD: syscalls.master,v 1.35 2009/06/08 13:26:57 njoly Exp $ + $NetBSD: syscalls.master,v 1.36 2009/06/17 14:18:51 njoly Exp $ ; @(#)syscalls.master 8.1 (Berkeley) 7/19/93 @@ -298,12 +298,12 @@ 176 NOARGS { int|linux_sys||recvfrom(int s, void *buf, int len, \ int flags, struct osockaddr *from, \ int *fromlenaddr); } -177 NOARGS { int|linux_sys||recvmsg(int s, struct msghdr *msg, \ - u_int flags); } +177 NOARGS { int|linux_sys||recvmsg(int s, \ + struct linux_msghdr *msg, u_int flags); } 178 NOARGS { int|linux_sys||send(int s, void *buf, int len, \ int flags); } -179 NOARGS { int|linux_sys||sendmsg(int s, struct msghdr *msg, \ - u_int flags); } +179 NOARGS { int|linux_sys||sendmsg(int s, \ + struct linux_msghdr *msg, u_int flags); } 180 NOARGS { int|linux_sys||sendto(int s, void *msg, \ int len, int flags, struct osockaddr *to, \ int tolen); } Index: src/sys/compat/linux/common/linux_socket.c diff -u src/sys/compat/linux/common/linux_socket.c:1.103 src/sys/compat/linux/common/linux_socket.c:1.104 --- src/sys/compat/linux/common/linux_socket.c:1.103 Tue Jun 16 23:17:02 2009 +++ src/sys/compat/linux/common/linux_socket.c Wed Jun 17 14:18:51 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: linux_socket.c,v 1.103 2009/06/16 23:17:
CVS commit: src/sys/compat/linux/common
Module Name:src Committed By: njoly Date: Tue Jun 16 23:17:02 UTC 2009 Modified Files: src/sys/compat/linux/common: linux_socket.c linux_socket.h Log Message: Add LINUX_CMSG_{SPACE,LEN} macros. Use then when calculating the msg_controllen size, when converting the control message buffer from native (previous version was missing the linux_cmsghdr size). To generate a diff of this commit: cvs rdiff -u -r1.102 -r1.103 src/sys/compat/linux/common/linux_socket.c cvs rdiff -u -r1.16 -r1.17 src/sys/compat/linux/common/linux_socket.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/compat/linux/common/linux_socket.c diff -u src/sys/compat/linux/common/linux_socket.c:1.102 src/sys/compat/linux/common/linux_socket.c:1.103 --- src/sys/compat/linux/common/linux_socket.c:1.102 Tue Jun 16 22:56:49 2009 +++ src/sys/compat/linux/common/linux_socket.c Tue Jun 16 23:17:02 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: linux_socket.c,v 1.102 2009/06/16 22:56:49 njoly Exp $ */ +/* $NetBSD: linux_socket.c,v 1.103 2009/06/16 23:17:02 njoly Exp $ */ /*- * Copyright (c) 1995, 1998, 2008 The NetBSD Foundation, Inc. @@ -35,7 +35,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: linux_socket.c,v 1.102 2009/06/16 22:56:49 njoly Exp $"); +__KERNEL_RCSID(0, "$NetBSD: linux_socket.c,v 1.103 2009/06/16 23:17:02 njoly Exp $"); #if defined(_KERNEL_OPT) #include "opt_inet.h" @@ -669,11 +669,11 @@ break; } m = m->m_next; - if (m == NULL || q + LINUX_CMSG_ALIGN(dlen) > q_end) { - q += dlen; + if (m == NULL || q + LINUX_CMSG_SPACE(dlen) > q_end) { + q += LINUX_CMSG_LEN(dlen); break; } - q += LINUX_CMSG_ALIGN(dlen); + q += LINUX_CMSG_SPACE(dlen); } done: Index: src/sys/compat/linux/common/linux_socket.h diff -u src/sys/compat/linux/common/linux_socket.h:1.16 src/sys/compat/linux/common/linux_socket.h:1.17 --- src/sys/compat/linux/common/linux_socket.h:1.16 Mon Apr 28 20:23:44 2008 +++ src/sys/compat/linux/common/linux_socket.h Tue Jun 16 23:17:02 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: linux_socket.h,v 1.16 2008/04/28 20:23:44 martin Exp $ */ +/* $NetBSD: linux_socket.h,v 1.17 2009/06/16 23:17:02 njoly Exp $ */ /*- * Copyright (c) 1995, 1998 The NetBSD Foundation, Inc. @@ -179,6 +179,10 @@ ((mhdr)->msg_controllen >= sizeof(struct linux_cmsghdr) ? \ (struct linux_cmsghdr *)(mhdr)->msg_control : NULL) +#define LINUX_CMSG_SPACE(l) \ + (sizeof(struct linux_cmsghdr) + LINUX_CMSG_ALIGN(l)) +#define LINUX_CMSG_LEN(l) \ + (sizeof(struct linux_cmsghdr) + (l)) /* * Machine specific definitions.
CVS commit: src/sys/compat/linux/common
Module Name:src Committed By: njoly Date: Tue Jun 16 22:56:49 UTC 2009 Modified Files: src/sys/compat/linux/common: linux_socket.c Log Message: For linux cmsg header copyout, use the linux structure size, not the native one. To generate a diff of this commit: cvs rdiff -u -r1.101 -r1.102 src/sys/compat/linux/common/linux_socket.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/compat/linux/common/linux_socket.c diff -u src/sys/compat/linux/common/linux_socket.c:1.101 src/sys/compat/linux/common/linux_socket.c:1.102 --- src/sys/compat/linux/common/linux_socket.c:1.101 Tue Jun 16 15:56:10 2009 +++ src/sys/compat/linux/common/linux_socket.c Tue Jun 16 22:56:49 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: linux_socket.c,v 1.101 2009/06/16 15:56:10 njoly Exp $ */ +/* $NetBSD: linux_socket.c,v 1.102 2009/06/16 22:56:49 njoly Exp $ */ /*- * Copyright (c) 1995, 1998, 2008 The NetBSD Foundation, Inc. @@ -35,7 +35,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: linux_socket.c,v 1.101 2009/06/16 15:56:10 njoly Exp $"); +__KERNEL_RCSID(0, "$NetBSD: linux_socket.c,v 1.102 2009/06/16 22:56:49 njoly Exp $"); #if defined(_KERNEL_OPT) #include "opt_inet.h" @@ -658,7 +658,7 @@ } /* There can be padding between the header and data... */ - error = copyout(&linux_cmsg, q, sizeof *cmsg); + error = copyout(&linux_cmsg, q, sizeof linux_cmsg); if (error != 0) { error = copyout(CCMSG_DATA(cmsg), q + sizeof linux_cmsg, dlen);
CVS commit: src/sys/compat/linux/common
Module Name:src Committed By: njoly Date: Tue Jun 16 15:56:10 UTC 2009 Modified Files: src/sys/compat/linux/common: linux_socket.c Log Message: Make compat linux sendmsg/recvmsg output msghdr and control messages buffers with ktrace(1), just like the native functions. To generate a diff of this commit: cvs rdiff -u -r1.100 -r1.101 src/sys/compat/linux/common/linux_socket.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/compat/linux/common/linux_socket.c diff -u src/sys/compat/linux/common/linux_socket.c:1.100 src/sys/compat/linux/common/linux_socket.c:1.101 --- src/sys/compat/linux/common/linux_socket.c:1.100 Thu Jun 11 19:57:58 2009 +++ src/sys/compat/linux/common/linux_socket.c Tue Jun 16 15:56:10 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: linux_socket.c,v 1.100 2009/06/11 19:57:58 njoly Exp $ */ +/* $NetBSD: linux_socket.c,v 1.101 2009/06/16 15:56:10 njoly Exp $ */ /*- * Copyright (c) 1995, 1998, 2008 The NetBSD Foundation, Inc. @@ -35,7 +35,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: linux_socket.c,v 1.100 2009/06/11 19:57:58 njoly Exp $"); +__KERNEL_RCSID(0, "$NetBSD: linux_socket.c,v 1.101 2009/06/16 15:56:10 njoly Exp $"); #if defined(_KERNEL_OPT) #include "opt_inet.h" @@ -541,6 +541,9 @@ msg.msg_control = ctl_mbuf; msg.msg_flags |= MSG_CONTROLMBUF; + + ktrkuser("msgcontrol", mtod(ctl_mbuf, void *), + msg.msg_controllen); } error = do_sys_sendmsg(l, SCARG(uap, s), &msg, bflags, retval); @@ -601,6 +604,8 @@ return 0; } + ktrkuser("msgcontrol", mtod(control, void *), mp->msg_controllen); + q = (char *)mp->msg_control; q_end = q + mp->msg_controllen; @@ -725,8 +730,10 @@ if (msg.msg_flags < 0) /* Some flag unsupported by Linux */ error = EINVAL; - else + else { + ktrkuser("msghdr", &msg, sizeof(msg)); error = copyout(&msg, SCARG(uap, msg), sizeof(msg)); + } } return (error);
CVS commit: src/sys/compat/netbsd32
Module Name:src Committed By: njoly Date: Mon Jun 15 22:59:53 UTC 2009 Modified Files: src/sys/compat/netbsd32: netbsd32_socket.c Log Message: Make netbsd32 sendmsg(2), do not use an uninitialised value for fetching iovec structures. While here, sync recvmsg(2) to avoid some unneeded casts. To generate a diff of this commit: cvs rdiff -u -r1.34 -r1.35 src/sys/compat/netbsd32/netbsd32_socket.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/compat/netbsd32/netbsd32_socket.c diff -u src/sys/compat/netbsd32/netbsd32_socket.c:1.34 src/sys/compat/netbsd32/netbsd32_socket.c:1.35 --- src/sys/compat/netbsd32/netbsd32_socket.c:1.34 Wed Dec 17 20:51:34 2008 +++ src/sys/compat/netbsd32/netbsd32_socket.c Mon Jun 15 22:59:53 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: netbsd32_socket.c,v 1.34 2008/12/17 20:51:34 cegger Exp $ */ +/* $NetBSD: netbsd32_socket.c,v 1.35 2009/06/15 22:59:53 njoly Exp $ */ /* * Copyright (c) 1998, 2001 Matthew R. Green @@ -27,7 +27,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: netbsd32_socket.c,v 1.34 2008/12/17 20:51:34 cegger Exp $"); +__KERNEL_RCSID(0, "$NetBSD: netbsd32_socket.c,v 1.35 2009/06/15 22:59:53 njoly Exp $"); #include #include @@ -62,7 +62,8 @@ syscallarg(int) flags; } */ struct netbsd32_msghdr msg; - struct iovec aiov[UIO_SMALLIOV], *uiov, *iov; + struct iovec aiov[UIO_SMALLIOV], *iov; + struct netbsd32_iovec *iov32; int error; error = copyin(SCARG_P32(uap, msg), &msg, sizeof(msg)); @@ -78,9 +79,8 @@ } else iov = aiov; msg.msg_flags = SCARG(uap, flags); - uiov = (struct iovec *)NETBSD32PTR64(msg.msg_iov); - error = netbsd32_to_iovecin((struct netbsd32_iovec *)uiov, - iov, msg.msg_iovlen); + iov32 = NETBSD32PTR64(msg.msg_iov); + error = netbsd32_to_iovecin(iov32, iov, msg.msg_iovlen); if (error) goto done; if ((error = recvit32(l, SCARG(uap, s), &msg, iov, (void *)0, @@ -224,6 +224,7 @@ struct msghdr msg; struct netbsd32_msghdr msg32; struct iovec aiov[UIO_SMALLIOV], *iov; + struct netbsd32_iovec *iov32; int error; error = copyin(SCARG_P32(uap, msg), &msg32, sizeof(msg32)); @@ -242,8 +243,8 @@ else return (EMSGSIZE); - error = netbsd32_to_iovecin((struct netbsd32_iovec *)msg.msg_iov, - iov, msg.msg_iovlen); + iov32 = NETBSD32PTR64(msg32.msg_iov); + error = netbsd32_to_iovecin(iov32, iov, msg.msg_iovlen); if (error) goto done; msg.msg_iov = iov;
CVS commit: src/sys/compat/linux/common
Module Name:src Committed By: njoly Date: Thu Jun 11 19:57:58 UTC 2009 Modified Files: src/sys/compat/linux/common: linux_socket.c Log Message: In sendmsg(2), do copy the msghdr structure before trying to use it. To generate a diff of this commit: cvs rdiff -u -r1.99 -r1.100 src/sys/compat/linux/common/linux_socket.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/compat/linux/common/linux_socket.c diff -u src/sys/compat/linux/common/linux_socket.c:1.99 src/sys/compat/linux/common/linux_socket.c:1.100 --- src/sys/compat/linux/common/linux_socket.c:1.99 Wed Nov 19 18:36:03 2008 +++ src/sys/compat/linux/common/linux_socket.c Thu Jun 11 19:57:58 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: linux_socket.c,v 1.99 2008/11/19 18:36:03 ad Exp $ */ +/* $NetBSD: linux_socket.c,v 1.100 2009/06/11 19:57:58 njoly Exp $ */ /*- * Copyright (c) 1995, 1998, 2008 The NetBSD Foundation, Inc. @@ -35,7 +35,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: linux_socket.c,v 1.99 2008/11/19 18:36:03 ad Exp $"); +__KERNEL_RCSID(0, "$NetBSD: linux_socket.c,v 1.100 2009/06/11 19:57:58 njoly Exp $"); #if defined(_KERNEL_OPT) #include "opt_inet.h" @@ -409,6 +409,10 @@ u_int8_t *control; struct mbuf *ctl_mbuf = NULL; + error = copyin(SCARG(uap, msg), &msg, sizeof(msg)); + if (error) + return error; + msg.msg_flags = MSG_IOVUSRSPACE; /*
CVS commit: src/sys/compat/linux32/arch/amd64
Module Name:src Committed By: njoly Date: Mon Jun 8 14:42:10 UTC 2009 Modified Files: src/sys/compat/linux32/arch/amd64: linux32_missing.h linux32_signal.h linux32_types.h Log Message: Fix defines against multiple inclusion protection (s/I386/AMD64). To generate a diff of this commit: cvs rdiff -u -r1.8 -r1.9 src/sys/compat/linux32/arch/amd64/linux32_missing.h cvs rdiff -u -r1.1 -r1.2 src/sys/compat/linux32/arch/amd64/linux32_signal.h cvs rdiff -u -r1.5 -r1.6 src/sys/compat/linux32/arch/amd64/linux32_types.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/compat/linux32/arch/amd64/linux32_missing.h diff -u src/sys/compat/linux32/arch/amd64/linux32_missing.h:1.8 src/sys/compat/linux32/arch/amd64/linux32_missing.h:1.9 --- src/sys/compat/linux32/arch/amd64/linux32_missing.h:1.8 Wed Apr 16 10:03:31 2008 +++ src/sys/compat/linux32/arch/amd64/linux32_missing.h Mon Jun 8 14:42:10 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: linux32_missing.h,v 1.8 2008/04/16 10:03:31 njoly Exp $ */ +/* $NetBSD: linux32_missing.h,v 1.9 2009/06/08 14:42:10 njoly Exp $ */ /*- * Copyright (c) 2006 Emmanuel Dreyfus, all rights reserved. @@ -30,8 +30,8 @@ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ -#ifndef _I386_LINUX32_MISSING_H -#define _I386_LINUX32_MISSING_H +#ifndef _AMD64_LINUX32_MISSING_H +#define _AMD64_LINUX32_MISSING_H #include #include @@ -80,4 +80,4 @@ __END_DECLS #endif /* !_KERNEL */ -#endif /* _I386_LINUX32_MISSING_H */ +#endif /* _AMD64_LINUX32_MISSING_H */ Index: src/sys/compat/linux32/arch/amd64/linux32_signal.h diff -u src/sys/compat/linux32/arch/amd64/linux32_signal.h:1.1 src/sys/compat/linux32/arch/amd64/linux32_signal.h:1.2 --- src/sys/compat/linux32/arch/amd64/linux32_signal.h:1.1 Thu Feb 9 19:18:57 2006 +++ src/sys/compat/linux32/arch/amd64/linux32_signal.h Mon Jun 8 14:42:10 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: linux32_signal.h,v 1.1 2006/02/09 19:18:57 manu Exp $ */ +/* $NetBSD: linux32_signal.h,v 1.2 2009/06/08 14:42:10 njoly Exp $ */ /*- * Copyright (c) 2006 Emmanuel Dreyfus, all rights reserved. @@ -30,8 +30,8 @@ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ -#ifndef _I386_LINUX32_SIGNAL_H_ -#define _I386_LINUX32_SIGNAL_H_ +#ifndef _AMD64_LINUX32_SIGNAL_H_ +#define _AMD64_LINUX32_SIGNAL_H_ #define native_to_linux32_signo native_to_linux_signo #define linux32_to_native_signo linux_to_native_signo @@ -296,4 +296,4 @@ linux32_handler_t sf_handler; }; -#endif /* _I386_LINUX32_SIGNAL_H_ */ +#endif /* _AMD64_LINUX32_SIGNAL_H_ */ Index: src/sys/compat/linux32/arch/amd64/linux32_types.h diff -u src/sys/compat/linux32/arch/amd64/linux32_types.h:1.5 src/sys/compat/linux32/arch/amd64/linux32_types.h:1.6 --- src/sys/compat/linux32/arch/amd64/linux32_types.h:1.5 Thu Sep 4 17:45:00 2008 +++ src/sys/compat/linux32/arch/amd64/linux32_types.h Mon Jun 8 14:42:10 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: linux32_types.h,v 1.5 2008/09/04 17:45:00 njoly Exp $ */ +/* $NetBSD: linux32_types.h,v 1.6 2009/06/08 14:42:10 njoly Exp $ */ /*- * Copyright (c) 2006 Emmanuel Dreyfus, all rights reserved. @@ -30,8 +30,8 @@ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ -#ifndef _I386_LINUX32_TYPES_H -#define _I386_LINUX32_TYPES_H +#ifndef _AMD64_LINUX32_TYPES_H +#define _AMD64_LINUX32_TYPES_H typedef unsigned short linux32_uid_t; typedef unsigned short linux32_gid_t; @@ -93,4 +93,4 @@ linux32_time_t l_modtime; }; -#endif /* _I386_LINUX32_TYPES_H */ +#endif /* _AMD64_LINUX32_TYPES_H */
CVS commit: src/sys/compat/linux32/arch/amd64
Module Name:src Committed By: njoly Date: Mon Jun 8 13:41:18 UTC 2009 Modified Files: src/sys/compat/linux32/arch/amd64: linux32_syscall.h linux32_syscallargs.h linux32_syscalls.c linux32_sysent.c Log Message: Regen for rt_queueinfo addition. To generate a diff of this commit: cvs rdiff -u -r1.56 -r1.57 \ src/sys/compat/linux32/arch/amd64/linux32_syscall.h \ src/sys/compat/linux32/arch/amd64/linux32_syscallargs.h \ src/sys/compat/linux32/arch/amd64/linux32_syscalls.c \ src/sys/compat/linux32/arch/amd64/linux32_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/compat/linux32/arch/amd64/linux32_syscall.h diff -u src/sys/compat/linux32/arch/amd64/linux32_syscall.h:1.56 src/sys/compat/linux32/arch/amd64/linux32_syscall.h:1.57 --- src/sys/compat/linux32/arch/amd64/linux32_syscall.h:1.56 Fri Jun 5 16:46:52 2009 +++ src/sys/compat/linux32/arch/amd64/linux32_syscall.h Mon Jun 8 13:41:17 2009 @@ -1,10 +1,10 @@ -/* $NetBSD: linux32_syscall.h,v 1.56 2009/06/05 16:46:52 njoly Exp $ */ +/* $NetBSD: linux32_syscall.h,v 1.57 2009/06/08 13:41:17 njoly Exp $ */ /* * System call numbers. * * DO NOT EDIT-- this file is automatically generated. - * created from NetBSD: syscalls.master,v 1.53 2009/06/05 16:45:33 njoly Exp + * created from NetBSD: syscalls.master,v 1.54 2009/06/08 13:34:23 njoly Exp */ #ifndef _LINUX32_SYS_SYSCALL_H_ @@ -427,6 +427,9 @@ /* syscall: "rt_sigpending" ret: "int" args: "linux32_sigsetp_t" "netbsd32_size_t" */ #define LINUX32_SYS_rt_sigpending 176 +/* syscall: "rt_queueinfo" ret: "int" args: "int" "int" "linux32_siginfop_t" */ +#define LINUX32_SYS_rt_queueinfo 178 + /* syscall: "rt_sigsuspend" ret: "int" args: "linux32_sigsetp_t" "netbsd32_size_t" */ #define LINUX32_SYS_rt_sigsuspend 179 Index: src/sys/compat/linux32/arch/amd64/linux32_syscallargs.h diff -u src/sys/compat/linux32/arch/amd64/linux32_syscallargs.h:1.56 src/sys/compat/linux32/arch/amd64/linux32_syscallargs.h:1.57 --- src/sys/compat/linux32/arch/amd64/linux32_syscallargs.h:1.56 Fri Jun 5 16:46:52 2009 +++ src/sys/compat/linux32/arch/amd64/linux32_syscallargs.h Mon Jun 8 13:41:17 2009 @@ -1,10 +1,10 @@ -/* $NetBSD: linux32_syscallargs.h,v 1.56 2009/06/05 16:46:52 njoly Exp $ */ +/* $NetBSD: linux32_syscallargs.h,v 1.57 2009/06/08 13:41:17 njoly Exp $ */ /* * System call argument lists. * * DO NOT EDIT-- this file is automatically generated. - * created from NetBSD: syscalls.master,v 1.53 2009/06/05 16:45:33 njoly Exp + * created from NetBSD: syscalls.master,v 1.54 2009/06/08 13:34:23 njoly Exp */ #ifndef _LINUX32_SYS_SYSCALLARGS_H_ @@ -573,6 +573,13 @@ }; check_syscall_args(linux32_sys_rt_sigpending) +struct linux32_sys_rt_queueinfo_args { + syscallarg(int) pid; + syscallarg(int) sig; + syscallarg(linux32_siginfop_t) uinfo; +}; +check_syscall_args(linux32_sys_rt_queueinfo) + struct linux32_sys_rt_sigsuspend_args { syscallarg(linux32_sigsetp_t) unewset; syscallarg(netbsd32_size_t) sigsetsize; @@ -1014,6 +1021,8 @@ int linux32_sys_rt_sigpending(struct lwp *, const struct linux32_sys_rt_sigpending_args *, register_t *); +int linux32_sys_rt_queueinfo(struct lwp *, const struct linux32_sys_rt_queueinfo_args *, register_t *); + int linux32_sys_rt_sigsuspend(struct lwp *, const struct linux32_sys_rt_sigsuspend_args *, register_t *); int linux32_sys_pread(struct lwp *, const struct linux32_sys_pread_args *, register_t *); Index: src/sys/compat/linux32/arch/amd64/linux32_syscalls.c diff -u src/sys/compat/linux32/arch/amd64/linux32_syscalls.c:1.56 src/sys/compat/linux32/arch/amd64/linux32_syscalls.c:1.57 --- src/sys/compat/linux32/arch/amd64/linux32_syscalls.c:1.56 Fri Jun 5 16:46:52 2009 +++ src/sys/compat/linux32/arch/amd64/linux32_syscalls.c Mon Jun 8 13:41:17 2009 @@ -1,14 +1,14 @@ -/* $NetBSD: linux32_syscalls.c,v 1.56 2009/06/05 16:46:52 njoly Exp $ */ +/* $NetBSD: linux32_syscalls.c,v 1.57 2009/06/08 13:41:17 njoly Exp $ */ /* * System call names. * * DO NOT EDIT-- this file is automatically generated. - * created from NetBSD: syscalls.master,v 1.53 2009/06/05 16:45:33 njoly Exp + * created from NetBSD: syscalls.master,v 1.54 2009/06/08 13:34:23 njoly Exp */ #include -__KERNEL_RCSID(0, "$NetBSD: linux32_syscalls.c,v 1.56 2009/06/05 16:46:52 njoly Exp $"); +__KERNEL_RCSID(0, "$NetBSD: linux32_syscalls.c,v 1.57 2009/06/08 13:41:17 njoly Exp $"); #if defined(_KERNEL_OPT) #include @@ -213,7 +213,7 @@ /* 175 */ "rt_sigprocmask", /* 176 */ "rt_sigpending", /* 177 */ "#177 (unimplemented rt_sigtimedwait)", - /* 178 */ "#178 (unimplemented rt_queueinfo)", + /* 178 */ "rt_queueinfo", /* 179 */ "rt_sigsuspend", /* 180 */ "pread", /* 181 */ "pwrite", Index: src/sys/compat/linux32/arch/amd64/linux32_sysent.c diff -u src/sys/compat/linux32/arch/amd64/linux32_sysent.c:1.56 src/sys/compat/linux32/arch/amd64/
CVS commit: src/sys/compat/linux32
Module Name:src Committed By: njoly Date: Mon Jun 8 13:34:23 UTC 2009 Modified Files: src/sys/compat/linux32/arch/amd64: syscalls.master src/sys/compat/linux32/common: linux32_signal.c Log Message: Add rt_queueinfo(2) support. To generate a diff of this commit: cvs rdiff -u -r1.53 -r1.54 src/sys/compat/linux32/arch/amd64/syscalls.master cvs rdiff -u -r1.12 -r1.13 src/sys/compat/linux32/common/linux32_signal.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/compat/linux32/arch/amd64/syscalls.master diff -u src/sys/compat/linux32/arch/amd64/syscalls.master:1.53 src/sys/compat/linux32/arch/amd64/syscalls.master:1.54 --- src/sys/compat/linux32/arch/amd64/syscalls.master:1.53 Fri Jun 5 16:45:33 2009 +++ src/sys/compat/linux32/arch/amd64/syscalls.master Mon Jun 8 13:34:23 2009 @@ -1,4 +1,4 @@ - $NetBSD: syscalls.master,v 1.53 2009/06/05 16:45:33 njoly Exp $ + $NetBSD: syscalls.master,v 1.54 2009/06/08 13:34:23 njoly Exp $ ; NetBSD i386 COMPAT_LINUX32 system call name/number "master" file. ; (See syscalls.conf to see what it is processed into.) @@ -310,7 +310,8 @@ 176 STD { int|linux32_sys||rt_sigpending(linux32_sigsetp_t set, \ netbsd32_size_t sigsetsize); } 177 UNIMPL rt_sigtimedwait -178 UNIMPL rt_queueinfo +178 STD { int|linux32_sys||rt_queueinfo(int pid, int sig, \ + linux32_siginfop_t uinfo); } 179 STD { int|linux32_sys||rt_sigsuspend(linux32_sigsetp_t unewset, \ netbsd32_size_t sigsetsize); } 180 STD { netbsd32_ssize_t|linux32_sys||pread(int fd, \ Index: src/sys/compat/linux32/common/linux32_signal.c diff -u src/sys/compat/linux32/common/linux32_signal.c:1.12 src/sys/compat/linux32/common/linux32_signal.c:1.13 --- src/sys/compat/linux32/common/linux32_signal.c:1.12 Tue Jun 2 16:54:39 2009 +++ src/sys/compat/linux32/common/linux32_signal.c Mon Jun 8 13:34:23 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: linux32_signal.c,v 1.12 2009/06/02 16:54:39 njoly Exp $ */ +/* $NetBSD: linux32_signal.c,v 1.13 2009/06/08 13:34:23 njoly Exp $ */ /*- * Copyright (c) 2006 Emmanuel Dreyfus, all rights reserved. @@ -32,7 +32,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: linux32_signal.c,v 1.12 2009/06/02 16:54:39 njoly Exp $"); +__KERNEL_RCSID(0, "$NetBSD: linux32_signal.c,v 1.13 2009/06/08 13:34:23 njoly Exp $"); #include #include @@ -448,3 +448,25 @@ *retval = olss; return 0; } + +int +linux32_sys_rt_queueinfo(struct lwp *l, const struct linux32_sys_rt_queueinfo_args *uap, register_t *retval) +{ + /* + syscallarg(int) pid; + syscallarg(int) sig; + syscallarg(linux32_siginfop_t) uinfo; + */ + int error; + linux32_siginfo_t info; + + error = copyin(SCARG_P32(uap, uinfo), &info, sizeof(info)); + if (error) + return error; + if (info.lsi_code >= 0) + return EPERM; + + /* XXX To really implement this we need to */ + /* XXX keep a list of queued signals somewhere. */ + return linux32_sys_kill(l, (const void *)uap, retval); +}
CVS commit: src/sys/compat/linux/arch
Module Name:src Committed By: njoly Date: Mon Jun 8 13:29:01 UTC 2009 Modified Files: src/sys/compat/linux/arch/alpha: linux_syscall.h linux_syscallargs.h linux_syscalls.c linux_sysent.c src/sys/compat/linux/arch/amd64: linux_syscall.h linux_syscallargs.h linux_syscalls.c linux_sysent.c src/sys/compat/linux/arch/arm: linux_syscall.h linux_syscallargs.h linux_syscalls.c linux_sysent.c src/sys/compat/linux/arch/i386: linux_syscall.h linux_syscallargs.h linux_syscalls.c linux_sysent.c src/sys/compat/linux/arch/m68k: linux_syscall.h linux_syscallargs.h linux_syscalls.c linux_sysent.c src/sys/compat/linux/arch/mips: linux_syscall.h linux_syscallargs.h linux_syscalls.c linux_sysent.c src/sys/compat/linux/arch/powerpc: linux_syscall.h linux_syscallargs.h linux_syscalls.c linux_sysent.c Log Message: Regen for rt_queueinfo(2) update. To generate a diff of this commit: cvs rdiff -u -r1.73 -r1.74 src/sys/compat/linux/arch/alpha/linux_syscall.h \ src/sys/compat/linux/arch/alpha/linux_sysent.c cvs rdiff -u -r1.72 -r1.73 \ src/sys/compat/linux/arch/alpha/linux_syscallargs.h cvs rdiff -u -r1.74 -r1.75 src/sys/compat/linux/arch/alpha/linux_syscalls.c cvs rdiff -u -r1.32 -r1.33 src/sys/compat/linux/arch/amd64/linux_syscall.h \ src/sys/compat/linux/arch/amd64/linux_syscallargs.h \ src/sys/compat/linux/arch/amd64/linux_syscalls.c \ src/sys/compat/linux/arch/amd64/linux_sysent.c cvs rdiff -u -r1.43 -r1.44 src/sys/compat/linux/arch/arm/linux_syscall.h \ src/sys/compat/linux/arch/arm/linux_syscallargs.h \ src/sys/compat/linux/arch/arm/linux_syscalls.c \ src/sys/compat/linux/arch/arm/linux_sysent.c cvs rdiff -u -r1.83 -r1.84 src/sys/compat/linux/arch/i386/linux_syscall.h \ src/sys/compat/linux/arch/i386/linux_syscallargs.h \ src/sys/compat/linux/arch/i386/linux_sysent.c cvs rdiff -u -r1.84 -r1.85 src/sys/compat/linux/arch/i386/linux_syscalls.c cvs rdiff -u -r1.71 -r1.72 src/sys/compat/linux/arch/m68k/linux_syscall.h \ src/sys/compat/linux/arch/m68k/linux_syscalls.c \ src/sys/compat/linux/arch/m68k/linux_sysent.c cvs rdiff -u -r1.70 -r1.71 src/sys/compat/linux/arch/m68k/linux_syscallargs.h cvs rdiff -u -r1.38 -r1.39 src/sys/compat/linux/arch/mips/linux_syscall.h cvs rdiff -u -r1.37 -r1.38 src/sys/compat/linux/arch/mips/linux_syscallargs.h \ src/sys/compat/linux/arch/mips/linux_syscalls.c \ src/sys/compat/linux/arch/mips/linux_sysent.c cvs rdiff -u -r1.47 -r1.48 src/sys/compat/linux/arch/powerpc/linux_syscall.h \ src/sys/compat/linux/arch/powerpc/linux_sysent.c cvs rdiff -u -r1.46 -r1.47 \ src/sys/compat/linux/arch/powerpc/linux_syscallargs.h \ src/sys/compat/linux/arch/powerpc/linux_syscalls.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/compat/linux/arch/alpha/linux_syscall.h diff -u src/sys/compat/linux/arch/alpha/linux_syscall.h:1.73 src/sys/compat/linux/arch/alpha/linux_syscall.h:1.74 --- src/sys/compat/linux/arch/alpha/linux_syscall.h:1.73 Sat Jan 17 22:34:02 2009 +++ src/sys/compat/linux/arch/alpha/linux_syscall.h Mon Jun 8 13:29:00 2009 @@ -1,10 +1,10 @@ -/* $NetBSD: linux_syscall.h,v 1.73 2009/01/17 22:34:02 njoly Exp $ */ +/* $NetBSD: linux_syscall.h,v 1.74 2009/06/08 13:29:00 njoly Exp $ */ /* * System call numbers. * * DO NOT EDIT-- this file is automatically generated. - * created from NetBSD: syscalls.master,v 1.68 2009/01/17 22:28:52 njoly Exp + * created from NetBSD: syscalls.master,v 1.69 2009/06/08 13:26:57 njoly Exp */ #ifndef _LINUX_SYS_SYSCALL_H_ Index: src/sys/compat/linux/arch/alpha/linux_sysent.c diff -u src/sys/compat/linux/arch/alpha/linux_sysent.c:1.73 src/sys/compat/linux/arch/alpha/linux_sysent.c:1.74 --- src/sys/compat/linux/arch/alpha/linux_sysent.c:1.73 Sat Jan 17 22:34:02 2009 +++ src/sys/compat/linux/arch/alpha/linux_sysent.c Mon Jun 8 13:29:00 2009 @@ -1,14 +1,14 @@ -/* $NetBSD: linux_sysent.c,v 1.73 2009/01/17 22:34:02 njoly Exp $ */ +/* $NetBSD: linux_sysent.c,v 1.74 2009/06/08 13:29:00 njoly Exp $ */ /* * System call switch table. * * DO NOT EDIT-- this file is automatically generated. - * created from NetBSD: syscalls.master,v 1.68 2009/01/17 22:28:52 njoly Exp + * created from NetBSD: syscalls.master,v 1.69 2009/06/08 13:26:57 njoly Exp */ #include -__KERNEL_RCSID(0, "$NetBSD: linux_sysent.c,v 1.73 2009/01/17 22:34:02 njoly Exp $"); +__KERNEL_RCSID(0, "$NetBSD: linux_sysent.c,v 1.74 2009/06/08 13:29:00 njoly Exp $"); #if defined(_KERNEL_OPT) #include "opt_sysv.h" @@ -1095,4 +1095,3 @@ { 0, 0, 0, linux_sys_nosys }, /* 511 = filler */ }; - Index: src/sys/compat/linux/arch/alpha/linux_syscallargs.h diff -u src/sys/compat/linux/arch/alpha/linux_syscallargs.h:1.72 src/sys/compat/linux/arch/alpha/linux_syscallargs.h:1.73 --- src
CVS commit: src/sys/compat/linux/arch
Module Name:src Committed By: njoly Date: Mon Jun 8 13:26:58 UTC 2009 Modified Files: src/sys/compat/linux/arch/alpha: syscalls.master src/sys/compat/linux/arch/amd64: syscalls.master src/sys/compat/linux/arch/arm: syscalls.master src/sys/compat/linux/arch/i386: syscalls.master src/sys/compat/linux/arch/m68k: syscalls.master src/sys/compat/linux/arch/mips: syscalls.master src/sys/compat/linux/arch/powerpc: syscalls.master Log Message: Update rt_queueinfo(2) definition, and kill a corresponding comment. To generate a diff of this commit: cvs rdiff -u -r1.68 -r1.69 src/sys/compat/linux/arch/alpha/syscalls.master cvs rdiff -u -r1.30 -r1.31 src/sys/compat/linux/arch/amd64/syscalls.master cvs rdiff -u -r1.41 -r1.42 src/sys/compat/linux/arch/arm/syscalls.master cvs rdiff -u -r1.99 -r1.100 src/sys/compat/linux/arch/i386/syscalls.master cvs rdiff -u -r1.66 -r1.67 src/sys/compat/linux/arch/m68k/syscalls.master cvs rdiff -u -r1.34 -r1.35 src/sys/compat/linux/arch/mips/syscalls.master cvs rdiff -u -r1.42 -r1.43 src/sys/compat/linux/arch/powerpc/syscalls.master Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/compat/linux/arch/alpha/syscalls.master diff -u src/sys/compat/linux/arch/alpha/syscalls.master:1.68 src/sys/compat/linux/arch/alpha/syscalls.master:1.69 --- src/sys/compat/linux/arch/alpha/syscalls.master:1.68 Sat Jan 17 22:28:52 2009 +++ src/sys/compat/linux/arch/alpha/syscalls.master Mon Jun 8 13:26:57 2009 @@ -1,4 +1,4 @@ - $NetBSD: syscalls.master,v 1.68 2009/01/17 22:28:52 njoly Exp $ + $NetBSD: syscalls.master,v 1.69 2009/06/08 13:26:57 njoly Exp $ ; ; @(#)syscalls.master 8.1 (Berkeley) 7/19/93 @@ -567,7 +567,6 @@ linux_sigset_t *set, \ size_t sigsetsize); } 355 UNIMPL rt_sigtimedwait -; XXX XAX int here? sigset_t here? 356 STD { int|linux_sys||rt_queueinfo(int pid, int signum, \ linux_siginfo_t *uinfo); } 357 STD { int|linux_sys||rt_sigsuspend(linux_sigset_t *unewset, \ Index: src/sys/compat/linux/arch/amd64/syscalls.master diff -u src/sys/compat/linux/arch/amd64/syscalls.master:1.30 src/sys/compat/linux/arch/amd64/syscalls.master:1.31 --- src/sys/compat/linux/arch/amd64/syscalls.master:1.30 Sat Jan 17 22:28:52 2009 +++ src/sys/compat/linux/arch/amd64/syscalls.master Mon Jun 8 13:26:57 2009 @@ -1,4 +1,4 @@ - $NetBSD: syscalls.master,v 1.30 2009/01/17 22:28:52 njoly Exp $ + $NetBSD: syscalls.master,v 1.31 2009/06/08 13:26:57 njoly Exp $ ; @(#)syscalls.master 8.1 (Berkeley) 7/19/93 @@ -289,7 +289,7 @@ size_t sigsetsize); } 128 UNIMPL rt_sigtimedwait 129 STD { int|linux_sys||rt_queueinfo(int pid, int signum, \ - siginfo_t *uinfo); } + linux_siginfo_t *uinfo); } 130 STD { int|linux_sys||rt_sigsuspend(linux_sigset_t *unewset, \ size_t sigsetsize); } 131 STD { int|linux_sys||sigaltstack( \ Index: src/sys/compat/linux/arch/arm/syscalls.master diff -u src/sys/compat/linux/arch/arm/syscalls.master:1.41 src/sys/compat/linux/arch/arm/syscalls.master:1.42 --- src/sys/compat/linux/arch/arm/syscalls.master:1.41 Sat Jan 17 22:28:52 2009 +++ src/sys/compat/linux/arch/arm/syscalls.master Mon Jun 8 13:26:57 2009 @@ -1,4 +1,4 @@ - $NetBSD: syscalls.master,v 1.41 2009/01/17 22:28:52 njoly Exp $ + $NetBSD: syscalls.master,v 1.42 2009/06/08 13:26:57 njoly Exp $ ; Derived from sys/compat/linux/arch/*/syscalls.master ; and from Linux 2.4.12 arch/arm/kernel/calls.S @@ -306,9 +306,8 @@ linux_sigset_t *set, \ size_t sigsetsize); } 177 UNIMPL rt_sigtimedwait -; XXX XAX int here? sigset_t here? siginfo_t 178 STD { int|linux_sys||rt_queueinfo(int pid, int signum, \ - void *uinfo); } + linux_siginfo_t *uinfo); } 179 STD { int|linux_sys||rt_sigsuspend(linux_sigset_t *unewset, \ size_t sigsetsize); } 180 STD { int|linux_sys||pread(int fd, char *buf, \ Index: src/sys/compat/linux/arch/i386/syscalls.master diff -u src/sys/compat/linux/arch/i386/syscalls.master:1.99 src/sys/compat/linux/arch/i386/syscalls.master:1.100 --- src/sys/compat/linux/arch/i386/syscalls.master:1.99 Sat Jan 17 22:28:52 2009 +++ src/sys/compat/linux/arch/i386/syscalls.master Mon Jun 8 13:26:57 2009 @@ -1,4 +1,4 @@ - $NetBSD: syscalls.master,v 1.99 2009/01/17 22:28:52 njoly Exp $ + $NetBSD: syscalls.master,v 1.100 2009/06/08 13:26:57 njoly Exp $ ; @(#)syscalls.master 8.1 (Berkeley) 7/19/93 @@ -316,9 +316,8 @@ linux_sigset_t *set, \ size_t sigsetsize); } 177 UNIMPL rt_sigtimedwait -; XXX XAX int here? sigset_t here? siginfo_t 178 STD { int|linux_sys||rt_queueinfo(int pid, int signum, \ - void *uinfo); } + linux_siginfo_t *uinfo); } 179 STD { int|linux_sys||rt_sigsuspend(linux_sigset_t *unewset, \ size_t sigsetsize); } 180 STD { int|linux_sys||pread(int fd, char *buf, \ Index: src/sys/compat/linux/arch/m68k/syscalls.mas
CVS commit: src/sys/compat/linux/common
Module Name:src Committed By: njoly Date: Mon Jun 8 13:23:16 UTC 2009 Modified Files: src/sys/compat/linux/common: linux_signal.c Log Message: Small rt_queueinfo(2) update, to require a linux_siginfo structure. While here, cleanup ifdef out argument types. To generate a diff of this commit: cvs rdiff -u -r1.68 -r1.69 src/sys/compat/linux/common/linux_signal.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/compat/linux/common/linux_signal.c diff -u src/sys/compat/linux/common/linux_signal.c:1.68 src/sys/compat/linux/common/linux_signal.c:1.69 --- src/sys/compat/linux/common/linux_signal.c:1.68 Fri May 29 14:19:13 2009 +++ src/sys/compat/linux/common/linux_signal.c Mon Jun 8 13:23:16 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: linux_signal.c,v 1.68 2009/05/29 14:19:13 njoly Exp $ */ +/* $NetBSD: linux_signal.c,v 1.69 2009/06/08 13:23:16 njoly Exp $ */ /*- * Copyright (c) 1995, 1998 The NetBSD Foundation, Inc. @@ -48,7 +48,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: linux_signal.c,v 1.68 2009/05/29 14:19:13 njoly Exp $"); +__KERNEL_RCSID(0, "$NetBSD: linux_signal.c,v 1.69 2009/06/08 13:23:16 njoly Exp $"); #define COMPAT_LINUX 1 @@ -498,14 +498,19 @@ int linux_sys_rt_queueinfo(struct lwp *l, const struct linux_sys_rt_queueinfo_args *uap, register_t *retval) { - /* XXX XAX This isn't this really int, int, siginfo_t *, is it? */ -#if 0 - struct linux_sys_rt_queueinfo_args /* { + /* syscallarg(int) pid; syscallarg(int) signum; - syscallarg(siginfo_t *) uinfo; - } */ *uap = v; -#endif + syscallarg(linix_siginfo_t *) uinfo; + */ + int error; + linux_siginfo_t info; + + error = copyin(SCARG(uap, uinfo), &info, sizeof(info)); + if (error) + return error; + if (info.lsi_code >= 0) + return EPERM; /* XXX To really implement this we need to */ /* XXX keep a list of queued signals somewhere. */
CVS commit: src/sys/compat/linux/arch
Module Name:src Committed By: njoly Date: Mon Jun 8 11:46:07 UTC 2009 Modified Files: src/sys/compat/linux/arch/alpha: linux_siginfo.h src/sys/compat/linux/arch/amd64: linux_siginfo.h src/sys/compat/linux/arch/arm: linux_siginfo.h Log Message: Various compat linux siginfo fixes. - alpha: add missing _uid member to SIGCHLD structure. - amd64: add missing typedef, and fix padding size. - arm: add missing linux_siginfo definition. To generate a diff of this commit: cvs rdiff -u -r1.5 -r1.6 src/sys/compat/linux/arch/alpha/linux_siginfo.h cvs rdiff -u -r1.5 -r1.6 src/sys/compat/linux/arch/amd64/linux_siginfo.h cvs rdiff -u -r1.1 -r1.2 src/sys/compat/linux/arch/arm/linux_siginfo.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/compat/linux/arch/alpha/linux_siginfo.h diff -u src/sys/compat/linux/arch/alpha/linux_siginfo.h:1.5 src/sys/compat/linux/arch/alpha/linux_siginfo.h:1.6 --- src/sys/compat/linux/arch/alpha/linux_siginfo.h:1.5 Sun Nov 23 23:48:48 2008 +++ src/sys/compat/linux/arch/alpha/linux_siginfo.h Mon Jun 8 11:46:06 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: linux_siginfo.h,v 1.5 2008/11/23 23:48:48 njoly Exp $ */ +/* $NetBSD: linux_siginfo.h,v 1.6 2009/06/08 11:46:06 njoly Exp $ */ /*- * Copyright (c) 1998 The NetBSD Foundation, Inc. @@ -69,6 +69,7 @@ /* SIGCHLD */ struct { linux_pid_t _pid; + linux_uid_t _uid; int _status; linux_clock_t _utime; linux_clock_t _stime; Index: src/sys/compat/linux/arch/amd64/linux_siginfo.h diff -u src/sys/compat/linux/arch/amd64/linux_siginfo.h:1.5 src/sys/compat/linux/arch/amd64/linux_siginfo.h:1.6 --- src/sys/compat/linux/arch/amd64/linux_siginfo.h:1.5 Wed May 27 12:20:37 2009 +++ src/sys/compat/linux/arch/amd64/linux_siginfo.h Mon Jun 8 11:46:07 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: linux_siginfo.h,v 1.5 2009/05/27 12:20:37 njoly Exp $ */ +/* $NetBSD: linux_siginfo.h,v 1.6 2009/06/08 11:46:07 njoly Exp $ */ /*- * Copyright (c) 2005 Emmanuel Dreyfus, all rights reserved. @@ -34,7 +34,7 @@ #ifndef _AMD64_LINUX_SIGINFO_H #define _AMD64_LINUX_SIGINFO_H -#define LINUX___ARCH_SI_PREAMBLE_SIZE (3 * sizeof(int)) +#define LINUX___ARCH_SI_PREAMBLE_SIZE (4 * sizeof(int)) #define LINUX_SI_MAX_SIZE 128 #define LINUX_SI_PAD_SIZE \ ((LINUX_SI_MAX_SIZE - LINUX___ARCH_SI_PREAMBLE_SIZE) / sizeof(int)) @@ -45,7 +45,7 @@ } linux_sigval_t; -struct linux_siginfo { +typedef struct linux_siginfo { int lsi_signo; int lsi_errno; int lsi_code; Index: src/sys/compat/linux/arch/arm/linux_siginfo.h diff -u src/sys/compat/linux/arch/arm/linux_siginfo.h:1.1 src/sys/compat/linux/arch/arm/linux_siginfo.h:1.2 --- src/sys/compat/linux/arch/arm/linux_siginfo.h:1.1 Mon Jan 14 23:14:39 2002 +++ src/sys/compat/linux/arch/arm/linux_siginfo.h Mon Jun 8 11:46:07 2009 @@ -1 +1,88 @@ -/* $NetBSD: linux_siginfo.h,v 1.1 2002/01/14 23:14:39 bjh21 Exp $ */ +/* $NetBSD: linux_siginfo.h,v 1.2 2009/06/08 11:46:07 njoly Exp $ */ + +/*- + * This code is derived from software contributed to The NetBSD Foundation + * by Eric Haszlakiewicz. + * + * 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 NETBSD FOUNDATION, INC. AND CONTRIBUTORS + * ``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 FOUNDATION 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. + */ + +#ifndef _ARM_LINUX_SIGINFO_H +#define _ARM_LINUX_SIGINFO_H + +typedef union linux_sigval { + int sival_int; + void *sival_ptr; +} linux_sigval_t; + +#define SI_MAX_SIZE 128 +#define SI_PAD_SIZE ((SI_MAX_SIZE/sizeof(int)) - 3) + +typedef struct linux_siginfo { + int lsi_signo; + int lsi_errno; + int lsi_code; + union { + int _pad[SI_PAD_SIZE]; + + /* kill() */ + struct { + linux_pid_t _pid; + linux_uid_t _uid; + } _kill; + + /* POSIX.1b signals */ + struct { + linux_pid_t _pid;
CVS commit: src/sys/compat/linux32/arch/amd64
Module Name:src Committed By: njoly Date: Fri Jun 5 16:46:52 UTC 2009 Modified Files: src/sys/compat/linux32/arch/amd64: linux32_syscall.h linux32_syscallargs.h linux32_syscalls.c linux32_sysent.c Log Message: Regen for fstatfs. To generate a diff of this commit: cvs rdiff -u -r1.55 -r1.56 \ src/sys/compat/linux32/arch/amd64/linux32_syscall.h \ src/sys/compat/linux32/arch/amd64/linux32_syscallargs.h \ src/sys/compat/linux32/arch/amd64/linux32_syscalls.c \ src/sys/compat/linux32/arch/amd64/linux32_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/compat/linux32/arch/amd64/linux32_syscall.h diff -u src/sys/compat/linux32/arch/amd64/linux32_syscall.h:1.55 src/sys/compat/linux32/arch/amd64/linux32_syscall.h:1.56 --- src/sys/compat/linux32/arch/amd64/linux32_syscall.h:1.55 Thu Jun 4 18:01:02 2009 +++ src/sys/compat/linux32/arch/amd64/linux32_syscall.h Fri Jun 5 16:46:52 2009 @@ -1,10 +1,10 @@ -/* $NetBSD: linux32_syscall.h,v 1.55 2009/06/04 18:01:02 njoly Exp $ */ +/* $NetBSD: linux32_syscall.h,v 1.56 2009/06/05 16:46:52 njoly Exp $ */ /* * System call numbers. * * DO NOT EDIT-- this file is automatically generated. - * created from NetBSD: syscalls.master,v 1.52 2009/06/04 17:59:30 njoly Exp + * created from NetBSD: syscalls.master,v 1.53 2009/06/05 16:45:33 njoly Exp */ #ifndef _LINUX32_SYS_SYSCALL_H_ @@ -268,6 +268,9 @@ /* syscall: "statfs" ret: "int" args: "netbsd32_charp" "linux32_statfsp" */ #define LINUX32_SYS_statfs 99 +/* syscall: "fstatfs" ret: "int" args: "int" "linux32_statfsp" */ +#define LINUX32_SYS_fstatfs 100 + /* syscall: "socketcall" ret: "int" args: "int" "netbsd32_voidp" */ #define LINUX32_SYS_socketcall 102 Index: src/sys/compat/linux32/arch/amd64/linux32_syscallargs.h diff -u src/sys/compat/linux32/arch/amd64/linux32_syscallargs.h:1.55 src/sys/compat/linux32/arch/amd64/linux32_syscallargs.h:1.56 --- src/sys/compat/linux32/arch/amd64/linux32_syscallargs.h:1.55 Thu Jun 4 18:01:02 2009 +++ src/sys/compat/linux32/arch/amd64/linux32_syscallargs.h Fri Jun 5 16:46:52 2009 @@ -1,10 +1,10 @@ -/* $NetBSD: linux32_syscallargs.h,v 1.55 2009/06/04 18:01:02 njoly Exp $ */ +/* $NetBSD: linux32_syscallargs.h,v 1.56 2009/06/05 16:46:52 njoly Exp $ */ /* * System call argument lists. * * DO NOT EDIT-- this file is automatically generated. - * created from NetBSD: syscalls.master,v 1.52 2009/06/04 17:59:30 njoly Exp + * created from NetBSD: syscalls.master,v 1.53 2009/06/05 16:45:33 njoly Exp */ #ifndef _LINUX32_SYS_SYSCALLARGS_H_ @@ -319,6 +319,12 @@ }; check_syscall_args(linux32_sys_statfs) +struct linux32_sys_fstatfs_args { + syscallarg(int) fd; + syscallarg(linux32_statfsp) sp; +}; +check_syscall_args(linux32_sys_fstatfs) + struct linux32_sys_socketcall_args { syscallarg(int) what; syscallarg(netbsd32_voidp) args; @@ -902,6 +908,8 @@ int linux32_sys_statfs(struct lwp *, const struct linux32_sys_statfs_args *, register_t *); +int linux32_sys_fstatfs(struct lwp *, const struct linux32_sys_fstatfs_args *, register_t *); + int linux32_sys_socketcall(struct lwp *, const struct linux32_sys_socketcall_args *, register_t *); int compat_50_netbsd32_setitimer(struct lwp *, const struct compat_50_netbsd32_setitimer_args *, register_t *); Index: src/sys/compat/linux32/arch/amd64/linux32_syscalls.c diff -u src/sys/compat/linux32/arch/amd64/linux32_syscalls.c:1.55 src/sys/compat/linux32/arch/amd64/linux32_syscalls.c:1.56 --- src/sys/compat/linux32/arch/amd64/linux32_syscalls.c:1.55 Thu Jun 4 18:01:02 2009 +++ src/sys/compat/linux32/arch/amd64/linux32_syscalls.c Fri Jun 5 16:46:52 2009 @@ -1,14 +1,14 @@ -/* $NetBSD: linux32_syscalls.c,v 1.55 2009/06/04 18:01:02 njoly Exp $ */ +/* $NetBSD: linux32_syscalls.c,v 1.56 2009/06/05 16:46:52 njoly Exp $ */ /* * System call names. * * DO NOT EDIT-- this file is automatically generated. - * created from NetBSD: syscalls.master,v 1.52 2009/06/04 17:59:30 njoly Exp + * created from NetBSD: syscalls.master,v 1.53 2009/06/05 16:45:33 njoly Exp */ #include -__KERNEL_RCSID(0, "$NetBSD: linux32_syscalls.c,v 1.55 2009/06/04 18:01:02 njoly Exp $"); +__KERNEL_RCSID(0, "$NetBSD: linux32_syscalls.c,v 1.56 2009/06/05 16:46:52 njoly Exp $"); #if defined(_KERNEL_OPT) #include @@ -135,7 +135,7 @@ /* 97 */ "netbsd32_setpriority", /* 98 */ "#98 (unimplemented profil)", /* 99 */ "statfs", - /* 100 */ "#100 (unimplemented fstatfs)", + /* 100 */ "fstatfs", /* 101 */ "#101 (unimplemented ioperm)", /* 102 */ "socketcall", /* 103 */ "#103 (unimplemented syslog)", Index: src/sys/compat/linux32/arch/amd64/linux32_sysent.c diff -u src/sys/compat/linux32/arch/amd64/linux32_sysent.c:1.55 src/sys/compat/linux32/arch/amd64/linux32_sysent.c:1.56 --- src/sys/compat/linux32/arch/amd64/linux32_sysent.c:1.55 Thu Jun 4 18:01:02 2009 +++ src/sys/compat/linux32/arc
CVS commit: src/sys/compat/linux32
Module Name:src Committed By: njoly Date: Fri Jun 5 16:45:33 UTC 2009 Modified Files: src/sys/compat/linux32/arch/amd64: syscalls.master src/sys/compat/linux32/common: linux32_misc.c Log Message: Add fstatfs syscall. To generate a diff of this commit: cvs rdiff -u -r1.52 -r1.53 src/sys/compat/linux32/arch/amd64/syscalls.master cvs rdiff -u -r1.16 -r1.17 src/sys/compat/linux32/common/linux32_misc.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/compat/linux32/arch/amd64/syscalls.master diff -u src/sys/compat/linux32/arch/amd64/syscalls.master:1.52 src/sys/compat/linux32/arch/amd64/syscalls.master:1.53 --- src/sys/compat/linux32/arch/amd64/syscalls.master:1.52 Thu Jun 4 17:59:30 2009 +++ src/sys/compat/linux32/arch/amd64/syscalls.master Fri Jun 5 16:45:33 2009 @@ -1,4 +1,4 @@ - $NetBSD: syscalls.master,v 1.52 2009/06/04 17:59:30 njoly Exp $ + $NetBSD: syscalls.master,v 1.53 2009/06/05 16:45:33 njoly Exp $ ; NetBSD i386 COMPAT_LINUX32 system call name/number "master" file. ; (See syscalls.conf to see what it is processed into.) @@ -196,7 +196,7 @@ 98 UNIMPL profil 99 STD { int|linux32_sys||statfs(netbsd32_charp path, \ linux32_statfsp sp); } -100 UNIMPL fstatfs +100 STD { int|linux32_sys||fstatfs(int fd, linux32_statfsp sp); } 101 UNIMPL ioperm 102 STD { int|linux32_sys||socketcall(int what, netbsd32_voidp args); } 103 UNIMPL syslog Index: src/sys/compat/linux32/common/linux32_misc.c diff -u src/sys/compat/linux32/common/linux32_misc.c:1.16 src/sys/compat/linux32/common/linux32_misc.c:1.17 --- src/sys/compat/linux32/common/linux32_misc.c:1.16 Tue Jan 20 12:00:59 2009 +++ src/sys/compat/linux32/common/linux32_misc.c Fri Jun 5 16:45:33 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: linux32_misc.c,v 1.16 2009/01/20 12:00:59 njoly Exp $ */ +/* $NetBSD: linux32_misc.c,v 1.17 2009/06/05 16:45:33 njoly Exp $ */ /*- * Copyright (c) 1995, 1998, 1999 The NetBSD Foundation, Inc. @@ -32,7 +32,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: linux32_misc.c,v 1.16 2009/01/20 12:00:59 njoly Exp $"); +__KERNEL_RCSID(0, "$NetBSD: linux32_misc.c,v 1.17 2009/06/05 16:45:33 njoly Exp $"); #include #include @@ -89,6 +89,28 @@ return error; } +int +linux32_sys_fstatfs(struct lwp *l, const struct linux32_sys_fstatfs_args *uap, register_t *retval) +{ + /* { + syscallarg(int) fd; + syscallarg(linux32_statfsp) sp; + } */ + struct statvfs *sb; + struct linux_statfs ltmp; + int error; + + sb = STATVFSBUF_GET(); + error = do_sys_fstatvfs(l, SCARG(uap, fd), ST_WAIT, sb); + if (error == 0) { + bsd_to_linux_statfs(sb,
CVS commit: src/sys/compat/linux32/arch/amd64
Module Name:src Committed By: njoly Date: Thu Jun 4 18:01:02 UTC 2009 Modified Files: src/sys/compat/linux32/arch/amd64: linux32_syscall.h linux32_syscallargs.h linux32_syscalls.c linux32_sysent.c Log Message: Regen for stat/lstat/fstat syscalls. To generate a diff of this commit: cvs rdiff -u -r1.54 -r1.55 \ src/sys/compat/linux32/arch/amd64/linux32_syscall.h \ src/sys/compat/linux32/arch/amd64/linux32_syscallargs.h \ src/sys/compat/linux32/arch/amd64/linux32_syscalls.c \ src/sys/compat/linux32/arch/amd64/linux32_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/compat/linux32/arch/amd64/linux32_syscall.h diff -u src/sys/compat/linux32/arch/amd64/linux32_syscall.h:1.54 src/sys/compat/linux32/arch/amd64/linux32_syscall.h:1.55 --- src/sys/compat/linux32/arch/amd64/linux32_syscall.h:1.54 Tue Jun 2 16:55:16 2009 +++ src/sys/compat/linux32/arch/amd64/linux32_syscall.h Thu Jun 4 18:01:02 2009 @@ -1,10 +1,10 @@ -/* $NetBSD: linux32_syscall.h,v 1.54 2009/06/02 16:55:16 njoly Exp $ */ +/* $NetBSD: linux32_syscall.h,v 1.55 2009/06/04 18:01:02 njoly Exp $ */ /* * System call numbers. * * DO NOT EDIT-- this file is automatically generated. - * created from NetBSD: syscalls.master,v 1.51 2009/06/02 16:54:39 njoly Exp + * created from NetBSD: syscalls.master,v 1.52 2009/06/04 17:59:30 njoly Exp */ #ifndef _LINUX32_SYS_SYSCALL_H_ @@ -277,6 +277,15 @@ /* syscall: "compat_50_netbsd32_getitimer" ret: "int" args: "int" "netbsd32_itimerval50p_t" */ #define LINUX32_SYS_compat_50_netbsd32_getitimer 105 +/* syscall: "stat" ret: "int" args: "netbsd32_charp" "linux32_statp" */ +#define LINUX32_SYS_stat 106 + +/* syscall: "lstat" ret: "int" args: "netbsd32_charp" "linux32_statp" */ +#define LINUX32_SYS_lstat 107 + +/* syscall: "fstat" ret: "int" args: "int" "linux32_statp" */ +#define LINUX32_SYS_fstat 108 + /* syscall: "olduname" ret: "int" args: "linux32_oldutsnamep_t" */ #define LINUX32_SYS_olduname 109 Index: src/sys/compat/linux32/arch/amd64/linux32_syscallargs.h diff -u src/sys/compat/linux32/arch/amd64/linux32_syscallargs.h:1.54 src/sys/compat/linux32/arch/amd64/linux32_syscallargs.h:1.55 --- src/sys/compat/linux32/arch/amd64/linux32_syscallargs.h:1.54 Tue Jun 2 16:55:16 2009 +++ src/sys/compat/linux32/arch/amd64/linux32_syscallargs.h Thu Jun 4 18:01:02 2009 @@ -1,10 +1,10 @@ -/* $NetBSD: linux32_syscallargs.h,v 1.54 2009/06/02 16:55:16 njoly Exp $ */ +/* $NetBSD: linux32_syscallargs.h,v 1.55 2009/06/04 18:01:02 njoly Exp $ */ /* * System call argument lists. * * DO NOT EDIT-- this file is automatically generated. - * created from NetBSD: syscalls.master,v 1.51 2009/06/02 16:54:39 njoly Exp + * created from NetBSD: syscalls.master,v 1.52 2009/06/04 17:59:30 njoly Exp */ #ifndef _LINUX32_SYS_SYSCALLARGS_H_ @@ -329,6 +329,24 @@ struct compat_50_netbsd32_getitimer_args; +struct linux32_sys_stat_args { + syscallarg(netbsd32_charp) path; + syscallarg(linux32_statp) sp; +}; +check_syscall_args(linux32_sys_stat) + +struct linux32_sys_lstat_args { + syscallarg(netbsd32_charp) path; + syscallarg(linux32_statp) sp; +}; +check_syscall_args(linux32_sys_lstat) + +struct linux32_sys_fstat_args { + syscallarg(int) fd; + syscallarg(linux32_statp) sp; +}; +check_syscall_args(linux32_sys_fstat) + struct linux32_sys_olduname_args { syscallarg(linux32_oldutsnamep_t) up; }; @@ -890,6 +908,12 @@ int compat_50_netbsd32_getitimer(struct lwp *, const struct compat_50_netbsd32_getitimer_args *, register_t *); +int linux32_sys_stat(struct lwp *, const struct linux32_sys_stat_args *, register_t *); + +int linux32_sys_lstat(struct lwp *, const struct linux32_sys_lstat_args *, register_t *); + +int linux32_sys_fstat(struct lwp *, const struct linux32_sys_fstat_args *, register_t *); + int linux32_sys_olduname(struct lwp *, const struct linux32_sys_olduname_args *, register_t *); int linux32_sys_wait4(struct lwp *, const struct linux32_sys_wait4_args *, register_t *); Index: src/sys/compat/linux32/arch/amd64/linux32_syscalls.c diff -u src/sys/compat/linux32/arch/amd64/linux32_syscalls.c:1.54 src/sys/compat/linux32/arch/amd64/linux32_syscalls.c:1.55 --- src/sys/compat/linux32/arch/amd64/linux32_syscalls.c:1.54 Tue Jun 2 16:55:16 2009 +++ src/sys/compat/linux32/arch/amd64/linux32_syscalls.c Thu Jun 4 18:01:02 2009 @@ -1,14 +1,14 @@ -/* $NetBSD: linux32_syscalls.c,v 1.54 2009/06/02 16:55:16 njoly Exp $ */ +/* $NetBSD: linux32_syscalls.c,v 1.55 2009/06/04 18:01:02 njoly Exp $ */ /* * System call names. * * DO NOT EDIT-- this file is automatically generated. - * created from NetBSD: syscalls.master,v 1.51 2009/06/02 16:54:39 njoly Exp + * created from NetBSD: syscalls.master,v 1.52 2009/06/04 17:59:30 njoly Exp */ #include -__KERNEL_RCSID(0, "$NetBSD: linux32_syscalls.c,v 1.54 2009/06/02 16:55:16 njoly Exp $"); +__KERNEL_RCSID(
CVS commit: src/sys/compat/linux32
Module Name:src Committed By: njoly Date: Thu Jun 4 17:59:30 UTC 2009 Modified Files: src/sys/compat/linux32/arch/amd64: syscalls.master src/sys/compat/linux32/common: linux32_stat.c Log Message: Add stat/lstat/fstat syscalls. To generate a diff of this commit: cvs rdiff -u -r1.51 -r1.52 src/sys/compat/linux32/arch/amd64/syscalls.master cvs rdiff -u -r1.15 -r1.16 src/sys/compat/linux32/common/linux32_stat.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/compat/linux32/arch/amd64/syscalls.master diff -u src/sys/compat/linux32/arch/amd64/syscalls.master:1.51 src/sys/compat/linux32/arch/amd64/syscalls.master:1.52 --- src/sys/compat/linux32/arch/amd64/syscalls.master:1.51 Tue Jun 2 16:54:39 2009 +++ src/sys/compat/linux32/arch/amd64/syscalls.master Thu Jun 4 17:59:30 2009 @@ -1,4 +1,4 @@ - $NetBSD: syscalls.master,v 1.51 2009/06/02 16:54:39 njoly Exp $ + $NetBSD: syscalls.master,v 1.52 2009/06/04 17:59:30 njoly Exp $ ; NetBSD i386 COMPAT_LINUX32 system call name/number "master" file. ; (See syscalls.conf to see what it is processed into.) @@ -204,9 +204,12 @@ netbsd32_itimerval50p_t itv, netbsd32_itimerval50p_t oitv); } 105 NOARGS { int|compat_50_netbsd32||getitimer(int which, \ netbsd32_itimerval50p_t itv); } -106 UNIMPL stat -107 UNIMPL lstat -108 UNIMPL fstat +106 STD { int|linux32_sys||stat(netbsd32_charp path, \ + linux32_statp sp); } +107 STD { int|linux32_sys||lstat(netbsd32_charp path, \ + linux32_statp sp); } +108 STD { int|linux32_sys||fstat(int fd, \ + linux32_statp sp); } 109 STD { int|linux32_sys||olduname(linux32_oldutsnamep_t up); } 110 UNIMPL iopl 111 UNIMPL vhangup Index: src/sys/compat/linux32/common/linux32_stat.c diff -u src/sys/compat/linux32/common/linux32_stat.c:1.15 src/sys/compat/linux32/common/linux32_stat.c:1.16 --- src/sys/compat/linux32/common/linux32_stat.c:1.15 Wed Jun 3 15:13:26 2009 +++ src/sys/compat/linux32/common/linux32_stat.c Thu Jun 4 17:59:30 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: linux32_stat.c,v 1.15 2009/06/03 15:13:26 njoly Exp $ */ +/* $NetBSD: linux32_stat.c,v 1.16 2009/06/04 17:59:30 njoly Exp $ */ /*- * Copyright (c) 2006 Emmanuel Dreyfus, all rights reserved. @@ -33,7 +33,7 @@ #include -__KERNEL_RCSID(0, "$NetBSD: linux32_stat.c,v 1.15 2009/06/03 15:13:26 njoly Exp $"); +__KERNEL_RCSID(0, "$NetBSD: linux32_stat.c,v 1.16 2009/06/04 17:59:30 njoly Exp $"); #include #include @@ -74,11 +74,39 @@ #include #include +static inline void bsd_to_linux32_stat(struct stat *, struct linux32_stat *); static inline void bsd_to_linux32_stat64(struct stat *, struct linux32_stat64 *); #define linux_fakedev(x,y) (x) static inline void +bsd_to_linux32_stat(struct stat *st, struct linux32_stat *st32) +{ + memset(st32, 0, sizeof(*st32)); + st32->lst_dev = linux_fakedev(st->st_dev, 0); + st32->lst_ino = st->st_ino; + st32->lst_mode = st->st_mode; + if (st->st_nlink >= (1 << 15)) + st32->lst_nlink = (1 << 15) - 1; + else + st32->lst_nlink = st->st_nlink; + st32->lst_uid = st->st_uid; + st32->lst_gid = st->st_gid; + st32->lst_rdev = linux_fakedev(st->st_rdev, 0); + st32->lst_size = st->st_size; + st32->lst_blksize = st->st_blksize; + st32->lst_blocks = st->st_blocks; + st32->lst_atime = st->st_atime; + st32->lst_mtime = st->st_mtime; + st32->lst_ctime = st->st_ctime; +#ifdef LINUX32_STAT_HAS_NSEC + st32->lst_atime_nsec = st->st_atimensec; + st32->lst_mtime_nsec = st->st_mtimensec; + st32->lst_ctime_nsec = st->st_ctimensec; +#endif +} + +static inline void bsd_to_linux32_stat64(struct stat *st, struct linux32_stat64 *st32) { memset(st32, 0, sizeof(*st32)); @@ -109,6 +137,63 @@ } int +linux32_sys_stat(struct lwp *l, const struct linux32_sys_stat_args *uap, register_t *retval) +{ + /* { + syscallarg(netbsd32_charp) path; + syscallarg(linux32_statp) sp; + } */ + int error; + struct stat st; + struct linux32_stat st32; + + error = do_sys_stat(SCARG_P32(uap, path), FOLLOW, &st); + if (error != 0) + return error; + + bsd_to_linux32_stat(&st, &st32); + return copyout(&st32, SCARG_P32(uap, sp), sizeof(st32)); +} + +int +linux32_sys_lstat(struct lwp *l, const struct linux32_sys_lstat_args *uap, register_t *retval) +{ + /* { + syscallarg(netbsd32_charp) path; + syscallarg(linux32_statp) sp; + } */ + int error; + struct stat st; + struct linux32_stat st32; + + error = do_sys_stat(SCARG_P32(uap, path), NOFOLLOW, &st); + if (error != 0) + return error; + + bsd_to_linux32_stat(&st, &st32); + return copyout(&st32, SCARG_P32(uap, sp), sizeof(st32)); +} + +int +linux32_sys_fstat(struct lwp *l, const struct linux32_sys_fstat_args *uap, register_t *retval) +{ + /* { + syscallarg(int) fd; + syscallarg(linux32_statp) sp; + } */ + int error; + struct stat st; + struct linux32_stat st32; + + error = do_sys_fstat(SCARG(uap, fd), &st); + if (error != 0)
CVS commit: src/sys/compat/linux32/common
Module Name:src Committed By: njoly Date: Wed Jun 3 15:13:26 UTC 2009 Modified Files: src/sys/compat/linux32/common: linux32_stat.c Log Message: Cleanup (no functional changes). Kill some unneeded variables and return stattement. Rename linux32_from_stat() to better bsd_to_linux32_stat64(). Fix some types. To generate a diff of this commit: cvs rdiff -u -r1.14 -r1.15 src/sys/compat/linux32/common/linux32_stat.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/compat/linux32/common/linux32_stat.c diff -u src/sys/compat/linux32/common/linux32_stat.c:1.14 src/sys/compat/linux32/common/linux32_stat.c:1.15 --- src/sys/compat/linux32/common/linux32_stat.c:1.14 Wed Jun 3 14:17:18 2009 +++ src/sys/compat/linux32/common/linux32_stat.c Wed Jun 3 15:13:26 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: linux32_stat.c,v 1.14 2009/06/03 14:17:18 njoly Exp $ */ +/* $NetBSD: linux32_stat.c,v 1.15 2009/06/03 15:13:26 njoly Exp $ */ /*- * Copyright (c) 2006 Emmanuel Dreyfus, all rights reserved. @@ -33,7 +33,7 @@ #include -__KERNEL_RCSID(0, "$NetBSD: linux32_stat.c,v 1.14 2009/06/03 14:17:18 njoly Exp $"); +__KERNEL_RCSID(0, "$NetBSD: linux32_stat.c,v 1.15 2009/06/03 15:13:26 njoly Exp $"); #include #include @@ -74,11 +74,12 @@ #include #include -static inline void linux32_from_stat(struct stat *, struct linux32_stat64 *); +static inline void bsd_to_linux32_stat64(struct stat *, struct linux32_stat64 *); #define linux_fakedev(x,y) (x) + static inline void -linux32_from_stat(struct stat *st, struct linux32_stat64 *st32) +bsd_to_linux32_stat64(struct stat *st, struct linux32_stat64 *st32) { memset(st32, 0, sizeof(*st32)); st32->lst_dev = linux_fakedev(st->st_dev, 0); @@ -105,8 +106,6 @@ #ifdef LINUX32_STAT64_HAS_BROKEN_ST_INO st32->__lst_ino = st->st_ino; #endif - - return; } int @@ -114,23 +113,18 @@ { /* { syscallarg(netbsd32_charp) path; - syscallarg(linux32_statp) sp; + syscallarg(linux32_stat64p) sp; } */ int error; struct stat st; struct linux32_stat64 st32; - struct linux32_stat64 *st32p; - const char *path = SCARG_P32(uap, path); - error = do_sys_stat(path, FOLLOW, &st); + error = do_sys_stat(SCARG_P32(uap, path), FOLLOW, &st); if (error != 0) return error; - linux32_from_stat(&st, &st32); - - st32p = SCARG_P32(uap, sp); - - return copyout(&st32, st32p, sizeof(*st32p)); + bsd_to_linux32_stat64(&st, &st32); + return copyout(&st32, SCARG_P32(uap, sp), sizeof(st32)); } int @@ -143,18 +137,13 @@ int error; struct stat st; struct linux32_stat64 st32; - struct linux32_stat64 *st32p; - const char *path = SCARG_P32(uap, path); - error = do_sys_stat(path, NOFOLLOW, &st); + error = do_sys_stat(SCARG_P32(uap, path), NOFOLLOW, &st); if (error != 0) return error; - linux32_from_stat(&st, &st32); - - st32p = SCARG_P32(uap, sp); - - return copyout(&st32, st32p, sizeof(*st32p)); + bsd_to_linux32_stat64(&st, &st32); + return copyout(&st32, SCARG_P32(uap, sp), sizeof(st32)); } int @@ -167,15 +156,11 @@ int error; struct stat st; struct linux32_stat64 st32; - struct linux32_stat64 *st32p; error = do_sys_fstat(SCARG(uap, fd), &st); if (error != 0) return error; - linux32_from_stat(&st, &st32); - - st32p = SCARG_P32(uap, sp); - - return copyout(&st32, st32p, sizeof(*st32p)); + bsd_to_linux32_stat64(&st, &st32); + return copyout(&st32, SCARG_P32(uap, sp), sizeof(st32)); }
CVS commit: src/sys/compat/linux32/common
Module Name:src Committed By: njoly Date: Wed Jun 3 14:17:19 UTC 2009 Modified Files: src/sys/compat/linux32/common: linux32_stat.c Log Message: Fix inverted lst_ino/__lst_ino assignment in linux32_from_stat(). To generate a diff of this commit: cvs rdiff -u -r1.13 -r1.14 src/sys/compat/linux32/common/linux32_stat.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/compat/linux32/common/linux32_stat.c diff -u src/sys/compat/linux32/common/linux32_stat.c:1.13 src/sys/compat/linux32/common/linux32_stat.c:1.14 --- src/sys/compat/linux32/common/linux32_stat.c:1.13 Wed Mar 18 16:00:17 2009 +++ src/sys/compat/linux32/common/linux32_stat.c Wed Jun 3 14:17:18 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: linux32_stat.c,v 1.13 2009/03/18 16:00:17 cegger Exp $ */ +/* $NetBSD: linux32_stat.c,v 1.14 2009/06/03 14:17:18 njoly Exp $ */ /*- * Copyright (c) 2006 Emmanuel Dreyfus, all rights reserved. @@ -33,7 +33,7 @@ #include -__KERNEL_RCSID(0, "$NetBSD: linux32_stat.c,v 1.13 2009/03/18 16:00:17 cegger Exp $"); +__KERNEL_RCSID(0, "$NetBSD: linux32_stat.c,v 1.14 2009/06/03 14:17:18 njoly Exp $"); #include #include @@ -82,7 +82,7 @@ { memset(st32, 0, sizeof(*st32)); st32->lst_dev = linux_fakedev(st->st_dev, 0); - st32->__lst_ino = st->st_ino; + st32->lst_ino = st->st_ino; st32->lst_mode = st->st_mode; if (st->st_nlink >= (1 << 15)) st32->lst_nlink = (1 << 15) - 1; @@ -103,7 +103,7 @@ st32->lst_ctime_nsec = st->st_ctimensec; #endif #ifdef LINUX32_STAT64_HAS_BROKEN_ST_INO - st32->lst_ino = st->st_ino; + st32->__lst_ino = st->st_ino; #endif return;
CVS commit: src/sys/compat/linux32/arch/amd64
Module Name:src Committed By: njoly Date: Tue Jun 2 16:55:16 UTC 2009 Modified Files: src/sys/compat/linux32/arch/amd64: linux32_syscall.h linux32_syscallargs.h linux32_syscalls.c linux32_sysent.c Log Message: Regen for siggetmask/sigsetmask. To generate a diff of this commit: cvs rdiff -u -r1.53 -r1.54 \ src/sys/compat/linux32/arch/amd64/linux32_syscall.h \ src/sys/compat/linux32/arch/amd64/linux32_syscallargs.h \ src/sys/compat/linux32/arch/amd64/linux32_syscalls.c \ src/sys/compat/linux32/arch/amd64/linux32_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/compat/linux32/arch/amd64/linux32_syscall.h diff -u src/sys/compat/linux32/arch/amd64/linux32_syscall.h:1.53 src/sys/compat/linux32/arch/amd64/linux32_syscall.h:1.54 --- src/sys/compat/linux32/arch/amd64/linux32_syscall.h:1.53 Fri Jan 30 13:57:39 2009 +++ src/sys/compat/linux32/arch/amd64/linux32_syscall.h Tue Jun 2 16:55:16 2009 @@ -1,10 +1,10 @@ -/* $NetBSD: linux32_syscall.h,v 1.53 2009/01/30 13:57:39 njoly Exp $ */ +/* $NetBSD: linux32_syscall.h,v 1.54 2009/06/02 16:55:16 njoly Exp $ */ /* * System call numbers. * * DO NOT EDIT-- this file is automatically generated. - * created from NetBSD: syscalls.master,v 1.50 2009/01/30 13:55:51 njoly Exp + * created from NetBSD: syscalls.master,v 1.51 2009/06/02 16:54:39 njoly Exp */ #ifndef _LINUX32_SYS_SYSCALL_H_ @@ -184,6 +184,12 @@ /* syscall: "setsid" ret: "int" args: */ #define LINUX32_SYS_setsid 66 +/* syscall: "siggetmask" ret: "int" args: */ +#define LINUX32_SYS_siggetmask 68 + +/* syscall: "sigsetmask" ret: "int" args: "linux32_old_sigset_t" */ +#define LINUX32_SYS_sigsetmask 69 + /* syscall: "setreuid16" ret: "int" args: "linux32_uid16_t" "linux32_uid16_t" */ #define LINUX32_SYS_setreuid16 70 Index: src/sys/compat/linux32/arch/amd64/linux32_syscallargs.h diff -u src/sys/compat/linux32/arch/amd64/linux32_syscallargs.h:1.53 src/sys/compat/linux32/arch/amd64/linux32_syscallargs.h:1.54 --- src/sys/compat/linux32/arch/amd64/linux32_syscallargs.h:1.53 Fri Jan 30 13:57:39 2009 +++ src/sys/compat/linux32/arch/amd64/linux32_syscallargs.h Tue Jun 2 16:55:16 2009 @@ -1,10 +1,10 @@ -/* $NetBSD: linux32_syscallargs.h,v 1.53 2009/01/30 13:57:39 njoly Exp $ */ +/* $NetBSD: linux32_syscallargs.h,v 1.54 2009/06/02 16:55:16 njoly Exp $ */ /* * System call argument lists. * * DO NOT EDIT-- this file is automatically generated. - * created from NetBSD: syscalls.master,v 1.50 2009/01/30 13:55:51 njoly Exp + * created from NetBSD: syscalls.master,v 1.51 2009/06/02 16:54:39 njoly Exp */ #ifndef _LINUX32_SYS_SYSCALLARGS_H_ @@ -197,6 +197,11 @@ struct netbsd32_dup2_args; +struct linux32_sys_sigsetmask_args { + syscallarg(linux32_old_sigset_t) mask; +}; +check_syscall_args(linux32_sys_sigsetmask) + struct linux32_sys_setreuid16_args { syscallarg(linux32_uid16_t) ruid; syscallarg(linux32_uid16_t) euid; @@ -823,6 +828,10 @@ int sys_setsid(struct lwp *, const void *, register_t *); +int linux32_sys_siggetmask(struct lwp *, const void *, register_t *); + +int linux32_sys_sigsetmask(struct lwp *, const struct linux32_sys_sigsetmask_args *, register_t *); + int linux32_sys_setreuid16(struct lwp *, const struct linux32_sys_setreuid16_args *, register_t *); int linux32_sys_setregid16(struct lwp *, const struct linux32_sys_setregid16_args *, register_t *); Index: src/sys/compat/linux32/arch/amd64/linux32_syscalls.c diff -u src/sys/compat/linux32/arch/amd64/linux32_syscalls.c:1.53 src/sys/compat/linux32/arch/amd64/linux32_syscalls.c:1.54 --- src/sys/compat/linux32/arch/amd64/linux32_syscalls.c:1.53 Fri Jan 30 13:57:39 2009 +++ src/sys/compat/linux32/arch/amd64/linux32_syscalls.c Tue Jun 2 16:55:16 2009 @@ -1,14 +1,14 @@ -/* $NetBSD: linux32_syscalls.c,v 1.53 2009/01/30 13:57:39 njoly Exp $ */ +/* $NetBSD: linux32_syscalls.c,v 1.54 2009/06/02 16:55:16 njoly Exp $ */ /* * System call names. * * DO NOT EDIT-- this file is automatically generated. - * created from NetBSD: syscalls.master,v 1.50 2009/01/30 13:55:51 njoly Exp + * created from NetBSD: syscalls.master,v 1.51 2009/06/02 16:54:39 njoly Exp */ #include -__KERNEL_RCSID(0, "$NetBSD: linux32_syscalls.c,v 1.53 2009/01/30 13:57:39 njoly Exp $"); +__KERNEL_RCSID(0, "$NetBSD: linux32_syscalls.c,v 1.54 2009/06/02 16:55:16 njoly Exp $"); #if defined(_KERNEL_OPT) #include @@ -103,8 +103,8 @@ /* 65 */ "getpgrp", /* 66 */ "setsid", /* 67 */ "#67 (unimplemented sigaction)", - /* 68 */ "#68 (unimplemented siggetmask)", - /* 69 */ "#69 (unimplemented sigsetmask)", + /* 68 */ "siggetmask", + /* 69 */ "sigsetmask", /* 70 */ "setreuid16", /* 71 */ "setregid16", /* 72 */ "#72 (unimplemented sigsuspend)", Index: src/sys/compat/linux32/arch/amd64/linux32_sysent.c diff -u src/sys/compat/linux32/arch/amd64/linux32_sysent.c:1.53 src/sys/compat/
CVS commit: src/sys/compat/linux32
Module Name:src Committed By: njoly Date: Tue Jun 2 16:54:39 UTC 2009 Modified Files: src/sys/compat/linux32/arch/amd64: syscalls.master src/sys/compat/linux32/common: linux32_signal.c Log Message: Add siggetmask/sigsetmask syscalls. To generate a diff of this commit: cvs rdiff -u -r1.50 -r1.51 src/sys/compat/linux32/arch/amd64/syscalls.master cvs rdiff -u -r1.11 -r1.12 src/sys/compat/linux32/common/linux32_signal.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/compat/linux32/arch/amd64/syscalls.master diff -u src/sys/compat/linux32/arch/amd64/syscalls.master:1.50 src/sys/compat/linux32/arch/amd64/syscalls.master:1.51 --- src/sys/compat/linux32/arch/amd64/syscalls.master:1.50 Fri Jan 30 13:55:51 2009 +++ src/sys/compat/linux32/arch/amd64/syscalls.master Tue Jun 2 16:54:39 2009 @@ -1,4 +1,4 @@ - $NetBSD: syscalls.master,v 1.50 2009/01/30 13:55:51 njoly Exp $ + $NetBSD: syscalls.master,v 1.51 2009/06/02 16:54:39 njoly Exp $ ; NetBSD i386 COMPAT_LINUX32 system call name/number "master" file. ; (See syscalls.conf to see what it is processed into.) @@ -144,8 +144,8 @@ 65 NOARGS { int|sys||getpgrp(void); } 66 NOARGS { int|sys||setsid(void); } 67 UNIMPL sigaction -68 UNIMPL siggetmask -69 UNIMPL sigsetmask +68 STD { int|linux32_sys||siggetmask(void); } +69 STD { int|linux32_sys||sigsetmask(linux32_old_sigset_t mask); } 70 STD { int|linux32_sys||setreuid16(linux32_uid16_t ruid, \ linux32_uid16_t euid); } 71 STD { int|linux32_sys||setregid16(linux32_gid16_t rgid, \ Index: src/sys/compat/linux32/common/linux32_signal.c diff -u src/sys/compat/linux32/common/linux32_signal.c:1.11 src/sys/compat/linux32/common/linux32_signal.c:1.12 --- src/sys/compat/linux32/common/linux32_signal.c:1.11 Wed Mar 18 16:00:17 2009 +++ src/sys/compat/linux32/common/linux32_signal.c Tue Jun 2 16:54:39 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: linux32_signal.c,v 1.11 2009/03/18 16:00:17 cegger Exp $ */ +/* $NetBSD: linux32_signal.c,v 1.12 2009/06/02 16:54:39 njoly Exp $ */ /*- * Copyright (c) 2006 Emmanuel Dreyfus, all rights reserved. @@ -32,7 +32,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: linux32_signal.c,v 1.11 2009/03/18 16:00:17 cegger Exp $"); +__KERNEL_RCSID(0, "$NetBSD: linux32_signal.c,v 1.12 2009/06/02 16:54:39 njoly Exp $"); #include #include @@ -407,3 +407,44 @@ native_to_linux32_sigset(&lss, &bss); return copyout(&lss, SCARG_P32(uap, set), sizeof(lss)); } + +int +linux32_sys_siggetmask(struct lwp *l, const void *v, register_t *retval) +{ + struct proc *p = l->l_proc; + sigset_t bss; + linux32_old_sigset_t lss; + int error; + + mutex_enter(p->p_lock); + error = sigprocmask1(l, SIG_SETMASK, 0, &bss); + mutex_exit(p->p_lock); + if (error) + return error; + native_to_linux32_old_sigset(&lss, &bss); + *retval = lss; + return 0; +} + +int +linux32_sys_sigsetmask(struct lwp *l, const struct linux32_sys_sigsetmask_args *uap, register_t *retval) +{ + /* { + syscallarg(linux32_old_sigset_t) mask; + } */ + sigset_t nbss, obss; + linux32_old_sigset_t nlss, olss; + struct proc *p = l->l_proc; + int error; + + nlss = SCARG(uap, mask); + linux32_old_to_native_sigset(&nbss, &nlss); + mutex_enter(p->p_lock); + error = sigprocmask1(l, SIG_SETMASK, &nbss, &obss); + mutex_exit(p->p_lock); + if (error) + return error; + native_to_linux32_old_sigset(&olss, &obss); + *retval = olss; + return 0; +}
CVS commit: src/sys/compat/linux/common
Module Name:src Committed By: njoly Date: Tue Jun 2 16:53:07 UTC 2009 Modified Files: src/sys/compat/linux/common: linux_sig_notalpha.c Log Message: Add the mask value returned by siggetmask. To generate a diff of this commit: cvs rdiff -u -r1.38 -r1.39 src/sys/compat/linux/common/linux_sig_notalpha.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/compat/linux/common/linux_sig_notalpha.c diff -u src/sys/compat/linux/common/linux_sig_notalpha.c:1.38 src/sys/compat/linux/common/linux_sig_notalpha.c:1.39 --- src/sys/compat/linux/common/linux_sig_notalpha.c:1.38 Mon Apr 28 20:23:44 2008 +++ src/sys/compat/linux/common/linux_sig_notalpha.c Tue Jun 2 16:53:07 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: linux_sig_notalpha.c,v 1.38 2008/04/28 20:23:44 martin Exp $ */ +/* $NetBSD: linux_sig_notalpha.c,v 1.39 2009/06/02 16:53:07 njoly Exp $ */ /*- * Copyright (c) 1995, 1998 The NetBSD Foundation, Inc. @@ -34,7 +34,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: linux_sig_notalpha.c,v 1.38 2008/04/28 20:23:44 martin Exp $"); +__KERNEL_RCSID(0, "$NetBSD: linux_sig_notalpha.c,v 1.39 2009/06/02 16:53:07 njoly Exp $"); #include #include @@ -106,6 +106,7 @@ if (error) return (error); native_to_linux_old_sigset(&lss, &bss); + *retval = lss; return (0); }
CVS commit: src/sys/compat
Module Name:src Committed By: njoly Date: Tue Jun 2 13:00:24 UTC 2009 Modified Files: src/sys/compat/linux/common: linux_misc_notalpha.c src/sys/compat/linux32/common: linux32_unistd.c Log Message: Make nice(2) return EPERM on error, not EACCES (from sys_setpriority). To generate a diff of this commit: cvs rdiff -u -r1.105 -r1.106 \ src/sys/compat/linux/common/linux_misc_notalpha.c cvs rdiff -u -r1.32 -r1.33 src/sys/compat/linux32/common/linux32_unistd.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/compat/linux/common/linux_misc_notalpha.c diff -u src/sys/compat/linux/common/linux_misc_notalpha.c:1.105 src/sys/compat/linux/common/linux_misc_notalpha.c:1.106 --- src/sys/compat/linux/common/linux_misc_notalpha.c:1.105 Mon Dec 29 22:21:49 2008 +++ src/sys/compat/linux/common/linux_misc_notalpha.c Tue Jun 2 13:00:23 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: linux_misc_notalpha.c,v 1.105 2008/12/29 22:21:49 njoly Exp $ */ +/* $NetBSD: linux_misc_notalpha.c,v 1.106 2009/06/02 13:00:23 njoly Exp $ */ /*- * Copyright (c) 1995, 1998, 2008 The NetBSD Foundation, Inc. @@ -31,7 +31,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: linux_misc_notalpha.c,v 1.105 2008/12/29 22:21:49 njoly Exp $"); +__KERNEL_RCSID(0, "$NetBSD: linux_misc_notalpha.c,v 1.106 2009/06/02 13:00:23 njoly Exp $"); #include #include @@ -200,13 +200,15 @@ syscallarg(int) incr; } */ struct proc *p = l->l_proc; -struct sys_setpriority_args bsa; + struct sys_setpriority_args bsa; + int error; -SCARG(&bsa, which) = PRIO_PROCESS; -SCARG(&bsa, who) = 0; + SCARG(&bsa, which) = PRIO_PROCESS; + SCARG(&bsa, who) = 0; SCARG(&bsa, prio) = p->p_nice - NZERO + SCARG(uap, incr); -return sys_setpriority(l, &bsa, retval); + error = sys_setpriority(l, &bsa, retval); + return (error) ? EPERM : 0; } #endif /* !__amd64__ */ Index: src/sys/compat/linux32/common/linux32_unistd.c diff -u src/sys/compat/linux32/common/linux32_unistd.c:1.32 src/sys/compat/linux32/common/linux32_unistd.c:1.33 --- src/sys/compat/linux32/common/linux32_unistd.c:1.32 Sun Mar 29 19:21:19 2009 +++ src/sys/compat/linux32/common/linux32_unistd.c Tue Jun 2 13:00:24 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: linux32_unistd.c,v 1.32 2009/03/29 19:21:19 christos Exp $ */ +/* $NetBSD: linux32_unistd.c,v 1.33 2009/06/02 13:00:24 njoly Exp $ */ /*- * Copyright (c) 2006 Emmanuel Dreyfus, all rights reserved. @@ -33,7 +33,7 @@ #include -__KERNEL_RCSID(0, "$NetBSD: linux32_unistd.c,v 1.32 2009/03/29 19:21:19 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: linux32_unistd.c,v 1.33 2009/06/02 13:00:24 njoly Exp $"); #include #include @@ -443,12 +443,14 @@ } */ struct proc *p = l->l_proc; struct sys_setpriority_args bsa; + int error; SCARG(&bsa, which) = PRIO_PROCESS; SCARG(&bsa, who) = 0; SCARG(&bsa, prio) = p->p_nice - NZERO + SCARG(uap, incr); - return sys_setpriority(l, &bsa, retval); + error = sys_setpriority(l, &bsa, retval); + return (error) ? EPERM : 0; } int
CVS commit: src/sys/compat
Module Name:src Committed By: njoly Date: Fri May 29 14:19:13 UTC 2009 Modified Files: src/sys/compat/linux/arch/amd64: linux_machdep.c src/sys/compat/linux/arch/i386: linux_machdep.c src/sys/compat/linux/common: linux_signal.c linux_signal.h src/sys/compat/linux32/arch/amd64: linux32_machdep.c Log Message: Add native to linux siginfo si_status translation, used on i386 and amd64. To generate a diff of this commit: cvs rdiff -u -r1.35 -r1.36 src/sys/compat/linux/arch/amd64/linux_machdep.c cvs rdiff -u -r1.144 -r1.145 src/sys/compat/linux/arch/i386/linux_machdep.c cvs rdiff -u -r1.67 -r1.68 src/sys/compat/linux/common/linux_signal.c cvs rdiff -u -r1.29 -r1.30 src/sys/compat/linux/common/linux_signal.h cvs rdiff -u -r1.21 -r1.22 \ src/sys/compat/linux32/arch/amd64/linux32_machdep.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/compat/linux/arch/amd64/linux_machdep.c diff -u src/sys/compat/linux/arch/amd64/linux_machdep.c:1.35 src/sys/compat/linux/arch/amd64/linux_machdep.c:1.36 --- src/sys/compat/linux/arch/amd64/linux_machdep.c:1.35 Wed Mar 18 16:00:16 2009 +++ src/sys/compat/linux/arch/amd64/linux_machdep.c Fri May 29 14:19:12 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: linux_machdep.c,v 1.35 2009/03/18 16:00:16 cegger Exp $ */ +/* $NetBSD: linux_machdep.c,v 1.36 2009/05/29 14:19:12 njoly Exp $ */ /*- * Copyright (c) 2005 Emmanuel Dreyfus, all rights reserved. @@ -33,7 +33,7 @@ #include -__KERNEL_RCSID(0, "$NetBSD: linux_machdep.c,v 1.35 2009/03/18 16:00:16 cegger Exp $"); +__KERNEL_RCSID(0, "$NetBSD: linux_machdep.c,v 1.36 2009/05/29 14:19:12 njoly Exp $"); #include #include @@ -43,7 +43,6 @@ #include #include /* for process_read_fpregs() */ #include -#include #include #include @@ -246,20 +245,8 @@ sigframe.info._sifields._sigchld._uid = ksi->ksi_uid; sigframe.info._sifields._sigchld._utime = ksi->ksi_utime; sigframe.info._sifields._sigchld._stime = ksi->ksi_stime; - - if (WCOREDUMP(ksi->ksi_status)) { - sigframe.info.lsi_code = LINUX_CLD_DUMPED; - sigframe.info._sifields._sigchld._status = - _WSTATUS(ksi->ksi_status); - } else if (_WSTATUS(ksi->ksi_status)) { - sigframe.info.lsi_code = LINUX_CLD_KILLED; - sigframe.info._sifields._sigchld._status = - _WSTATUS(ksi->ksi_status); - } else { - sigframe.info.lsi_code = LINUX_CLD_EXITED; - sigframe.info._sifields._sigchld._status = - ((ksi->ksi_status & 0xff00U) >> 8); - } + sigframe.info._sifields._sigchld._status = + native_to_linux_si_status(ksi->ksi_code, ksi->ksi_status); break; case LINUX_SIGIO: sigframe.info._sifields._sigpoll._band = ksi->ksi_band; Index: src/sys/compat/linux/arch/i386/linux_machdep.c diff -u src/sys/compat/linux/arch/i386/linux_machdep.c:1.144 src/sys/compat/linux/arch/i386/linux_machdep.c:1.145 --- src/sys/compat/linux/arch/i386/linux_machdep.c:1.144 Thu Apr 23 17:37:51 2009 +++ src/sys/compat/linux/arch/i386/linux_machdep.c Fri May 29 14:19:13 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: linux_machdep.c,v 1.144 2009/04/23 17:37:51 njoly Exp $ */ +/* $NetBSD: linux_machdep.c,v 1.145 2009/05/29 14:19:13 njoly Exp $ */ /*- * Copyright (c) 1995, 2000, 2008, 2009 The NetBSD Foundation, Inc. @@ -30,7 +30,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: linux_machdep.c,v 1.144 2009/04/23 17:37:51 njoly Exp $"); +__KERNEL_RCSID(0, "$NetBSD: linux_machdep.c,v 1.145 2009/05/29 14:19:13 njoly Exp $"); #if defined(_KERNEL_OPT) #include "opt_vm86.h" @@ -298,8 +298,8 @@ lsi->lsi_pid = ksi->ksi_pid; lsi->lsi_utime = ksi->ksi_utime; lsi->lsi_stime = ksi->ksi_stime; - /* XXX is that right? */ - lsi->lsi_status = WEXITSTATUS(ksi->ksi_status); + lsi->lsi_status = + native_to_linux_si_status(ksi->ksi_code, ksi->ksi_status); break; case LINUX_SIGIO: lsi->lsi_band = ksi->ksi_band; Index: src/sys/compat/linux/common/linux_signal.c diff -u src/sys/compat/linux/common/linux_signal.c:1.67 src/sys/compat/linux/common/linux_signal.c:1.68 --- src/sys/compat/linux/common/linux_signal.c:1.67 Wed Feb 18 14:43:22 2009 +++ src/sys/compat/linux/common/linux_signal.c Fri May 29 14:19:13 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: linux_signal.c,v 1.67 2009/02/18 14:43:22 njoly Exp $ */ +/* $NetBSD: linux_signal.c,v 1.68 2009/05/29 14:19:13 njoly Exp $ */ /*- * Copyright (c) 1995, 1998 The NetBSD Foundation, Inc. @@ -48,7 +48,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: linux_signal.c,v 1.67 2009/02/18 14:43:22 njoly Exp $"); +__KERNEL_RCSID(0, "$NetBSD: linux_signal.c,v 1.68 2009/05/29 14:19:13 njoly Exp $"); #define COMPAT_LINUX 1 @@ -63,6 +63,7 @@ #include #include #include +#include #include @@ -686,3 +687,27 @@ return code; } + +int +native_to_linux_si_status(int code, int status) +{ + int sts; + + switch (code) { + case CLD_CONTINUED: + sts = LINUX_SIGCONT; + break; + case CLD_EXITE
CVS commit: src/sys/compat/osf1
Module Name:src Committed By: njoly Date: Fri May 29 09:32:41 UTC 2009 Modified Files: src/sys/compat/osf1: osf1_file.c Log Message: Make getdirentries set a correct block read position for basep argument. To generate a diff of this commit: cvs rdiff -u -r1.35 -r1.36 src/sys/compat/osf1/osf1_file.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/compat/osf1/osf1_file.c diff -u src/sys/compat/osf1/osf1_file.c:1.35 src/sys/compat/osf1/osf1_file.c:1.36 --- src/sys/compat/osf1/osf1_file.c:1.35 Thu May 28 15:21:26 2009 +++ src/sys/compat/osf1/osf1_file.c Fri May 29 09:32:41 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: osf1_file.c,v 1.35 2009/05/28 15:21:26 njoly Exp $ */ +/* $NetBSD: osf1_file.c,v 1.36 2009/05/29 09:32:41 njoly Exp $ */ /* * Copyright (c) 1999 Christopher G. Demetriou. All rights reserved. @@ -58,7 +58,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: osf1_file.c,v 1.35 2009/05/28 15:21:26 njoly Exp $"); +__KERNEL_RCSID(0, "$NetBSD: osf1_file.c,v 1.36 2009/05/29 09:32:41 njoly Exp $"); #if defined(_KERNEL_OPT) #include "opt_syscall_debug.h" @@ -142,7 +142,7 @@ struct uio auio; struct iovec aiov; struct osf1_dirent idb; - off_t off; /* true file offset */ + off_t off, off1;/* true file offset */ int buflen, error, eofflag; off_t *cookiebuf = NULL, *cookie; int ncookies, fd; @@ -164,7 +164,7 @@ buflen = min(MAXBSIZE, SCARG(uap, nbytes)); buf = malloc(buflen, M_TEMP, M_WAITOK); vn_lock(vp, LK_EXCLUSIVE | LK_RETRY); - off = fp->f_offset; + off = off1 = fp->f_offset; again: aiov.iov_base = buf; aiov.iov_len = buflen; @@ -244,7 +244,7 @@ free(cookiebuf, M_TEMP); free(buf, M_TEMP); if (SCARG(uap, basep) != NULL) - error = copyout(&eofflag, SCARG(uap, basep), sizeof(long)); + error = copyout(&off1, SCARG(uap, basep), sizeof(long)); out1: fd_putfile(fd); return error;
CVS commit: src/sys/compat/osf1
Module Name:src Committed By: njoly Date: Thu May 28 15:21:26 UTC 2009 Modified Files: src/sys/compat/osf1: osf1_file.c Log Message: Redo previous, by simply updating basep earlier, before label. To generate a diff of this commit: cvs rdiff -u -r1.34 -r1.35 src/sys/compat/osf1/osf1_file.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/compat/osf1/osf1_file.c diff -u src/sys/compat/osf1/osf1_file.c:1.34 src/sys/compat/osf1/osf1_file.c:1.35 --- src/sys/compat/osf1/osf1_file.c:1.34 Thu May 28 14:48:20 2009 +++ src/sys/compat/osf1/osf1_file.c Thu May 28 15:21:26 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: osf1_file.c,v 1.34 2009/05/28 14:48:20 njoly Exp $ */ +/* $NetBSD: osf1_file.c,v 1.35 2009/05/28 15:21:26 njoly Exp $ */ /* * Copyright (c) 1999 Christopher G. Demetriou. All rights reserved. @@ -58,7 +58,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: osf1_file.c,v 1.34 2009/05/28 14:48:20 njoly Exp $"); +__KERNEL_RCSID(0, "$NetBSD: osf1_file.c,v 1.35 2009/05/28 15:21:26 njoly Exp $"); #if defined(_KERNEL_OPT) #include "opt_syscall_debug.h" @@ -243,10 +243,10 @@ if (cookiebuf) free(cookiebuf, M_TEMP); free(buf, M_TEMP); + if (SCARG(uap, basep) != NULL) + error = copyout(&eofflag, SCARG(uap, basep), sizeof(long)); out1: fd_putfile(fd); - if (error == 0 && SCARG(uap, basep) != NULL) - error = copyout(&eofflag, SCARG(uap, basep), sizeof(long)); return error; }
CVS commit: src/sys/compat/osf1
Module Name:src Committed By: njoly Date: Thu May 28 14:48:20 UTC 2009 Modified Files: src/sys/compat/osf1: osf1_file.c Log Message: Make getdirentries(2) correctly fail with EINVAL for an invalid file descriptor (not for a directory), by not updating basep syscall argument on error. To generate a diff of this commit: cvs rdiff -u -r1.33 -r1.34 src/sys/compat/osf1/osf1_file.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/compat/osf1/osf1_file.c diff -u src/sys/compat/osf1/osf1_file.c:1.33 src/sys/compat/osf1/osf1_file.c:1.34 --- src/sys/compat/osf1/osf1_file.c:1.33 Mon May 18 12:39:02 2009 +++ src/sys/compat/osf1/osf1_file.c Thu May 28 14:48:20 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: osf1_file.c,v 1.33 2009/05/18 12:39:02 njoly Exp $ */ +/* $NetBSD: osf1_file.c,v 1.34 2009/05/28 14:48:20 njoly Exp $ */ /* * Copyright (c) 1999 Christopher G. Demetriou. All rights reserved. @@ -58,7 +58,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: osf1_file.c,v 1.33 2009/05/18 12:39:02 njoly Exp $"); +__KERNEL_RCSID(0, "$NetBSD: osf1_file.c,v 1.34 2009/05/28 14:48:20 njoly Exp $"); #if defined(_KERNEL_OPT) #include "opt_syscall_debug.h" @@ -245,7 +245,7 @@ free(buf, M_TEMP); out1: fd_putfile(fd); - if (SCARG(uap, basep) != NULL) + if (error == 0 && SCARG(uap, basep) != NULL) error = copyout(&eofflag, SCARG(uap, basep), sizeof(long)); return error; }
CVS commit: src/sys/compat/linux/arch/amd64
Module Name:src Committed By: njoly Date: Wed May 27 12:20:37 UTC 2009 Modified Files: src/sys/compat/linux/arch/amd64: linux_siginfo.h Log Message: Use correct linux_clock_t type for _stime, not native clock_t. To generate a diff of this commit: cvs rdiff -u -r1.4 -r1.5 src/sys/compat/linux/arch/amd64/linux_siginfo.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/compat/linux/arch/amd64/linux_siginfo.h diff -u src/sys/compat/linux/arch/amd64/linux_siginfo.h:1.4 src/sys/compat/linux/arch/amd64/linux_siginfo.h:1.5 --- src/sys/compat/linux/arch/amd64/linux_siginfo.h:1.4 Sun Nov 23 23:48:48 2008 +++ src/sys/compat/linux/arch/amd64/linux_siginfo.h Wed May 27 12:20:37 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: linux_siginfo.h,v 1.4 2008/11/23 23:48:48 njoly Exp $ */ +/* $NetBSD: linux_siginfo.h,v 1.5 2009/05/27 12:20:37 njoly Exp $ */ /*- * Copyright (c) 2005 Emmanuel Dreyfus, all rights reserved. @@ -69,7 +69,7 @@ linux_uid_t _uid; int _status; linux_clock_t _utime; - clock_t _stime; + linux_clock_t _stime; } _sigchld; struct {
CVS commit: src/sys/compat/osf1
Module Name:src Committed By: njoly Date: Mon May 18 12:39:02 UTC 2009 Modified Files: src/sys/compat/osf1: osf1_descrip.c osf1_file.c osf1_mmap.c Log Message: Adjust compat osf1 to recent pad -> PAD change. To generate a diff of this commit: cvs rdiff -u -r1.27 -r1.28 src/sys/compat/osf1/osf1_descrip.c cvs rdiff -u -r1.32 -r1.33 src/sys/compat/osf1/osf1_file.c cvs rdiff -u -r1.13 -r1.14 src/sys/compat/osf1/osf1_mmap.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/compat/osf1/osf1_descrip.c diff -u src/sys/compat/osf1/osf1_descrip.c:1.27 src/sys/compat/osf1/osf1_descrip.c:1.28 --- src/sys/compat/osf1/osf1_descrip.c:1.27 Mon Jan 26 13:00:05 2009 +++ src/sys/compat/osf1/osf1_descrip.c Mon May 18 12:39:02 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: osf1_descrip.c,v 1.27 2009/01/26 13:00:05 njoly Exp $ */ +/* $NetBSD: osf1_descrip.c,v 1.28 2009/05/18 12:39:02 njoly Exp $ */ /* * Copyright (c) 1999 Christopher G. Demetriou. All rights reserved. @@ -58,7 +58,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: osf1_descrip.c,v 1.27 2009/01/26 13:00:05 njoly Exp $"); +__KERNEL_RCSID(0, "$NetBSD: osf1_descrip.c,v 1.28 2009/05/18 12:39:02 njoly Exp $"); #include #include @@ -252,7 +252,7 @@ struct sys_ftruncate_args a; SCARG(&a, fd) = SCARG(uap, fd); - SCARG(&a, pad) = 0; + SCARG(&a, PAD) = 0; SCARG(&a, length) = SCARG(uap, length); return sys_ftruncate(l, &a, retval); @@ -264,7 +264,7 @@ struct sys_lseek_args a; SCARG(&a, fd) = SCARG(uap, fd); - SCARG(&a, pad) = 0; + SCARG(&a, PAD) = 0; SCARG(&a, offset) = SCARG(uap, offset); SCARG(&a, whence) = SCARG(uap, whence); Index: src/sys/compat/osf1/osf1_file.c diff -u src/sys/compat/osf1/osf1_file.c:1.32 src/sys/compat/osf1/osf1_file.c:1.33 --- src/sys/compat/osf1/osf1_file.c:1.32 Tue Jan 13 11:35:24 2009 +++ src/sys/compat/osf1/osf1_file.c Mon May 18 12:39:02 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: osf1_file.c,v 1.32 2009/01/13 11:35:24 rtr Exp $ */ +/* $NetBSD: osf1_file.c,v 1.33 2009/05/18 12:39:02 njoly Exp $ */ /* * Copyright (c) 1999 Christopher G. Demetriou. All rights reserved. @@ -58,7 +58,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: osf1_file.c,v 1.32 2009/01/13 11:35:24 rtr Exp $"); +__KERNEL_RCSID(0, "$NetBSD: osf1_file.c,v 1.33 2009/05/18 12:39:02 njoly Exp $"); #if defined(_KERNEL_OPT) #include "opt_syscall_debug.h" @@ -387,7 +387,7 @@ struct sys_truncate_args a; SCARG(&a, path) = SCARG(uap, path); - SCARG(&a, pad) = 0; + SCARG(&a, PAD) = 0; SCARG(&a, length) = SCARG(uap, length); return sys_truncate(l, &a, retval); Index: src/sys/compat/osf1/osf1_mmap.c diff -u src/sys/compat/osf1/osf1_mmap.c:1.13 src/sys/compat/osf1/osf1_mmap.c:1.14 --- src/sys/compat/osf1/osf1_mmap.c:1.13 Thu Dec 20 23:03:03 2007 +++ src/sys/compat/osf1/osf1_mmap.c Mon May 18 12:39:02 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: osf1_mmap.c,v 1.13 2007/12/20 23:03:03 dsl Exp $ */ +/* $NetBSD: osf1_mmap.c,v 1.14 2009/05/18 12:39:02 njoly Exp $ */ /* * Copyright (c) 1999 Christopher G. Demetriou. All rights reserved. @@ -31,7 +31,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: osf1_mmap.c,v 1.13 2007/12/20 23:03:03 dsl Exp $"); +__KERNEL_RCSID(0, "$NetBSD: osf1_mmap.c,v 1.14 2009/05/18 12:39:02 njoly Exp $"); #include #include @@ -117,7 +117,7 @@ SCARG(&a, addr) = SCARG(uap, addr); SCARG(&a, len) = SCARG(uap, len); SCARG(&a, fd) = SCARG(uap, fd); - SCARG(&a, pad) = 0; + SCARG(&a, PAD) = 0; SCARG(&a, pos) = SCARG(uap, pos); /* translate prot */
CVS commit: src/sys/compat/netbsd32
Module Name:src Committed By: pooka Date: Sun May 17 05:57:01 UTC 2009 Modified Files: src/sys/compat/netbsd32: netbsd32_netbsd.c Log Message: pad -> PAD. Fixes build problem reported by Paul Goyette in private email. To generate a diff of this commit: cvs rdiff -u -r1.156 -r1.157 src/sys/compat/netbsd32/netbsd32_netbsd.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/compat/netbsd32/netbsd32_netbsd.c diff -u src/sys/compat/netbsd32/netbsd32_netbsd.c:1.156 src/sys/compat/netbsd32/netbsd32_netbsd.c:1.157 --- src/sys/compat/netbsd32/netbsd32_netbsd.c:1.156 Mon Mar 16 20:48:13 2009 +++ src/sys/compat/netbsd32/netbsd32_netbsd.c Sun May 17 05:57:01 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: netbsd32_netbsd.c,v 1.156 2009/03/16 20:48:13 njoly Exp $ */ +/* $NetBSD: netbsd32_netbsd.c,v 1.157 2009/05/17 05:57:01 pooka Exp $ */ /* * Copyright (c) 1998, 2001, 2008 Matthew R. Green @@ -27,7 +27,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: netbsd32_netbsd.c,v 1.156 2009/03/16 20:48:13 njoly Exp $"); +__KERNEL_RCSID(0, "$NetBSD: netbsd32_netbsd.c,v 1.157 2009/05/17 05:57:01 pooka Exp $"); #if defined(_KERNEL_OPT) #include "opt_ddb.h" @@ -1302,7 +1302,7 @@ syscallarg(int) fd; syscallarg(netbsd32_voidp) buf; syscallarg(netbsd32_size_t) nbyte; - syscallarg(int) pad; + syscallarg(int) PAD; syscallarg(off_t) offset; } */ struct sys_pread_args ua; @@ -1310,7 +1310,7 @@ NETBSD32TO64_UAP(fd); NETBSD32TOP_UAP(buf, void); NETBSD32TOX_UAP(nbyte, size_t); - NETBSD32TO64_UAP(pad); + NETBSD32TO64_UAP(PAD); NETBSD32TO64_UAP(offset); return sys_pread(l, &ua, retval); } @@ -1322,7 +1322,7 @@ syscallarg(int) fd; syscallarg(const netbsd32_voidp) buf; syscallarg(netbsd32_size_t) nbyte; - syscallarg(int) pad; + syscallarg(int) PAD; syscallarg(off_t) offset; } */ struct sys_pwrite_args ua; @@ -1330,7 +1330,7 @@ NETBSD32TO64_UAP(fd); NETBSD32TOP_UAP(buf, void); NETBSD32TOX_UAP(nbyte, size_t); - NETBSD32TO64_UAP(pad); + NETBSD32TO64_UAP(PAD); NETBSD32TO64_UAP(offset); return sys_pwrite(l, &ua, retval); } @@ -1488,7 +1488,7 @@ syscallarg(int) prot; syscallarg(int) flags; syscallarg(int) fd; - syscallarg(netbsd32_long) pad; + syscallarg(netbsd32_long) PAD; syscallarg(off_t) pos; } */ struct sys_mmap_args ua; @@ -1499,7 +1499,7 @@ NETBSD32TO64_UAP(prot); NETBSD32TO64_UAP(flags); NETBSD32TO64_UAP(fd); - NETBSD32TOX_UAP(pad, long); + NETBSD32TOX_UAP(PAD, long); NETBSD32TOX_UAP(pos, off_t); error = sys_mmap(l, &ua, retval); if ((u_long)*retval > (u_long)UINT_MAX) { @@ -1536,7 +1536,7 @@ { /* { syscallarg(int) fd; - syscallarg(int) pad; + syscallarg(int) PAD; syscallarg(off_t) offset; syscallarg(int) whence; } */ @@ -1548,7 +1548,7 @@ int rv; NETBSD32TO64_UAP(fd); - NETBSD32TO64_UAP(pad); + NETBSD32TO64_UAP(PAD); NETBSD32TO64_UAP(offset); NETBSD32TO64_UAP(whence); rv = sys_lseek(l, &ua, newpos.retval64); @@ -1571,13 +1571,13 @@ { /* { syscallarg(const netbsd32_charp) path; - syscallarg(int) pad; + syscallarg(int) PAD; syscallarg(off_t) length; } */ struct sys_truncate_args ua; NETBSD32TOP_UAP(path, const char); - NETBSD32TO64_UAP(pad); + NETBSD32TO64_UAP(PAD); NETBSD32TO64_UAP(length); return (sys_truncate(l, &ua, retval)); } @@ -1587,13 +1587,13 @@ { /* { syscallarg(int) fd; - syscallarg(int) pad; + syscallarg(int) PAD; syscallarg(off_t) length; } */ struct sys_ftruncate_args ua; NETBSD32TO64_UAP(fd); - NETBSD32TO64_UAP(pad); + NETBSD32TO64_UAP(PAD); NETBSD32TO64_UAP(length); return (sys_ftruncate(l, &ua, retval)); } @@ -2515,7 +2515,7 @@ { /* { syscallarg(int) fd; - syscallarg(int) pad; + syscallarg(int) PAD; syscallarg(off_t) offset; syscallarg(off_t) len; syscallarg(int) advice;
CVS commit: src/sys/compat/netbsd32
Module Name:src Committed By: pooka Date: Sun May 17 05:55:42 UTC 2009 Modified Files: src/sys/compat/netbsd32: netbsd32_syscall.h netbsd32_syscallargs.h netbsd32_syscalls.c netbsd32_sysent.c Log Message: regen: pad -> PAD To generate a diff of this commit: cvs rdiff -u -r1.87 -r1.88 src/sys/compat/netbsd32/netbsd32_syscall.h \ src/sys/compat/netbsd32/netbsd32_syscallargs.h cvs rdiff -u -r1.86 -r1.87 src/sys/compat/netbsd32/netbsd32_syscalls.c \ src/sys/compat/netbsd32/netbsd32_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/compat/netbsd32/netbsd32_syscall.h diff -u src/sys/compat/netbsd32/netbsd32_syscall.h:1.87 src/sys/compat/netbsd32/netbsd32_syscall.h:1.88 --- src/sys/compat/netbsd32/netbsd32_syscall.h:1.87 Mon Mar 16 20:49:16 2009 +++ src/sys/compat/netbsd32/netbsd32_syscall.h Sun May 17 05:55:42 2009 @@ -1,10 +1,10 @@ -/* $NetBSD: netbsd32_syscall.h,v 1.87 2009/03/16 20:49:16 njoly Exp $ */ +/* $NetBSD: netbsd32_syscall.h,v 1.88 2009/05/17 05:55:42 pooka Exp $ */ /* * System call numbers. * * DO NOT EDIT-- this file is automatically generated. - * created from NetBSD: syscalls.master,v 1.79 2009/03/16 20:48:13 njoly Exp + * created from NetBSD: syscalls.master,v 1.80 2009/05/17 05:54:22 pooka Exp */ #ifndef _NETBSD32_SYS_SYSCALL_H_ Index: src/sys/compat/netbsd32/netbsd32_syscallargs.h diff -u src/sys/compat/netbsd32/netbsd32_syscallargs.h:1.87 src/sys/compat/netbsd32/netbsd32_syscallargs.h:1.88 --- src/sys/compat/netbsd32/netbsd32_syscallargs.h:1.87 Mon Mar 16 20:49:16 2009 +++ src/sys/compat/netbsd32/netbsd32_syscallargs.h Sun May 17 05:55:42 2009 @@ -1,10 +1,10 @@ -/* $NetBSD: netbsd32_syscallargs.h,v 1.87 2009/03/16 20:49:16 njoly Exp $ */ +/* $NetBSD: netbsd32_syscallargs.h,v 1.88 2009/05/17 05:55:42 pooka Exp $ */ /* * System call argument lists. * * DO NOT EDIT-- this file is automatically generated. - * created from NetBSD: syscalls.master,v 1.79 2009/03/16 20:48:13 njoly Exp + * created from NetBSD: syscalls.master,v 1.80 2009/05/17 05:54:22 pooka Exp */ #ifndef _NETBSD32_SYS_SYSCALLARGS_H_ @@ -911,7 +911,7 @@ syscallarg(int) fd; syscallarg(netbsd32_voidp) buf; syscallarg(netbsd32_size_t) nbyte; - syscallarg(int) pad; + syscallarg(int) PAD; syscallarg(off_t) offset; }; check_syscall_args(netbsd32_pread) @@ -920,7 +920,7 @@ syscallarg(int) fd; syscallarg(netbsd32_voidp) buf; syscallarg(netbsd32_size_t) nbyte; - syscallarg(int) pad; + syscallarg(int) PAD; syscallarg(off_t) offset; }; check_syscall_args(netbsd32_pwrite) @@ -1038,7 +1038,7 @@ syscallarg(int) prot; syscallarg(int) flags; syscallarg(int) fd; - syscallarg(netbsd32_long) pad; + syscallarg(netbsd32_long) PAD; syscallarg(off_t) pos; }; check_syscall_args(netbsd32_mmap) @@ -1050,7 +1050,7 @@ struct netbsd32_lseek_args { syscallarg(int) fd; - syscallarg(int) pad; + syscallarg(int) PAD; syscallarg(off_t) offset; syscallarg(int) whence; }; @@ -1058,14 +1058,14 @@ struct netbsd32_truncate_args { syscallarg(netbsd32_charp) path; - syscallarg(int) pad; + syscallarg(int) PAD; syscallarg(off_t) length; }; check_syscall_args(netbsd32_truncate) struct netbsd32_ftruncate_args { syscallarg(int) fd; - syscallarg(int) pad; + syscallarg(int) PAD; syscallarg(off_t) length; }; check_syscall_args(netbsd32_ftruncate) @@ -1460,7 +1460,7 @@ syscallarg(int) fd; syscallarg(netbsd32_iovecp_t) iovp; syscallarg(int) iovcnt; - syscallarg(int) pad; + syscallarg(int) PAD; syscallarg(off_t) offset; }; check_syscall_args(netbsd32_preadv) @@ -1469,7 +1469,7 @@ syscallarg(int) fd; syscallarg(netbsd32_iovecp_t) iovp; syscallarg(int) iovcnt; - syscallarg(int) pad; + syscallarg(int) PAD; syscallarg(off_t) offset; }; check_syscall_args(netbsd32_pwritev) @@ -2098,7 +2098,7 @@ struct netbsd32___posix_fadvise50_args { syscallarg(int) fd; - syscallarg(int) pad; + syscallarg(int) PAD; syscallarg(off_t) offset; syscallarg(off_t) len; syscallarg(int) advice; Index: src/sys/compat/netbsd32/netbsd32_syscalls.c diff -u src/sys/compat/netbsd32/netbsd32_syscalls.c:1.86 src/sys/compat/netbsd32/netbsd32_syscalls.c:1.87 --- src/sys/compat/netbsd32/netbsd32_syscalls.c:1.86 Mon Mar 16 20:49:16 2009 +++ src/sys/compat/netbsd32/netbsd32_syscalls.c Sun May 17 05:55:42 2009 @@ -1,14 +1,14 @@ -/* $NetBSD: netbsd32_syscalls.c,v 1.86 2009/03/16 20:49:16 njoly Exp $ */ +/* $NetBSD: netbsd32_syscalls.c,v 1.87 2009/05/17 05:55:42 pooka Exp $ */ /* * System call names. * * DO NOT EDIT-- this file is automatically generated. - * created from NetBSD: syscalls.master,v 1.79 2009/03/16 20:48:13 njoly Exp + * created from NetBSD: syscalls.master,v 1.80 2009/05/17 05:54:22 pooka Exp */ #include -__KERNEL_RCSID(0, "$NetBSD: netbsd32_syscalls.c,v 1.86 2009/03/16 20:49:16 njoly Exp $"); +__KERNEL_RCSID(0, "$NetBSD: netbsd32_sy
CVS commit: src/sys/compat/netbsd32
Module Name:src Committed By: pooka Date: Sun May 17 05:54:23 UTC 2009 Modified Files: src/sys/compat/netbsd32: syscalls.master Log Message: pad -> PAD To generate a diff of this commit: cvs rdiff -u -r1.79 -r1.80 src/sys/compat/netbsd32/syscalls.master Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/compat/netbsd32/syscalls.master diff -u src/sys/compat/netbsd32/syscalls.master:1.79 src/sys/compat/netbsd32/syscalls.master:1.80 --- src/sys/compat/netbsd32/syscalls.master:1.79 Mon Mar 16 20:48:13 2009 +++ src/sys/compat/netbsd32/syscalls.master Sun May 17 05:54:22 2009 @@ -1,4 +1,4 @@ - $NetBSD: syscalls.master,v 1.79 2009/03/16 20:48:13 njoly Exp $ + $NetBSD: syscalls.master,v 1.80 2009/05/17 05:54:22 pooka Exp $ ; from: NetBSD: syscalls.master,v 1.81 1998/07/05 08:49:50 jonathan Exp ; @(#)syscalls.master 8.2 (Berkeley) 1/13/94 @@ -363,10 +363,10 @@ 172 UNIMPL 173 STD { netbsd32_ssize_t|netbsd32||pread(int fd, \ netbsd32_voidp buf, netbsd32_size_t nbyte, \ - int pad, off_t offset); } + int PAD, off_t offset); } 174 STD { netbsd32_ssize_t|netbsd32||pwrite(int fd, \ netbsd32_voidp buf, netbsd32_size_t nbyte, \ - int pad, off_t offset); } + int PAD, off_t offset); } #if defined(NTP) || !defined(_KERNEL_OPT) 175 COMPAT_30 { int|netbsd32||ntp_gettime( \ netbsd32_ntptimeval50p_t ntvp); } @@ -417,14 +417,14 @@ netbsd32_longp basep); } 197 STD { netbsd32_voidp|netbsd32||mmap(netbsd32_voidp addr, \ netbsd32_size_t len, int prot, int flags, int fd, \ - netbsd32_long pad, off_t pos); } + netbsd32_long PAD, off_t pos); } 198 INDIR { quad_t|netbsd32||___syscall(quad_t code, \ ... register32_t args[NETBSD32_SYS_MAXSYSARGS]); } -199 STD { off_t|netbsd32||lseek(int fd, int pad, off_t offset, \ +199 STD { off_t|netbsd32||lseek(int fd, int PAD, off_t offset, \ int whence); } -200 STD { int|netbsd32||truncate(netbsd32_charp path, int pad, \ +200 STD { int|netbsd32||truncate(netbsd32_charp path, int PAD, \ off_t length); } -201 STD { int|netbsd32||ftruncate(int fd, int pad, \ +201 STD { int|netbsd32||ftruncate(int fd, int PAD, \ off_t length); } 202 STD { int|netbsd32||__sysctl(netbsd32_intp name, \ u_int namelen, netbsd32_voidp old, \ @@ -609,10 +609,10 @@ 288 STD { int|netbsd32||fktrace(int fd, int ops, int facs, \ int pid); } 289 STD { netbsd32_ssize_t|netbsd32||preadv(int fd, \ - netbsd32_iovecp_t iovp, int iovcnt, int pad, \ + netbsd32_iovecp_t iovp, int iovcnt, int PAD, \ off_t offset); } 290 STD { netbsd32_ssize_t|netbsd32||pwritev(int fd, \ - netbsd32_iovecp_t iovp, int iovcnt, int pad, \ + netbsd32_iovecp_t iovp, int iovcnt, int PAD, \ off_t offset); } 291 STD { int|netbsd32|14|sigaction(int signum, \ netbsd32_sigactionp_t nsa, \ @@ -878,7 +878,7 @@ 414 UNIMPL 415 UNIMPL -416 STD { int|netbsd32|50|posix_fadvise(int fd, int pad, \ +416 STD { int|netbsd32|50|posix_fadvise(int fd, int PAD, \ off_t offset, off_t len, int advice); } 417 STD { int|netbsd32|50|select(int nd, \ netbsd32_fd_setp_t in, netbsd32_fd_setp_t ou, \
CVS commit: src/sys/compat/sunos32
Module Name:src Committed By: nakayama Date: Sat May 16 17:45:23 UTC 2009 Modified Files: src/sys/compat/sunos32: sunos32_misc.c Log Message: Follow pad to PAD change. To generate a diff of this commit: cvs rdiff -u -r1.65 -r1.66 src/sys/compat/sunos32/sunos32_misc.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/compat/sunos32/sunos32_misc.c diff -u src/sys/compat/sunos32/sunos32_misc.c:1.65 src/sys/compat/sunos32/sunos32_misc.c:1.66 --- src/sys/compat/sunos32/sunos32_misc.c:1.65 Sun Jan 11 13:14:14 2009 +++ src/sys/compat/sunos32/sunos32_misc.c Sat May 16 17:45:23 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: sunos32_misc.c,v 1.65 2009/01/11 13:14:14 nakayama Exp $ */ +/* $NetBSD: sunos32_misc.c,v 1.66 2009/05/16 17:45:23 nakayama Exp $ */ /* from :NetBSD: sunos_misc.c,v 1.107 2000/12/01 19:25:10 jdolecek Exp */ /* @@ -77,7 +77,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: sunos32_misc.c,v 1.65 2009/01/11 13:14:14 nakayama Exp $"); +__KERNEL_RCSID(0, "$NetBSD: sunos32_misc.c,v 1.66 2009/05/16 17:45:23 nakayama Exp $"); #define COMPAT_SUNOS 1 @@ -755,7 +755,7 @@ SUNOS32TO64_UAP(prot); SCARG(&ua, flags) = SCARG(uap, flags) & ~SUNOS32__MAP_NEW; SUNOS32TO64_UAP(fd); - SCARG(&ua, pad) = 0; + SCARG(&ua, PAD) = 0; SUNOS32TOX_UAP(pos, off_t); error = sys_mmap(l, &ua, retval);
CVS commit: src/sys/compat/linux/common
Module Name:src Committed By: pooka Date: Fri May 15 17:02:54 UTC 2009 Modified Files: src/sys/compat/linux/common: linux_file64.c linux_misc.c Log Message: pad -> PAD To generate a diff of this commit: cvs rdiff -u -r1.48 -r1.49 src/sys/compat/linux/common/linux_file64.c cvs rdiff -u -r1.207 -r1.208 src/sys/compat/linux/common/linux_misc.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/compat/linux/common/linux_file64.c diff -u src/sys/compat/linux/common/linux_file64.c:1.48 src/sys/compat/linux/common/linux_file64.c:1.49 --- src/sys/compat/linux/common/linux_file64.c:1.48 Tue Jun 24 11:18:15 2008 +++ src/sys/compat/linux/common/linux_file64.c Fri May 15 17:02:54 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: linux_file64.c,v 1.48 2008/06/24 11:18:15 ad Exp $ */ +/* $NetBSD: linux_file64.c,v 1.49 2009/05/15 17:02:54 pooka Exp $ */ /*- * Copyright (c) 1995, 1998, 2000, 2008 The NetBSD Foundation, Inc. @@ -34,7 +34,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: linux_file64.c,v 1.48 2008/06/24 11:18:15 ad Exp $"); +__KERNEL_RCSID(0, "$NetBSD: linux_file64.c,v 1.49 2009/05/15 17:02:54 pooka Exp $"); #include #include @@ -181,7 +181,7 @@ /* Linux doesn't have the 'pad' pseudo-parameter */ SCARG(&ta, path) = SCARG(uap, path); - SCARG(&ta, pad) = 0; + SCARG(&ta, PAD) = 0; SCARG(&ta, length) = SCARG(uap, length); return sys_truncate(l, &ta, retval); @@ -198,7 +198,7 @@ /* Linux doesn't have the 'pad' pseudo-parameter */ SCARG(&ta, fd) = SCARG(uap, fd); - SCARG(&ta, pad) = 0; + SCARG(&ta, PAD) = 0; SCARG(&ta, length) = SCARG(uap, length); return sys_ftruncate(l, &ta, retval); Index: src/sys/compat/linux/common/linux_misc.c diff -u src/sys/compat/linux/common/linux_misc.c:1.207 src/sys/compat/linux/common/linux_misc.c:1.208 --- src/sys/compat/linux/common/linux_misc.c:1.207 Sun Mar 29 19:21:19 2009 +++ src/sys/compat/linux/common/linux_misc.c Fri May 15 17:02:54 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: linux_misc.c,v 1.207 2009/03/29 19:21:19 christos Exp $ */ +/* $NetBSD: linux_misc.c,v 1.208 2009/05/15 17:02:54 pooka Exp $ */ /*- * Copyright (c) 1995, 1998, 1999, 2008 The NetBSD Foundation, Inc. @@ -57,7 +57,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: linux_misc.c,v 1.207 2009/03/29 19:21:19 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: linux_misc.c,v 1.208 2009/05/15 17:02:54 pooka Exp $"); #include #include @@ -485,7 +485,7 @@ SCARG(cma, prot) |= VM_PROT_READ; SCARG(cma, flags) = flags; SCARG(cma, fd) = flags & MAP_ANON ? -1 : SCARG(uap, fd); - SCARG(cma, pad) = 0; + SCARG(cma, PAD) = 0; } #define LINUX_MREMAP_MAYMOVE 1
CVS commit: src/sys/compat/ibcs2
Module Name:src Committed By: pooka Date: Fri May 15 16:59:08 UTC 2009 Modified Files: src/sys/compat/ibcs2: ibcs2_misc.c Log Message: pad -> PAD To generate a diff of this commit: cvs rdiff -u -r1.106 -r1.107 src/sys/compat/ibcs2/ibcs2_misc.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/compat/ibcs2/ibcs2_misc.c diff -u src/sys/compat/ibcs2/ibcs2_misc.c:1.106 src/sys/compat/ibcs2/ibcs2_misc.c:1.107 --- src/sys/compat/ibcs2/ibcs2_misc.c:1.106 Wed Apr 15 20:44:26 2009 +++ src/sys/compat/ibcs2/ibcs2_misc.c Fri May 15 16:59:07 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: ibcs2_misc.c,v 1.106 2009/04/15 20:44:26 elad Exp $ */ +/* $NetBSD: ibcs2_misc.c,v 1.107 2009/05/15 16:59:07 pooka Exp $ */ /* * Copyright (c) 1992, 1993 @@ -95,7 +95,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: ibcs2_misc.c,v 1.106 2009/04/15 20:44:26 elad Exp $"); +__KERNEL_RCSID(0, "$NetBSD: ibcs2_misc.c,v 1.107 2009/05/15 16:59:07 pooka Exp $"); #include #include @@ -1230,7 +1230,7 @@ struct sys_ftruncate_args sa; SCARG(&sa, fd) = SCARG(uap, fd); - SCARG(&sa, pad) = 0; + SCARG(&sa, PAD) = 0; SCARG(&sa, length) = SCARG(uap, size); return sys_ftruncate(l, &sa, retval); }
CVS commit: src/sys/compat/ndis
Module Name:src Committed By: cegger Date: Mon May 11 21:34:56 UTC 2009 Modified Files: src/sys/compat/ndis: subr_ndis.c Log Message: use device_xname() To generate a diff of this commit: cvs rdiff -u -r1.20 -r1.21 src/sys/compat/ndis/subr_ndis.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/compat/ndis/subr_ndis.c diff -u src/sys/compat/ndis/subr_ndis.c:1.20 src/sys/compat/ndis/subr_ndis.c:1.21 --- src/sys/compat/ndis/subr_ndis.c:1.20 Mon May 11 21:31:29 2009 +++ src/sys/compat/ndis/subr_ndis.c Mon May 11 21:34:55 2009 @@ -35,7 +35,7 @@ __FBSDID("$FreeBSD: src/sys/compat/ndis/subr_ndis.c,v 1.67.2.7 2005/03/31 21:50:11 wpaul Exp $"); #endif #ifdef __NetBSD__ -__KERNEL_RCSID(0, "$NetBSD: subr_ndis.c,v 1.20 2009/05/11 21:31:29 cegger Exp $"); +__KERNEL_RCSID(0, "$NetBSD: subr_ndis.c,v 1.21 2009/05/11 21:34:55 cegger Exp $"); #endif /* @@ -1211,7 +1211,7 @@ va_start(ap, numerrors); for (i = 0; i < numerrors; i++) printf ("%s: argptr: %p\n", - dev->dv_xname, + device_xname(dev), va_arg(ap, void *)); va_end(ap);
CVS commit: src/sys/compat/ndis
Module Name:src Committed By: cegger Date: Mon May 11 21:31:29 UTC 2009 Modified Files: src/sys/compat/ndis: kern_ndis.c subr_ndis.c Log Message: use device_xname() To generate a diff of this commit: cvs rdiff -u -r1.20 -r1.21 src/sys/compat/ndis/kern_ndis.c cvs rdiff -u -r1.19 -r1.20 src/sys/compat/ndis/subr_ndis.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/compat/ndis/kern_ndis.c diff -u src/sys/compat/ndis/kern_ndis.c:1.20 src/sys/compat/ndis/kern_ndis.c:1.21 --- src/sys/compat/ndis/kern_ndis.c:1.20 Wed May 6 22:38:31 2009 +++ src/sys/compat/ndis/kern_ndis.c Mon May 11 21:31:29 2009 @@ -35,7 +35,7 @@ __FBSDID("$FreeBSD: src/sys/compat/ndis/kern_ndis.c,v 1.60.2.5 2005/04/01 17:14:20 wpaul Exp $"); #endif #ifdef __NetBSD__ -__KERNEL_RCSID(0, "$NetBSD: kern_ndis.c,v 1.20 2009/05/06 22:38:31 ad Exp $"); +__KERNEL_RCSID(0, "$NetBSD: kern_ndis.c,v 1.21 2009/05/11 21:31:29 cegger Exp $"); #endif #include @@ -938,7 +938,7 @@ #endif if (ifp->if_flags & IFF_DEBUG) printf("%s: status: %x\n", - sc->ndis_dev->dv_xname, status); + device_xname(sc->ndis_dev), status); return; } @@ -963,7 +963,7 @@ #endif if (ifp->if_flags & IFF_DEBUG) printf("%s: status complete\n", - sc->ndis_dev->dv_xname); + device_xname(sc->ndis_dev)); return; } @@ -1012,7 +1012,7 @@ if (ifp->if_flags & IFF_DEBUG) printf("%s: reset done...\n", - sc->ndis_dev->dv_xname); + device_xname(sc->ndis_dev)); wakeup(sc); return; } @@ -1145,7 +1145,7 @@ /* Create the sysctl tree. */ sysctl_createv(&sc->sysctllog, 0, NULL, &ndis_node, CTLFLAG_READWRITE, CTLTYPE_NODE, - sc->ndis_dev->dv_xname, NULL, NULL, 0, NULL, 0, CTL_CREATE, CTL_EOL); + device_xname(sc->ndis_dev), NULL, NULL, 0, NULL, 0, CTL_CREATE, CTL_EOL); /* Store the number of the ndis mib */ sc->ndis_sysctl_mib = ndis_node->sysctl_num; Index: src/sys/compat/ndis/subr_ndis.c diff -u src/sys/compat/ndis/subr_ndis.c:1.19 src/sys/compat/ndis/subr_ndis.c:1.20 --- src/sys/compat/ndis/subr_ndis.c:1.19 Wed Mar 18 17:06:48 2009 +++ src/sys/compat/ndis/subr_ndis.c Mon May 11 21:31:29 2009 @@ -35,7 +35,7 @@ __FBSDID("$FreeBSD: src/sys/compat/ndis/subr_ndis.c,v 1.67.2.7 2005/03/31 21:50:11 wpaul Exp $"); #endif #ifdef __NetBSD__ -__KERNEL_RCSID(0, "$NetBSD: subr_ndis.c,v 1.19 2009/03/18 17:06:48 cegger Exp $"); +__KERNEL_RCSID(0, "$NetBSD: subr_ndis.c,v 1.20 2009/05/11 21:31:29 cegger Exp $"); #endif /* @@ -1204,9 +1204,9 @@ str = ustr; } - printf ("%s: NDIS ERROR: %x (%s)\n", dev->dv_xname, code, + printf ("%s: NDIS ERROR: %x (%s)\n", device_xname(dev), code, str == NULL ? "unknown error" : str); - printf ("%s: NDIS NUMERRORS: %x\n", dev->dv_xname, numerrors); + printf ("%s: NDIS NUMERRORS: %x\n", device_xname(dev), numerrors); va_start(ap, numerrors); for (i = 0; i < numerrors; i++)
CVS commit: src/sys/compat/ndis
Module Name:src Committed By: ad Date: Wed May 6 22:38:31 UTC 2009 Modified Files: src/sys/compat/ndis: kern_ndis.c Log Message: G/C reference to LK_CANRECURSE. To generate a diff of this commit: cvs rdiff -u -r1.19 -r1.20 src/sys/compat/ndis/kern_ndis.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/compat/ndis/kern_ndis.c diff -u src/sys/compat/ndis/kern_ndis.c:1.19 src/sys/compat/ndis/kern_ndis.c:1.20 --- src/sys/compat/ndis/kern_ndis.c:1.19 Wed Mar 18 17:06:48 2009 +++ src/sys/compat/ndis/kern_ndis.c Wed May 6 22:38:31 2009 @@ -35,7 +35,7 @@ __FBSDID("$FreeBSD: src/sys/compat/ndis/kern_ndis.c,v 1.60.2.5 2005/04/01 17:14:20 wpaul Exp $"); #endif #ifdef __NetBSD__ -__KERNEL_RCSID(0, "$NetBSD: kern_ndis.c,v 1.19 2009/03/18 17:06:48 cegger Exp $"); +__KERNEL_RCSID(0, "$NetBSD: kern_ndis.c,v 1.20 2009/05/06 22:38:31 ad Exp $"); #endif #include @@ -467,7 +467,7 @@ mtx_init(&ndis_thr_mtx, "NDIS thread lock", NULL, MTX_SPIN); #else /* __NetBSD__ */ simple_lock_init(&ndis_thr_mtx); - //lockinit(&ndis_thr_mtx, PWAIT, "NDIS thread lock", 0, 0/*LK_CANRECURSE*//*LK_SPIN*/); + //lockinit(&ndis_thr_mtx, PWAIT, "NDIS thread lock", 0, 0); #endif mtx_init(&ndis_req_mtx, "NDIS request lock", MTX_NDIS_LOCK, MTX_DEF);
CVS commit: src/sys/compat/linux32/common
Module Name:src Committed By: njoly Date: Mon Apr 27 13:24:18 UTC 2009 Modified Files: src/sys/compat/linux32/common: linux32_ipccall.c Log Message: Add IPC_64 support to all semctl(2) commands, following corresponding compat linux change. To generate a diff of this commit: cvs rdiff -u -r1.3 -r1.4 src/sys/compat/linux32/common/linux32_ipccall.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/compat/linux32/common/linux32_ipccall.c diff -u src/sys/compat/linux32/common/linux32_ipccall.c:1.3 src/sys/compat/linux32/common/linux32_ipccall.c:1.4 --- src/sys/compat/linux32/common/linux32_ipccall.c:1.3 Wed Feb 18 14:40:14 2009 +++ src/sys/compat/linux32/common/linux32_ipccall.c Mon Apr 27 13:24:18 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: linux32_ipccall.c,v 1.3 2009/02/18 14:40:14 njoly Exp $ */ +/* $NetBSD: linux32_ipccall.c,v 1.4 2009/04/27 13:24:18 njoly Exp $ */ /* * Copyright (c) 2008 Nicolas Joly @@ -27,7 +27,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: linux32_ipccall.c,v 1.3 2009/02/18 14:40:14 njoly Exp $"); +__KERNEL_RCSID(0, "$NetBSD: linux32_ipccall.c,v 1.4 2009/04/27 13:24:18 njoly Exp $"); #if defined(_KERNEL_OPT) #include "opt_sysv.h" @@ -253,7 +253,7 @@ linux32_semctl(struct lwp *l, const struct linux32_sys_ipc_args *uap, register_t *retval) { - int cmd, error; + int lcmd, cmd, error; struct semid_ds bs; struct linux32_semid_ds ls; struct linux32_semid64_ds ls64; @@ -264,28 +264,28 @@ if ((error = copyin(SCARG_P32(uap, ptr), &lsem, sizeof lsem))) return error; - switch (SCARG(uap, a3)) { + lcmd = SCARG(uap, a3); + + switch (lcmd & ~LINUX32_IPC_64) { case LINUX32_IPC_RMID: cmd = IPC_RMID; break; case LINUX32_IPC_STAT: - case LINUX32_IPC_STAT|LINUX32_IPC_64: cmd = IPC_STAT; buf = &bs; break; case LINUX32_IPC_SET: - error = copyin(NETBSD32PTR64(lsem.l_buf), &ls, sizeof ls); - if (error) - return error; - linux32_to_bsd_semid_ds(&ls, &bs); - cmd = IPC_SET; - buf = &bs; - break; - case LINUX32_IPC_SET|LINUX32_IPC_64: - error = copyin(NETBSD32PTR64(lsem.l_buf), &ls64, sizeof ls64); + if (lcmd & LINUX32_IPC_64) { + error = copyin(NETBSD32PTR64(lsem.l_buf), &ls64, + sizeof ls64); + linux32_to_bsd_semid64_ds(&ls64, &bs); + } else { + error = copyin(NETBSD32PTR64(lsem.l_buf), &ls, + sizeof ls); + linux32_to_bsd_semid_ds(&ls, &bs); + } if (error) return error; - linux32_to_bsd_semid64_ds(&ls64, &bs); cmd = IPC_SET; buf = &bs; break; @@ -324,7 +324,7 @@ if (error) return error; - switch (SCARG(uap, a3)) { + switch (lcmd) { case LINUX32_IPC_STAT: bsd_to_linux32_semid_ds(&bs, &ls); error = copyout(&ls, NETBSD32PTR64(lsem.l_buf), sizeof ls);
CVS commit: src/sys/compat/linux/common
Module Name:src Committed By: njoly Date: Thu Apr 23 17:40:58 UTC 2009 Modified Files: src/sys/compat/linux/common: linux_ipc.c Log Message: Add IPC_64 support for all semctl(2)/msgctl(2). Needed, at least on i386 for Linux 2.6 emulation. To generate a diff of this commit: cvs rdiff -u -r1.52 -r1.53 src/sys/compat/linux/common/linux_ipc.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/compat/linux/common/linux_ipc.c diff -u src/sys/compat/linux/common/linux_ipc.c:1.52 src/sys/compat/linux/common/linux_ipc.c:1.53 --- src/sys/compat/linux/common/linux_ipc.c:1.52 Wed Feb 18 14:30:43 2009 +++ src/sys/compat/linux/common/linux_ipc.c Thu Apr 23 17:40:57 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: linux_ipc.c,v 1.52 2009/02/18 14:30:43 njoly Exp $ */ +/* $NetBSD: linux_ipc.c,v 1.53 2009/04/23 17:40:57 njoly Exp $ */ /*- * Copyright (c) 1995, 1998 The NetBSD Foundation, Inc. @@ -30,7 +30,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: linux_ipc.c,v 1.52 2009/02/18 14:30:43 njoly Exp $"); +__KERNEL_RCSID(0, "$NetBSD: linux_ipc.c,v 1.53 2009/04/23 17:40:57 njoly Exp $"); #if defined(_KERNEL_OPT) #include "opt_sysv.h" @@ -209,33 +209,27 @@ lcmd = SCARG(uap, cmd); #ifdef LINUX_IPC_FORCE64 - if (lcmd == LINUX_IPC_STAT || lcmd == LINUX_IPC_SET) - lcmd |= LINUX_IPC_64; + lcmd |= LINUX_IPC_64; #endif - switch (lcmd) { + switch (lcmd & ~LINUX_IPC_64) { case LINUX_IPC_SET: - error = copyin(SCARG(uap, arg).l_buf, &lsembuf, - sizeof(lsembuf)); - if (error) - return (error); - linux_to_bsd_semid_ds(&lsembuf, &sembuf); - pass_arg = &sembuf; - cmd = IPC_SET; - break; - - case LINUX_IPC_SET | LINUX_IPC_64: - error = copyin(SCARG(uap, arg).l_buf, &lsembuf64, - sizeof(lsembuf64)); + if (lcmd & LINUX_IPC_64) { + error = copyin(SCARG(uap, arg).l_buf, &lsembuf64, + sizeof(lsembuf64)); + linux_to_bsd_semid64_ds(&lsembuf64, &sembuf); + } else { + error = copyin(SCARG(uap, arg).l_buf, &lsembuf, + sizeof(lsembuf)); + linux_to_bsd_semid_ds(&lsembuf, &sembuf); + } if (error) return (error); - linux_to_bsd_semid64_ds(&lsembuf64, &sembuf); pass_arg = &sembuf; cmd = IPC_SET; break; case LINUX_IPC_STAT: - case LINUX_IPC_STAT | LINUX_IPC_64: pass_arg = &sembuf; cmd = IPC_STAT; break; @@ -385,27 +379,24 @@ lcmd = SCARG(uap, cmd); #ifdef LINUX_IPC_FORCE64 - if (lcmd == LINUX_IPC_STAT || lcmd == LINUX_IPC_SET) - lcmd |= LINUX_IPC_64; + lcmd |= LINUX_IPC_64; #endif - switch (lcmd) { + switch (lcmd & ~LINUX_IPC_64) { case LINUX_IPC_STAT: - case LINUX_IPC_STAT|LINUX_IPC_64: cmd = IPC_STAT; bmp = &bm; break; case LINUX_IPC_SET: - if ((error = copyin(SCARG(uap, buf), &lm, sizeof lm))) - return error; - linux_to_bsd_msqid_ds(&lm, &bm); - cmd = IPC_SET; - bmp = &bm; - break; - case LINUX_IPC_SET|LINUX_IPC_64: - if ((error = copyin(SCARG(uap, buf), &lm64, sizeof lm64))) + if (lcmd & LINUX_IPC_64) { + error = copyin(SCARG(uap, buf), &lm64, sizeof lm64); + linux_to_bsd_msqid64_ds(&lm64, &bm); + } else { + error = copyin(SCARG(uap, buf), &lm, sizeof lm); + linux_to_bsd_msqid_ds(&lm, &bm); + } + if (error) return error; - linux_to_bsd_msqid64_ds(&lm64, &bm); cmd = IPC_SET; bmp = &bm; break;
CVS commit: src/sys/compat/linux/arch/i386
Module Name:src Committed By: njoly Date: Thu Apr 23 17:37:51 UTC 2009 Modified Files: src/sys/compat/linux/arch/i386: linux_machdep.c Log Message: Convert si_code value from native to linux. To generate a diff of this commit: cvs rdiff -u -r1.143 -r1.144 src/sys/compat/linux/arch/i386/linux_machdep.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/compat/linux/arch/i386/linux_machdep.c diff -u src/sys/compat/linux/arch/i386/linux_machdep.c:1.143 src/sys/compat/linux/arch/i386/linux_machdep.c:1.144 --- src/sys/compat/linux/arch/i386/linux_machdep.c:1.143 Sat Mar 21 14:41:30 2009 +++ src/sys/compat/linux/arch/i386/linux_machdep.c Thu Apr 23 17:37:51 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: linux_machdep.c,v 1.143 2009/03/21 14:41:30 ad Exp $ */ +/* $NetBSD: linux_machdep.c,v 1.144 2009/04/23 17:37:51 njoly Exp $ */ /*- * Copyright (c) 1995, 2000, 2008, 2009 The NetBSD Foundation, Inc. @@ -30,7 +30,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: linux_machdep.c,v 1.143 2009/03/21 14:41:30 ad Exp $"); +__KERNEL_RCSID(0, "$NetBSD: linux_machdep.c,v 1.144 2009/04/23 17:37:51 njoly Exp $"); #if defined(_KERNEL_OPT) #include "opt_vm86.h" @@ -284,7 +284,7 @@ */ (void)memset(lsi = &frame.sf_si, 0, sizeof(frame.sf_si)); lsi->lsi_errno = native_to_linux_errno[ksi->ksi_errno]; - lsi->lsi_code = ksi->ksi_code; + lsi->lsi_code = native_to_linux_si_code(ksi->ksi_code); switch (lsi->lsi_signo = frame.sf_sig) { case LINUX_SIGILL: case LINUX_SIGFPE:
CVS commit: src/sys/compat/sa
Module Name:src Committed By: skrll Date: Thu Apr 16 07:42:28 UTC 2009 Modified Files: src/sys/compat/sa: compat_sa.c Log Message: Typo in comment. To generate a diff of this commit: cvs rdiff -u -r1.9 -r1.10 src/sys/compat/sa/compat_sa.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/compat/sa/compat_sa.c diff -u src/sys/compat/sa/compat_sa.c:1.9 src/sys/compat/sa/compat_sa.c:1.10 --- src/sys/compat/sa/compat_sa.c:1.9 Fri Mar 6 14:00:40 2009 +++ src/sys/compat/sa/compat_sa.c Thu Apr 16 07:42:28 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: compat_sa.c,v 1.9 2009/03/06 14:00:40 christos Exp $ */ +/* $NetBSD: compat_sa.c,v 1.10 2009/04/16 07:42:28 skrll Exp $ */ /*- * Copyright (c) 2001, 2004, 2005, 2006 The NetBSD Foundation, Inc. @@ -41,7 +41,7 @@ #include "opt_ktrace.h" #include "opt_multiprocessor.h" #include "opt_sa.h" -__KERNEL_RCSID(0, "$NetBSD: compat_sa.c,v 1.9 2009/03/06 14:00:40 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: compat_sa.c,v 1.10 2009/04/16 07:42:28 skrll Exp $"); #include #include @@ -1752,7 +1752,7 @@ } else { /* * Oops! We're in trouble. The app hasn't - * passeed us in any stacks on which to deliver + * passed us in any stacks on which to deliver * the upcall. * * WRS: I think this code is wrong. If we can't
CVS commit: src/sys/compat/sys
Module Name:src Committed By: christos Date: Wed Apr 1 21:15:23 UTC 2009 Modified Files: src/sys/compat/sys: shm.h Log Message: cast segsz to int. To generate a diff of this commit: cvs rdiff -u -r1.6 -r1.7 src/sys/compat/sys/shm.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/compat/sys/shm.h diff -u src/sys/compat/sys/shm.h:1.6 src/sys/compat/sys/shm.h:1.7 --- src/sys/compat/sys/shm.h:1.6 Mon Jan 19 14:39:41 2009 +++ src/sys/compat/sys/shm.h Wed Apr 1 17:15:23 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: shm.h,v 1.6 2009/01/19 19:39:41 christos Exp $ */ +/* $NetBSD: shm.h,v 1.7 2009/04/01 21:15:23 christos Exp $ */ /* * Copyright (c) 1994 Adam Glass @@ -115,7 +115,7 @@ #define CVT(x) oshmbuf->x = shmbuf->x #define CVTI(x) oshmbuf->x = (int)shmbuf->x - CVT(shm_segsz); + CVTI(shm_segsz); CVT(shm_lpid); CVT(shm_cpid); CVT(shm_nattch);
CVS commit: src/sys/compat/osf1
Module Name:src Committed By: dogcow Date: Wed Apr 1 03:06:06 UTC 2009 Modified Files: src/sys/compat/osf1: osf1_generic.c Log Message: fix what looks like a mechanical stuffup in the timeval -> timespec conversion. To generate a diff of this commit: cvs rdiff -u -r1.14 -r1.15 src/sys/compat/osf1/osf1_generic.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/compat/osf1/osf1_generic.c diff -u src/sys/compat/osf1/osf1_generic.c:1.14 src/sys/compat/osf1/osf1_generic.c:1.15 --- src/sys/compat/osf1/osf1_generic.c:1.14 Sun Mar 29 19:21:19 2009 +++ src/sys/compat/osf1/osf1_generic.c Wed Apr 1 03:06:06 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: osf1_generic.c,v 1.14 2009/03/29 19:21:19 christos Exp $ */ +/* $NetBSD: osf1_generic.c,v 1.15 2009/04/01 03:06:06 dogcow Exp $ */ /* * Copyright (c) 1999 Christopher G. Demetriou. All rights reserved. @@ -58,7 +58,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: osf1_generic.c,v 1.14 2009/03/29 19:21:19 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: osf1_generic.c,v 1.15 2009/04/01 03:06:06 dogcow Exp $"); #include #include @@ -173,9 +173,9 @@ ats.tv_sec = otv.tv_sec; ats.tv_nsec = otv.tv_usec * 1000; - ts = &atv; + ts = &ats; } return selcommon(l, retval, SCARG(uap, nd), SCARG(uap, in), - SCARG(uap, ou), SCARG(uap, ex), tsp, NULL); + SCARG(uap, ou), SCARG(uap, ex), ts, NULL); }
CVS commit: src/sys/compat/darwin
Module Name:src Committed By: cegger Date: Tue Mar 31 06:03:31 UTC 2009 Modified Files: src/sys/compat/darwin: darwin_exec.c Log Message: buildfix: NEW_VMCMD(2 -> NEW_VMCMD2( To generate a diff of this commit: cvs rdiff -u -r1.57 -r1.58 src/sys/compat/darwin/darwin_exec.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/compat/darwin/darwin_exec.c diff -u src/sys/compat/darwin/darwin_exec.c:1.57 src/sys/compat/darwin/darwin_exec.c:1.58 --- src/sys/compat/darwin/darwin_exec.c:1.57 Sun Mar 29 01:02:49 2009 +++ src/sys/compat/darwin/darwin_exec.c Tue Mar 31 06:03:31 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: darwin_exec.c,v 1.57 2009/03/29 01:02:49 mrg Exp $ */ +/* $NetBSD: darwin_exec.c,v 1.58 2009/03/31 06:03:31 cegger Exp $ */ /*- * Copyright (c) 2002 The NetBSD Foundation, Inc. @@ -31,7 +31,7 @@ #include "opt_compat_darwin.h" /* For COMPAT_DARWIN in mach_port.h */ #include -__KERNEL_RCSID(0, "$NetBSD: darwin_exec.c,v 1.57 2009/03/29 01:02:49 mrg Exp $"); +__KERNEL_RCSID(0, "$NetBSD: darwin_exec.c,v 1.58 2009/03/31 06:03:31 cegger Exp $"); #include "opt_syscall_debug.h" @@ -430,7 +430,7 @@ noaccess_linear_min, NULL, 0, VM_PROT_NONE, VMCMD_STACK); } KASSERT(access_size > 0); - NEW_VMCMD(2&epp->ep_vmcmds, vmcmd_map_zero, access_size, + NEW_VMCMD2(&epp->ep_vmcmds, vmcmd_map_zero, access_size, access_linear_min, NULL, 0, VM_PROT_READ | VM_PROT_WRITE, VMCMD_STACK);
CVS commit: src/sys/compat/common
Module Name:src Committed By: gmcgarry Date: Thu Mar 26 22:22:14 UTC 2009 Modified Files: src/sys/compat/common: kern_time_50.c Log Message: Replace gcc initialisers with c99 designated initialisers. To generate a diff of this commit: cvs rdiff -u -r1.5 -r1.6 src/sys/compat/common/kern_time_50.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/compat/common/kern_time_50.c diff -u src/sys/compat/common/kern_time_50.c:1.5 src/sys/compat/common/kern_time_50.c:1.6 --- src/sys/compat/common/kern_time_50.c:1.5 Sun Feb 22 13:06:58 2009 +++ src/sys/compat/common/kern_time_50.c Thu Mar 26 22:22:14 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: kern_time_50.c,v 1.5 2009/02/22 13:06:58 nakayama Exp $ */ +/* $NetBSD: kern_time_50.c,v 1.6 2009/03/26 22:22:14 gmcgarry Exp $ */ /*- * Copyright (c) 2008 The NetBSD Foundation, Inc. @@ -36,7 +36,7 @@ * POSSIBILITY OF SUCH DAMAGE. */ #include -__KERNEL_RCSID(0, "$NetBSD: kern_time_50.c,v 1.5 2009/02/22 13:06:58 nakayama Exp $"); +__KERNEL_RCSID(0, "$NetBSD: kern_time_50.c,v 1.6 2009/03/26 22:22:14 gmcgarry Exp $"); #ifdef _KERNEL_OPT #include "opt_ntp.h" @@ -99,10 +99,10 @@ syscallarg(struct timespec50) timeout; } */ static const struct kevent_ops compat_50_kevent_ops = { - keo_private: NULL, - keo_fetch_timeout: compat_50_kevent_fetch_timeout, - keo_fetch_changes: kevent_fetch_changes, - keo_put_events: kevent_put_events, + .keo_private = NULL, + .keo_fetch_timeout = compat_50_kevent_fetch_timeout, + .keo_fetch_changes = kevent_fetch_changes, + .keo_put_events = kevent_put_events, }; return kevent1(retval, SCARG(uap, fd), SCARG(uap, changelist),