Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/compat/ibcs2 Merge the nathanw_sa branch.



details:   https://anonhg.NetBSD.org/src/rev/eba432d27e30
branches:  trunk
changeset: 541746:eba432d27e30
user:      thorpej <thorpej%NetBSD.org@localhost>
date:      Sat Jan 18 07:40:44 2003 +0000

description:
Merge the nathanw_sa branch.

diffstat:

 sys/compat/ibcs2/ibcs2_exec_xout.c |    5 +-
 sys/compat/ibcs2/ibcs2_fcntl.c     |   52 +++--
 sys/compat/ibcs2/ibcs2_ioctl.c     |   25 +-
 sys/compat/ibcs2/ibcs2_ipc.c       |   54 +++--
 sys/compat/ibcs2/ibcs2_misc.c      |  319 ++++++++++++++++++++----------------
 sys/compat/ibcs2/ibcs2_signal.c    |   47 +++--
 sys/compat/ibcs2/ibcs2_socksys.c   |   53 +++---
 sys/compat/ibcs2/ibcs2_socksys.h   |    4 +-
 sys/compat/ibcs2/ibcs2_stat.c      |   50 +++--
 sys/compat/ibcs2/syscalls.master   |    3 +-
 10 files changed, 339 insertions(+), 273 deletions(-)

diffs (truncated from 2113 to 300 lines):

diff -r 87fa1946d685 -r eba432d27e30 sys/compat/ibcs2/ibcs2_exec_xout.c
--- a/sys/compat/ibcs2/ibcs2_exec_xout.c        Sat Jan 18 07:37:32 2003 +0000
+++ b/sys/compat/ibcs2/ibcs2_exec_xout.c        Sat Jan 18 07:40:44 2003 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: ibcs2_exec_xout.c,v 1.2 2001/11/13 02:08:24 lukem Exp $        */
+/*     $NetBSD: ibcs2_exec_xout.c,v 1.3 2003/01/18 07:40:44 thorpej Exp $      */
 
 /*
  * Copyright (c) 1994, 1995, 1998 Scott Bartram
@@ -35,7 +35,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ibcs2_exec_xout.c,v 1.2 2001/11/13 02:08:24 lukem Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ibcs2_exec_xout.c,v 1.3 2003/01/18 07:40:44 thorpej Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -49,6 +49,7 @@
 #include <sys/resourcevar.h>
 
 #include <sys/mman.h>
+#include <sys/sa.h>
 #include <sys/syscallargs.h>
 
 #include <machine/cpu.h>
diff -r 87fa1946d685 -r eba432d27e30 sys/compat/ibcs2/ibcs2_fcntl.c
--- a/sys/compat/ibcs2/ibcs2_fcntl.c    Sat Jan 18 07:37:32 2003 +0000
+++ b/sys/compat/ibcs2/ibcs2_fcntl.c    Sat Jan 18 07:40:44 2003 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: ibcs2_fcntl.c,v 1.13 2002/03/16 20:43:51 christos Exp $        */
+/*     $NetBSD: ibcs2_fcntl.c,v 1.14 2003/01/18 07:40:44 thorpej Exp $ */
 
 /*
  * Copyright (c) 1995 Scott Bartram
@@ -28,7 +28,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ibcs2_fcntl.c,v 1.13 2002/03/16 20:43:51 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ibcs2_fcntl.c,v 1.14 2003/01/18 07:40:44 thorpej Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -41,6 +41,7 @@
 #include <sys/kernel.h>
 #include <sys/mount.h>
 #include <sys/malloc.h>
+#include <sys/sa.h>
 #include <sys/syscallargs.h>
 #include <sys/vnode.h>
 
@@ -163,8 +164,8 @@
 }
 
 int
-ibcs2_sys_open(p, v, retval)
-       struct proc *p;
+ibcs2_sys_open(l, v, retval)
+       struct lwp *l;
        void *v;
        register_t *retval;
 {
@@ -173,6 +174,7 @@
                syscallarg(int) flags;
                syscallarg(int) mode;
        } */ *uap = v;
+       struct proc *p = l->l_proc;
        int noctty = SCARG(uap, flags) & IBCS2_O_NOCTTY;
        int ret;
        caddr_t sg = stackgap_init(p, 0);
@@ -182,7 +184,7 @@
                CHECK_ALT_CREAT(p, &sg, SCARG(uap, path));
        else
                CHECK_ALT_EXIST(p, &sg, SCARG(uap, path));
-       ret = sys_open(p, uap, retval);
+       ret = sys_open(l, uap, retval);
 
        if (!ret && !noctty && SESS_LEADER(p) && !(p->p_flag & P_CONTROLT)) {
                struct filedesc *fdp = p->p_fd;
@@ -198,8 +200,8 @@
 }
 
 int
-ibcs2_sys_creat(p, v, retval)
-        struct proc *p;  
+ibcs2_sys_creat(l, v, retval)
+        struct lwp *l;  
        void *v;
        register_t *retval;
 {       
@@ -207,6 +209,7 @@
                syscallarg(char *) path;
                syscallarg(int) mode;
        } */ *uap = v;
+       struct proc *p = l->l_proc;
        struct sys_open_args cup;   
        caddr_t sg = stackgap_init(p, 0);
 
@@ -214,12 +217,12 @@
        SCARG(&cup, path) = SCARG(uap, path);
        SCARG(&cup, mode) = SCARG(uap, mode);
        SCARG(&cup, flags) = O_WRONLY | O_CREAT | O_TRUNC;
-       return sys_open(p, &cup, retval);
+       return sys_open(l, &cup, retval);
 }       
 
 int
-ibcs2_sys_access(p, v, retval)
-        struct proc *p;
+ibcs2_sys_access(l, v, retval)
+        struct lwp *l;
        void *v;
         register_t *retval;
 {
@@ -228,17 +231,18 @@
                syscallarg(int) flags;
        } */ *uap = v;
         struct sys_access_args cup;
+       struct proc *p = l->l_proc;
         caddr_t sg = stackgap_init(p, 0);
 
         CHECK_ALT_EXIST(p, &sg, SCARG(uap, path));
         SCARG(&cup, path) = SCARG(uap, path);
         SCARG(&cup, flags) = SCARG(uap, flags);
-        return sys_access(p, &cup, retval);
+        return sys_access(l, &cup, retval);
 }
 
 int
-ibcs2_sys_eaccess(p, v, retval)
-        struct proc *p;
+ibcs2_sys_eaccess(l, v, retval)
+        struct lwp *l;
        void *v;
         register_t *retval;
 {
@@ -246,6 +250,7 @@
                syscallarg(char *) path;
                syscallarg(int) flags;
        } */ *uap = v;
+       struct proc *p = l->l_proc;
        struct ucred *cred = p->p_ucred;
        struct vnode *vp;
         int error, flags;
@@ -277,8 +282,8 @@
 }
 
 int
-ibcs2_sys_fcntl(p, v, retval)
-       struct proc *p;
+ibcs2_sys_fcntl(l, v, retval)
+       struct lwp *l;
        void *v;
        register_t *retval;
 {
@@ -287,6 +292,7 @@
                syscallarg(int) cmd;
                syscallarg(char *) arg;
        } */ *uap = v;
+       struct proc *p = l->l_proc;
        int error;
        struct sys_fcntl_args fa;
        struct flock *flp;
@@ -297,22 +303,22 @@
                SCARG(&fa, fd) = SCARG(uap, fd);
                SCARG(&fa, cmd) = F_DUPFD;
                SCARG(&fa, arg) = SCARG(uap, arg);
-               return sys_fcntl(p, &fa, retval);
+               return sys_fcntl(l, &fa, retval);
        case IBCS2_F_GETFD:
                SCARG(&fa, fd) = SCARG(uap, fd);
                SCARG(&fa, cmd) = F_GETFD;
                SCARG(&fa, arg) = SCARG(uap, arg);
-               return sys_fcntl(p, &fa, retval);
+               return sys_fcntl(l, &fa, retval);
        case IBCS2_F_SETFD:
                SCARG(&fa, fd) = SCARG(uap, fd);
                SCARG(&fa, cmd) = F_SETFD;
                SCARG(&fa, arg) = SCARG(uap, arg);
-               return sys_fcntl(p, &fa, retval);
+               return sys_fcntl(l, &fa, retval);
        case IBCS2_F_GETFL:
                SCARG(&fa, fd) = SCARG(uap, fd);
                SCARG(&fa, cmd) = F_GETFL;
                SCARG(&fa, arg) = SCARG(uap, arg);
-               error = sys_fcntl(p, &fa, retval);
+               error = sys_fcntl(l, &fa, retval);
                if (error)
                        return error;
                *retval = oflags2ioflags(*retval);
@@ -321,7 +327,7 @@
                SCARG(&fa, fd) = SCARG(uap, fd);
                SCARG(&fa, cmd) = F_SETFL;
                SCARG(&fa, arg) = (void *)ioflags2oflags((int) SCARG(uap, arg));
-               return sys_fcntl(p, &fa, retval);
+               return sys_fcntl(l, &fa, retval);
 
        case IBCS2_F_GETLK:
            {
@@ -335,7 +341,7 @@
                SCARG(&fa, fd) = SCARG(uap, fd);
                SCARG(&fa, cmd) = F_GETLK;
                SCARG(&fa, arg) = (void *)flp;
-               error = sys_fcntl(p, &fa, retval);
+               error = sys_fcntl(l, &fa, retval);
                if (error)
                        return error;
                cvt_flock2iflock(flp, &ifl);
@@ -355,7 +361,7 @@
                SCARG(&fa, fd) = SCARG(uap, fd);
                SCARG(&fa, cmd) = F_SETLK;
                SCARG(&fa, arg) = (void *)flp;
-               return sys_fcntl(p, &fa, retval);
+               return sys_fcntl(l, &fa, retval);
            }
 
        case IBCS2_F_SETLKW:
@@ -370,7 +376,7 @@
                SCARG(&fa, fd) = SCARG(uap, fd);
                SCARG(&fa, cmd) = F_SETLKW;
                SCARG(&fa, arg) = (void *)flp;
-               return sys_fcntl(p, &fa, retval);
+               return sys_fcntl(l, &fa, retval);
            }
        }
        return ENOSYS;
diff -r 87fa1946d685 -r eba432d27e30 sys/compat/ibcs2/ibcs2_ioctl.c
--- a/sys/compat/ibcs2/ibcs2_ioctl.c    Sat Jan 18 07:37:32 2003 +0000
+++ b/sys/compat/ibcs2/ibcs2_ioctl.c    Sat Jan 18 07:40:44 2003 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: ibcs2_ioctl.c,v 1.26 2002/09/23 05:51:19 simonb Exp $  */
+/*     $NetBSD: ibcs2_ioctl.c,v 1.27 2003/01/18 07:40:44 thorpej Exp $ */
 
 /*
  * Copyright (c) 1994, 1995 Scott Bartram
@@ -27,7 +27,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ibcs2_ioctl.c,v 1.26 2002/09/23 05:51:19 simonb Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ibcs2_ioctl.c,v 1.27 2003/01/18 07:40:44 thorpej Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -60,6 +60,7 @@
 #include <sys/unistd.h>
 
 #include <net/if.h>
+#include <sys/sa.h>
 #include <sys/syscallargs.h>
 
 #include <compat/ibcs2/ibcs2_types.h>
@@ -332,8 +333,8 @@
 }
 
 int
-ibcs2_sys_ioctl(p, v, retval)
-       struct proc *p;
+ibcs2_sys_ioctl(l, v, retval)
+       struct lwp *l;
        void *v;
        register_t *retval;
 {
@@ -342,6 +343,7 @@
                syscallarg(int) cmd;
                syscallarg(caddr_t) data;
        } */ *uap = v;
+       struct proc *p = l->l_proc;
        struct filedesc *fdp = p->p_fd;
        struct file *fp;
        int (*ctl) __P((struct file *, u_long, caddr_t, struct proc *));
@@ -507,11 +509,11 @@
 
        case IBCS2_TIOCGWINSZ:
                SCARG(uap, cmd) = TIOCGWINSZ;
-               return sys_ioctl(p, uap, retval);
+               return sys_ioctl(l, uap, retval);
 
        case IBCS2_TIOCSWINSZ:
                SCARG(uap, cmd) = TIOCSWINSZ;
-               return sys_ioctl(p, uap, retval);
+               return sys_ioctl(l, uap, retval);
 
        case IBCS2_TIOCGPGRP:
                return copyout((caddr_t)&p->p_pgrp->pg_id, SCARG(uap, data),
@@ -523,7 +525,7 @@
 
                SCARG(&sa, pid) = 0;
                SCARG(&sa, pgid) = (int)SCARG(uap, data);
-               if ((error = sys_setpgid(p, &sa, retval)) != 0)
+               if ((error = sys_setpgid(l, &sa, retval)) != 0)
                        return error;
                return 0;
            }
@@ -535,7 +537,7 @@
                return ENOSYS;
 
        case IBCS2_SIOCSOCKSYS:
-               return ibcs2_socksys(p, uap, retval);



Home | Main Index | Thread Index | Old Index