Merge the nathanw_sa branch.
This commit is contained in:
parent
790d584247
commit
a9d45e7ce9
|
@ -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 @@ __KERNEL_RCSID(0, "$NetBSD: ibcs2_exec_xout.c,v 1.2 2001/11/13 02:08:24 lukem Ex
|
|||
#include <sys/resourcevar.h>
|
||||
|
||||
#include <sys/mman.h>
|
||||
#include <sys/sa.h>
|
||||
#include <sys/syscallargs.h>
|
||||
|
||||
#include <machine/cpu.h>
|
||||
|
|
|
@ -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 @@ __KERNEL_RCSID(0, "$NetBSD: ibcs2_fcntl.c,v 1.13 2002/03/16 20:43:51 christos Ex
|
|||
#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 @@ oflags2ioflags(flags)
|
|||
}
|
||||
|
||||
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 @@ ibcs2_sys_open(p, v, retval)
|
|||
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 @@ ibcs2_sys_open(p, v, retval)
|
|||
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 @@ ibcs2_sys_open(p, v, retval)
|
|||
}
|
||||
|
||||
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 @@ ibcs2_sys_creat(p, v, retval)
|
|||
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 @@ ibcs2_sys_creat(p, v, retval)
|
|||
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 @@ ibcs2_sys_access(p, v, retval)
|
|||
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 @@ ibcs2_sys_eaccess(p, v, retval)
|
|||
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 @@ ibcs2_sys_eaccess(p, v, retval)
|
|||
}
|
||||
|
||||
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 @@ ibcs2_sys_fcntl(p, v, retval)
|
|||
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 @@ ibcs2_sys_fcntl(p, v, retval)
|
|||
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 @@ ibcs2_sys_fcntl(p, v, retval)
|
|||
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 @@ ibcs2_sys_fcntl(p, v, retval)
|
|||
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 @@ ibcs2_sys_fcntl(p, v, retval)
|
|||
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 @@ ibcs2_sys_fcntl(p, v, retval)
|
|||
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;
|
||||
|
|
|
@ -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 @@ __KERNEL_RCSID(0, "$NetBSD: ibcs2_ioctl.c,v 1.26 2002/09/23 05:51:19 simonb Exp
|
|||
#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 @@ stio2stios(t, ts)
|
|||
}
|
||||
|
||||
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 @@ ibcs2_sys_ioctl(p, v, retval)
|
|||
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 @@ ibcs2_sys_ioctl(p, v, retval)
|
|||
|
||||
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 @@ ibcs2_sys_ioctl(p, v, retval)
|
|||
|
||||
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 @@ ibcs2_sys_ioctl(p, v, retval)
|
|||
return ENOSYS;
|
||||
|
||||
case IBCS2_SIOCSOCKSYS:
|
||||
return ibcs2_socksys(p, uap, retval);
|
||||
return ibcs2_socksys(l, uap, retval);
|
||||
|
||||
case IBCS2_FIONBIO:
|
||||
{
|
||||
|
@ -550,7 +552,7 @@ ibcs2_sys_ioctl(p, v, retval)
|
|||
|
||||
case IBCS2_I_NREAD: /* STREAMS */
|
||||
SCARG(uap, cmd) = FIONREAD;
|
||||
return sys_ioctl(p, uap, retval);
|
||||
return sys_ioctl(l, uap, retval);
|
||||
|
||||
default:
|
||||
DPRINTF(("ibcs2_ioctl(%d): unknown cmd 0x%x ",
|
||||
|
@ -560,8 +562,8 @@ ibcs2_sys_ioctl(p, v, retval)
|
|||
}
|
||||
|
||||
int
|
||||
ibcs2_sys_gtty(p, v, retval)
|
||||
struct proc *p;
|
||||
ibcs2_sys_gtty(l, v, retval)
|
||||
struct lwp *l;
|
||||
void *v;
|
||||
register_t *retval;
|
||||
{
|
||||
|
@ -569,6 +571,7 @@ ibcs2_sys_gtty(p, v, retval)
|
|||
syscallarg(int) fd;
|
||||
syscallarg(struct sgttyb *) tb;
|
||||
} */ *uap = v;
|
||||
struct proc *p = l->l_proc;
|
||||
struct filedesc *fdp = p->p_fd;
|
||||
struct file *fp;
|
||||
struct sgttyb tb;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: ibcs2_ipc.c,v 1.15 2002/03/16 20:43:51 christos Exp $ */
|
||||
/* $NetBSD: ibcs2_ipc.c,v 1.16 2003/01/18 07:40:44 thorpej Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1995 Scott Bartram
|
||||
|
@ -25,7 +25,7 @@
|
|||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: ibcs2_ipc.c,v 1.15 2002/03/16 20:43:51 christos Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: ibcs2_ipc.c,v 1.16 2003/01/18 07:40:44 thorpej Exp $");
|
||||
|
||||
#if defined(_KERNEL_OPT)
|
||||
#include "opt_sysv.h"
|
||||
|
@ -61,6 +61,7 @@ __KERNEL_RCSID(0, "$NetBSD: ibcs2_ipc.c,v 1.15 2002/03/16 20:43:51 christos Exp
|
|||
#include <sys/msg.h>
|
||||
#include <sys/sem.h>
|
||||
#include <sys/shm.h>
|
||||
#include <sys/sa.h>
|
||||
#include <sys/syscallargs.h>
|
||||
|
||||
#include <compat/ibcs2/ibcs2_types.h>
|
||||
|
@ -179,8 +180,8 @@ cvt_imsqid2msqid(ibp, bp)
|
|||
}
|
||||
|
||||
int
|
||||
ibcs2_sys_msgsys(p, v, retval)
|
||||
struct proc *p;
|
||||
ibcs2_sys_msgsys(l, v, retval)
|
||||
struct lwp *l;
|
||||
void *v;
|
||||
register_t *retval;
|
||||
{
|
||||
|
@ -192,12 +193,13 @@ ibcs2_sys_msgsys(p, v, retval)
|
|||
syscallarg(int) a5;
|
||||
syscallarg(int) a6;
|
||||
} */ *uap = v;
|
||||
struct proc *p = l->l_proc;
|
||||
|
||||
switch (SCARG(uap, which)) {
|
||||
#ifdef SYSVMSG
|
||||
case 0: /* msgget */
|
||||
SCARG(uap, which) = 1;
|
||||
return compat_10_sys_msgsys(p, uap, retval);
|
||||
return compat_10_sys_msgsys(l, uap, retval);
|
||||
case 1: { /* msgctl */
|
||||
int error;
|
||||
struct compat_10_sys_msgsys_args margs;
|
||||
|
@ -210,7 +212,7 @@ ibcs2_sys_msgsys(p, v, retval)
|
|||
SCARG(&margs, a3) = SCARG(uap, a3);
|
||||
switch (SCARG(&margs, a3)) {
|
||||
case IBCS2_IPC_STAT:
|
||||
error = compat_10_sys_msgsys(p, &margs, retval);
|
||||
error = compat_10_sys_msgsys(l, &margs, retval);
|
||||
if (!error)
|
||||
cvt_msqid2imsqid((struct msqid_ds14 *)
|
||||
SCARG(&margs, a4),
|
||||
|
@ -221,18 +223,18 @@ ibcs2_sys_msgsys(p, v, retval)
|
|||
a4),
|
||||
(struct msqid_ds14 *) SCARG(&margs,
|
||||
a4));
|
||||
return compat_10_sys_msgsys(p, &margs, retval);
|
||||
return compat_10_sys_msgsys(l, &margs, retval);
|
||||
case IBCS2_IPC_RMID:
|
||||
return compat_10_sys_msgsys(p, &margs, retval);
|
||||
return compat_10_sys_msgsys(l, &margs, retval);
|
||||
}
|
||||
return EINVAL;
|
||||
}
|
||||
case 2: /* msgrcv */
|
||||
SCARG(uap, which) = 3;
|
||||
return compat_10_sys_msgsys(p, uap, retval);
|
||||
return compat_10_sys_msgsys(l, uap, retval);
|
||||
case 3: /* msgsnd */
|
||||
SCARG(uap, which) = 2;
|
||||
return compat_10_sys_msgsys(p, uap, retval);
|
||||
return compat_10_sys_msgsys(l, uap, retval);
|
||||
#endif
|
||||
default:
|
||||
return EINVAL;
|
||||
|
@ -324,8 +326,8 @@ cvt_isemid2semid(ibp, bp)
|
|||
}
|
||||
|
||||
int
|
||||
ibcs2_sys_semsys(p, v, retval)
|
||||
struct proc *p;
|
||||
ibcs2_sys_semsys(l, v, retval)
|
||||
struct lwp *l;
|
||||
void *v;
|
||||
register_t *retval;
|
||||
{
|
||||
|
@ -336,6 +338,7 @@ ibcs2_sys_semsys(p, v, retval)
|
|||
syscallarg(int) a4;
|
||||
syscallarg(int) a5;
|
||||
} */ *uap = v;
|
||||
struct proc *p = l->l_proc;
|
||||
int error;
|
||||
|
||||
#ifdef SYSVSEM
|
||||
|
@ -351,7 +354,7 @@ ibcs2_sys_semsys(p, v, retval)
|
|||
isp = (struct ibcs2_semid_ds *)SCARG(uap, a5);
|
||||
sp = stackgap_alloc(p, &sg, sizeof(struct semid_ds14));
|
||||
SCARG(uap, a5) = (int)sp;
|
||||
error = compat_10_sys_semsys(p, uap, retval);
|
||||
error = compat_10_sys_semsys(l, uap, retval);
|
||||
if (error)
|
||||
return error;
|
||||
error = copyin((caddr_t)sp, (caddr_t)&s,
|
||||
|
@ -379,16 +382,16 @@ ibcs2_sys_semsys(p, v, retval)
|
|||
if (error)
|
||||
return error;
|
||||
SCARG(uap, a5) = (int)sp;
|
||||
return compat_10_sys_semsys(p, uap, retval);
|
||||
return compat_10_sys_semsys(l, uap, retval);
|
||||
}
|
||||
}
|
||||
return compat_10_sys_semsys(p, uap, retval);
|
||||
return compat_10_sys_semsys(l, uap, retval);
|
||||
|
||||
case 1: /* semget */
|
||||
return compat_10_sys_semsys(p, uap, retval);
|
||||
return compat_10_sys_semsys(l, uap, retval);
|
||||
|
||||
case 2: /* semop */
|
||||
return compat_10_sys_semsys(p, uap, retval);
|
||||
return compat_10_sys_semsys(l, uap, retval);
|
||||
}
|
||||
#endif
|
||||
return EINVAL;
|
||||
|
@ -456,8 +459,8 @@ cvt_ishmid2shmid(ibp, bp)
|
|||
}
|
||||
|
||||
int
|
||||
ibcs2_sys_shmsys(p, v, retval)
|
||||
struct proc *p;
|
||||
ibcs2_sys_shmsys(l, v, retval)
|
||||
struct lwp *l;
|
||||
void *v;
|
||||
register_t *retval;
|
||||
{
|
||||
|
@ -467,12 +470,13 @@ ibcs2_sys_shmsys(p, v, retval)
|
|||
syscallarg(int) a3;
|
||||
syscallarg(int) a4;
|
||||
} */ *uap = v;
|
||||
struct proc *p = l->l_proc;
|
||||
int error;
|
||||
|
||||
#ifdef SYSVSHM
|
||||
switch (SCARG(uap, which)) {
|
||||
case 0: /* shmat */
|
||||
return compat_10_sys_shmsys(p, uap, retval);
|
||||
return compat_10_sys_shmsys(l, uap, retval);
|
||||
|
||||
case 1: /* shmctl */
|
||||
switch(SCARG(uap, a3)) {
|
||||
|
@ -485,7 +489,7 @@ ibcs2_sys_shmsys(p, v, retval)
|
|||
isp = (struct ibcs2_shmid_ds *)SCARG(uap, a4);
|
||||
sp = stackgap_alloc(p, &sg, sizeof(*sp));
|
||||
SCARG(uap, a4) = (int)sp;
|
||||
error = compat_10_sys_shmsys(p, uap, retval);
|
||||
error = compat_10_sys_shmsys(l, uap, retval);
|
||||
if (error)
|
||||
return error;
|
||||
error = copyin((caddr_t)sp, (caddr_t)&s,
|
||||
|
@ -513,16 +517,16 @@ ibcs2_sys_shmsys(p, v, retval)
|
|||
sizeof(s));
|
||||
if (error)
|
||||
return error;
|
||||
return compat_10_sys_shmsys(p, uap, retval);
|
||||
return compat_10_sys_shmsys(l, uap, retval);
|
||||
}
|
||||
}
|
||||
return compat_10_sys_shmsys(p, uap, retval);
|
||||
return compat_10_sys_shmsys(l, uap, retval);
|
||||
|
||||
case 2: /* shmdt */
|
||||
return compat_10_sys_shmsys(p, uap, retval);
|
||||
return compat_10_sys_shmsys(l, uap, retval);
|
||||
|
||||
case 3: /* shmget */
|
||||
return compat_10_sys_shmsys(p, uap, retval);
|
||||
return compat_10_sys_shmsys(l, uap, retval);
|
||||
}
|
||||
#endif
|
||||
return EINVAL;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: ibcs2_misc.c,v 1.59 2002/03/16 20:43:51 christos Exp $ */
|
||||
/* $NetBSD: ibcs2_misc.c,v 1.60 2003/01/18 07:40:45 thorpej Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1994, 1995, 1998 Scott Bartram
|
||||
|
@ -55,7 +55,7 @@
|
|||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: ibcs2_misc.c,v 1.59 2002/03/16 20:43:51 christos Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: ibcs2_misc.c,v 1.60 2003/01/18 07:40:45 thorpej Exp $");
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <sys/systm.h>
|
||||
|
@ -85,6 +85,7 @@ __KERNEL_RCSID(0, "$NetBSD: ibcs2_misc.c,v 1.59 2002/03/16 20:43:51 christos Exp
|
|||
#include <sys/unistd.h>
|
||||
|
||||
#include <netinet/in.h>
|
||||
#include <sys/sa.h>
|
||||
#include <sys/syscallargs.h>
|
||||
|
||||
#include <miscfs/specfs/specdev.h>
|
||||
|
@ -112,8 +113,8 @@ __KERNEL_RCSID(0, "$NetBSD: ibcs2_misc.c,v 1.59 2002/03/16 20:43:51 christos Exp
|
|||
#include <compat/ibcs2/ibcs2_exec.h>
|
||||
|
||||
int
|
||||
ibcs2_sys_ulimit(p, v, retval)
|
||||
struct proc *p;
|
||||
ibcs2_sys_ulimit(l, v, retval)
|
||||
struct lwp *l;
|
||||
void *v;
|
||||
register_t *retval;
|
||||
{
|
||||
|
@ -121,6 +122,7 @@ ibcs2_sys_ulimit(p, v, retval)
|
|||
syscallarg(int) cmd;
|
||||
syscallarg(int) newlimit;
|
||||
} */ *uap = v;
|
||||
struct proc *p = l->l_proc;
|
||||
#ifdef notyet
|
||||
int error;
|
||||
struct rlimit rl;
|
||||
|
@ -155,15 +157,15 @@ ibcs2_sys_ulimit(p, v, retval)
|
|||
return 0;
|
||||
case IBCS2_GETDTABLESIZE:
|
||||
SCARG(uap, cmd) = IBCS2_SC_OPEN_MAX;
|
||||
return ibcs2_sys_sysconf(p, uap, retval);
|
||||
return ibcs2_sys_sysconf(l, uap, retval);
|
||||
default:
|
||||
return ENOSYS;
|
||||
}
|
||||
}
|
||||
|
||||
int
|
||||
ibcs2_sys_waitsys(p, v, retval)
|
||||
struct proc *p;
|
||||
ibcs2_sys_waitsys(l, v, retval)
|
||||
struct lwp *l;
|
||||
void *v;
|
||||
register_t *retval;
|
||||
{
|
||||
|
@ -174,6 +176,7 @@ ibcs2_sys_waitsys(p, v, retval)
|
|||
syscallarg(int) a3;
|
||||
} */ *uap = v;
|
||||
#endif
|
||||
struct proc *p = l->l_proc;
|
||||
int error;
|
||||
struct sys_wait4_args w4;
|
||||
caddr_t sg;
|
||||
|
@ -185,7 +188,7 @@ ibcs2_sys_waitsys(p, v, retval)
|
|||
|
||||
#if defined(__i386__)
|
||||
#define WAITPID_EFLAGS 0x8c4 /* OF, SF, ZF, PF */
|
||||
if ((p->p_md.md_regs->tf_eflags & WAITPID_EFLAGS) == WAITPID_EFLAGS) {
|
||||
if ((l->l_md.md_regs->tf_eflags & WAITPID_EFLAGS) == WAITPID_EFLAGS) {
|
||||
/* waitpid */
|
||||
SCARG(&w4, pid) = SCARG(uap, a1);
|
||||
SCARG(&w4, options) = SCARG(uap, a3);
|
||||
|
@ -198,7 +201,7 @@ ibcs2_sys_waitsys(p, v, retval)
|
|||
}
|
||||
#endif
|
||||
|
||||
if ((error = sys_wait4(p, &w4, retval)) != 0)
|
||||
if ((error = sys_wait4(l, &w4, retval)) != 0)
|
||||
return error;
|
||||
|
||||
return copyin((caddr_t)SCARG(&w4, status), (caddr_t)&retval[1],
|
||||
|
@ -206,8 +209,8 @@ ibcs2_sys_waitsys(p, v, retval)
|
|||
}
|
||||
|
||||
int
|
||||
ibcs2_sys_execv(p, v, retval)
|
||||
struct proc *p;
|
||||
ibcs2_sys_execv(l, v, retval)
|
||||
struct lwp *l;
|
||||
void *v;
|
||||
register_t *retval;
|
||||
{
|
||||
|
@ -215,6 +218,7 @@ ibcs2_sys_execv(p, v, retval)
|
|||
syscallarg(const char *) path;
|
||||
syscallarg(char **) argp;
|
||||
} */ *uap = v;
|
||||
struct proc *p = l->l_proc;
|
||||
struct sys_execve_args ap;
|
||||
caddr_t sg;
|
||||
|
||||
|
@ -225,12 +229,12 @@ ibcs2_sys_execv(p, v, retval)
|
|||
SCARG(&ap, argp) = SCARG(uap, argp);
|
||||
SCARG(&ap, envp) = NULL;
|
||||
|
||||
return sys_execve(p, &ap, retval);
|
||||
return sys_execve(l, &ap, retval);
|
||||
}
|
||||
|
||||
int
|
||||
ibcs2_sys_execve(p, v, retval)
|
||||
struct proc *p;
|
||||
ibcs2_sys_execve(l, v, retval)
|
||||
struct lwp *l;
|
||||
void *v;
|
||||
register_t *retval;
|
||||
{
|
||||
|
@ -239,6 +243,7 @@ ibcs2_sys_execve(p, v, retval)
|
|||
syscallarg(char **) argp;
|
||||
syscallarg(char **) envp;
|
||||
} */ *uap = v;
|
||||
struct proc *p = l->l_proc;
|
||||
struct sys_execve_args ap;
|
||||
caddr_t sg;
|
||||
|
||||
|
@ -249,12 +254,12 @@ ibcs2_sys_execve(p, v, retval)
|
|||
SCARG(&ap, argp) = SCARG(uap, argp);
|
||||
SCARG(&ap, envp) = SCARG(uap, envp);
|
||||
|
||||
return sys_execve(p, &ap, retval);
|
||||
return sys_execve(l, &ap, retval);
|
||||
}
|
||||
|
||||
int
|
||||
ibcs2_sys_umount(p, v, retval)
|
||||
struct proc *p;
|
||||
ibcs2_sys_umount(l, v, retval)
|
||||
struct lwp *l;
|
||||
void *v;
|
||||
register_t *retval;
|
||||
{
|
||||
|
@ -265,12 +270,12 @@ ibcs2_sys_umount(p, v, retval)
|
|||
|
||||
SCARG(&um, path) = SCARG(uap, name);
|
||||
SCARG(&um, flags) = 0;
|
||||
return sys_unmount(p, &um, retval);
|
||||
return sys_unmount(l, &um, retval);
|
||||
}
|
||||
|
||||
int
|
||||
ibcs2_sys_mount(p, v, retval)
|
||||
struct proc *p;
|
||||
ibcs2_sys_mount(l, v, retval)
|
||||
struct lwp *l;
|
||||
void *v;
|
||||
register_t *retval;
|
||||
{
|
||||
|
@ -351,8 +356,8 @@ ibcs2_sys_mount(p, v, retval)
|
|||
*/
|
||||
|
||||
int
|
||||
ibcs2_sys_getdents(p, v, retval)
|
||||
struct proc *p;
|
||||
ibcs2_sys_getdents(l, v, retval)
|
||||
struct lwp *l;
|
||||
void *v;
|
||||
register_t *retval;
|
||||
{
|
||||
|
@ -361,6 +366,7 @@ ibcs2_sys_getdents(p, v, retval)
|
|||
syscallarg(char *) buf;
|
||||
syscallarg(int) nbytes;
|
||||
} */ *uap = v;
|
||||
struct proc *p = l->l_proc;
|
||||
struct dirent *bdp;
|
||||
struct vnode *vp;
|
||||
caddr_t inp, buf; /* BSD-format */
|
||||
|
@ -474,8 +480,8 @@ out:
|
|||
}
|
||||
|
||||
int
|
||||
ibcs2_sys_read(p, v, retval)
|
||||
struct proc *p;
|
||||
ibcs2_sys_read(l, v, retval)
|
||||
struct lwp *l;
|
||||
void *v;
|
||||
register_t *retval;
|
||||
{
|
||||
|
@ -484,6 +490,7 @@ ibcs2_sys_read(p, v, retval)
|
|||
syscallarg(char *) buf;
|
||||
syscallarg(u_int) nbytes;
|
||||
} */ *uap = v;
|
||||
struct proc *p = l->l_proc;
|
||||
struct dirent *bdp;
|
||||
struct vnode *vp;
|
||||
caddr_t inp, buf; /* BSD-format */
|
||||
|
@ -506,7 +513,7 @@ ibcs2_sys_read(p, v, retval)
|
|||
/* getvnode() will use the descriptor for us */
|
||||
if ((error = getvnode(p->p_fd, SCARG(uap, fd), &fp)) != 0) {
|
||||
if (error == EINVAL)
|
||||
return sys_read(p, uap, retval);
|
||||
return sys_read(l, uap, retval);
|
||||
else
|
||||
return error;
|
||||
}
|
||||
|
@ -517,7 +524,7 @@ ibcs2_sys_read(p, v, retval)
|
|||
vp = (struct vnode *)fp->f_data;
|
||||
if (vp->v_type != VDIR) {
|
||||
FILE_UNUSE(fp, p);
|
||||
return sys_read(p, uap, retval);
|
||||
return sys_read(l, uap, retval);
|
||||
}
|
||||
buflen = min(MAXBSIZE, max(DEV_BSIZE, SCARG(uap, nbytes)));
|
||||
buf = malloc(buflen, M_TEMP, M_WAITOK);
|
||||
|
@ -603,8 +610,8 @@ out1:
|
|||
}
|
||||
|
||||
int
|
||||
ibcs2_sys_mknod(p, v, retval)
|
||||
struct proc *p;
|
||||
ibcs2_sys_mknod(l, v, retval)
|
||||
struct lwp *l;
|
||||
void *v;
|
||||
register_t *retval;
|
||||
{
|
||||
|
@ -613,6 +620,7 @@ ibcs2_sys_mknod(p, v, retval)
|
|||
syscallarg(int) mode;
|
||||
syscallarg(int) dev;
|
||||
} */ *uap = v;
|
||||
struct proc *p = l->l_proc;
|
||||
caddr_t sg = stackgap_init(p, 0);
|
||||
|
||||
CHECK_ALT_CREAT(p, &sg, SCARG(uap, path));
|
||||
|
@ -620,19 +628,19 @@ ibcs2_sys_mknod(p, v, retval)
|
|||
struct sys_mkfifo_args ap;
|
||||
SCARG(&ap, path) = SCARG(uap, path);
|
||||
SCARG(&ap, mode) = SCARG(uap, mode);
|
||||
return sys_mkfifo(p, uap, retval);
|
||||
return sys_mkfifo(l, uap, retval);
|
||||
} else {
|
||||
struct sys_mknod_args ap;
|
||||
SCARG(&ap, path) = SCARG(uap, path);
|
||||
SCARG(&ap, mode) = SCARG(uap, mode);
|
||||
SCARG(&ap, dev) = SCARG(uap, dev);
|
||||
return sys_mknod(p, &ap, retval);
|
||||
return sys_mknod(l, &ap, retval);
|
||||
}
|
||||
}
|
||||
|
||||
int
|
||||
ibcs2_sys_getgroups(p, v, retval)
|
||||
struct proc *p;
|
||||
ibcs2_sys_getgroups(l, v, retval)
|
||||
struct lwp *l;
|
||||
void *v;
|
||||
register_t *retval;
|
||||
{
|
||||
|
@ -640,6 +648,7 @@ ibcs2_sys_getgroups(p, v, retval)
|
|||
syscallarg(int) gidsetsize;
|
||||
syscallarg(ibcs2_gid_t *) gidset;
|
||||
} */ *uap = v;
|
||||
struct proc *p = l->l_proc;
|
||||
int error, i;
|
||||
ibcs2_gid_t iset[NGROUPS_MAX];
|
||||
gid_t nset[NGROUPS_MAX];
|
||||
|
@ -657,7 +666,7 @@ ibcs2_sys_getgroups(p, v, retval)
|
|||
SCARG(&sa, gidset) = stackgap_alloc(p, &sg, NGROUPS_MAX *
|
||||
sizeof(gid_t *));
|
||||
}
|
||||
if ((error = sys_getgroups(p, &sa, retval)) != 0)
|
||||
if ((error = sys_getgroups(l, &sa, retval)) != 0)
|
||||
return error;
|
||||
if (gidsetsize) {
|
||||
gidsetsize = retval[0];
|
||||
|
@ -677,8 +686,8 @@ ibcs2_sys_getgroups(p, v, retval)
|
|||
}
|
||||
|
||||
int
|
||||
ibcs2_sys_setgroups(p, v, retval)
|
||||
struct proc *p;
|
||||
ibcs2_sys_setgroups(l, v, retval)
|
||||
struct lwp *l;
|
||||
void *v;
|
||||
register_t *retval;
|
||||
{
|
||||
|
@ -686,6 +695,7 @@ ibcs2_sys_setgroups(p, v, retval)
|
|||
syscallarg(int) gidsetsize;
|
||||
syscallarg(ibcs2_gid_t *) gidset;
|
||||
} */ *uap = v;
|
||||
struct proc *p = l->l_proc;
|
||||
int error, i;
|
||||
ibcs2_gid_t iset[NGROUPS_MAX];
|
||||
struct sys_setgroups_args sa;
|
||||
|
@ -709,12 +719,12 @@ ibcs2_sys_setgroups(p, v, retval)
|
|||
if (error)
|
||||
return error;
|
||||
SCARG(&sa, gidset) = ngid;
|
||||
return sys_setgroups(p, &sa, retval);
|
||||
return sys_setgroups(l, &sa, retval);
|
||||
}
|
||||
|
||||
int
|
||||
ibcs2_sys_setuid(p, v, retval)
|
||||
struct proc *p;
|
||||
ibcs2_sys_setuid(l, v, retval)
|
||||
struct lwp *l;
|
||||
void *v;
|
||||
register_t *retval;
|
||||
{
|
||||
|
@ -724,12 +734,12 @@ ibcs2_sys_setuid(p, v, retval)
|
|||
struct sys_setuid_args sa;
|
||||
|
||||
SCARG(&sa, uid) = (uid_t)SCARG(uap, uid);
|
||||
return sys_setuid(p, &sa, retval);
|
||||
return sys_setuid(l, &sa, retval);
|
||||
}
|
||||
|
||||
int
|
||||
ibcs2_sys_setgid(p, v, retval)
|
||||
struct proc *p;
|
||||
ibcs2_sys_setgid(l, v, retval)
|
||||
struct lwp *l;
|
||||
void *v;
|
||||
register_t *retval;
|
||||
{
|
||||
|
@ -739,12 +749,12 @@ ibcs2_sys_setgid(p, v, retval)
|
|||
struct sys_setgid_args sa;
|
||||
|
||||
SCARG(&sa, gid) = (gid_t)SCARG(uap, gid);
|
||||
return sys_setgid(p, &sa, retval);
|
||||
return sys_setgid(l, &sa, retval);
|
||||
}
|
||||
|
||||
int
|
||||
xenix_sys_ftime(p, v, retval)
|
||||
struct proc *p;
|
||||
xenix_sys_ftime(l, v, retval)
|
||||
struct lwp *l;
|
||||
void *v;
|
||||
register_t *retval;
|
||||
{
|
||||
|
@ -764,14 +774,15 @@ xenix_sys_ftime(p, v, retval)
|
|||
}
|
||||
|
||||
int
|
||||
ibcs2_sys_time(p, v, retval)
|
||||
struct proc *p;
|
||||
ibcs2_sys_time(l, v, retval)
|
||||
struct lwp *l;
|
||||
void *v;
|
||||
register_t *retval;
|
||||
{
|
||||
struct ibcs2_sys_time_args /* {
|
||||
syscallarg(ibcs2_time_t *) tp;
|
||||
} */ *uap = v;
|
||||
struct proc *p = l->l_proc;
|
||||
struct timeval tv;
|
||||
|
||||
microtime(&tv);
|
||||
|
@ -784,8 +795,8 @@ ibcs2_sys_time(p, v, retval)
|
|||
}
|
||||
|
||||
int
|
||||
ibcs2_sys_pathconf(p, v, retval)
|
||||
struct proc *p;
|
||||
ibcs2_sys_pathconf(l, v, retval)
|
||||
struct lwp *l;
|
||||
void *v;
|
||||
register_t *retval;
|
||||
{
|
||||
|
@ -794,12 +805,12 @@ ibcs2_sys_pathconf(p, v, retval)
|
|||
syscallarg(int) name;
|
||||
} */ *uap = v;
|
||||
SCARG(uap, name)++; /* iBCS2 _PC_* defines are offset by one */
|
||||
return sys_pathconf(p, uap, retval);
|
||||
return sys_pathconf(l, uap, retval);
|
||||
}
|
||||
|
||||
int
|
||||
ibcs2_sys_fpathconf(p, v, retval)
|
||||
struct proc *p;
|
||||
ibcs2_sys_fpathconf(l, v, retval)
|
||||
struct lwp *l;
|
||||
void *v;
|
||||
register_t *retval;
|
||||
{
|
||||
|
@ -808,18 +819,19 @@ ibcs2_sys_fpathconf(p, v, retval)
|
|||
syscallarg(int) name;
|
||||
} */ *uap = v;
|
||||
SCARG(uap, name)++; /* iBCS2 _PC_* defines are offset by one */
|
||||
return sys_fpathconf(p, uap, retval);
|
||||
return sys_fpathconf(l, uap, retval);
|
||||
}
|
||||
|
||||
int
|
||||
ibcs2_sys_sysconf(p, v, retval)
|
||||
struct proc *p;
|
||||
ibcs2_sys_sysconf(l, v, retval)
|
||||
struct lwp *l;
|
||||
void *v;
|
||||
register_t *retval;
|
||||
{
|
||||
struct ibcs2_sys_sysconf_args /* {
|
||||
syscallarg(int) name;
|
||||
} */ *uap = v;
|
||||
struct proc *p = l->l_proc;
|
||||
int mib[2], value, error;
|
||||
size_t len;
|
||||
struct sys___sysctl_args sa;
|
||||
|
@ -836,7 +848,7 @@ ibcs2_sys_sysconf(p, v, retval)
|
|||
|
||||
SCARG(&ga, which) = RLIMIT_NPROC;
|
||||
SCARG(&ga, rlp) = stackgap_alloc(p, &sg, sizeof(struct rlimit *));
|
||||
if ((error = sys_getrlimit(p, &ga, retval)) != 0)
|
||||
if ((error = sys_getrlimit(l, &ga, retval)) != 0)
|
||||
return error;
|
||||
*retval = SCARG(&ga, rlp)->rlim_cur;
|
||||
return 0;
|
||||
|
@ -856,7 +868,7 @@ ibcs2_sys_sysconf(p, v, retval)
|
|||
|
||||
SCARG(&ga, which) = RLIMIT_NOFILE;
|
||||
SCARG(&ga, rlp) = stackgap_alloc(p, &sg, sizeof(struct rlimit *));
|
||||
if ((error = sys_getrlimit(p, &ga, retval)) != 0)
|
||||
if ((error = sys_getrlimit(l, &ga, retval)) != 0)
|
||||
return error;
|
||||
*retval = SCARG(&ga, rlp)->rlim_cur;
|
||||
return 0;
|
||||
|
@ -894,21 +906,22 @@ ibcs2_sys_sysconf(p, v, retval)
|
|||
SCARG(&sa, oldlenp) = &len;
|
||||
SCARG(&sa, new) = NULL;
|
||||
SCARG(&sa, newlen) = 0;
|
||||
if ((error = sys___sysctl(p, &sa, retval)) != 0)
|
||||
if ((error = sys___sysctl(l, &sa, retval)) != 0)
|
||||
return error;
|
||||
*retval = value;
|
||||
return 0;
|
||||
}
|
||||
|
||||
int
|
||||
ibcs2_sys_alarm(p, v, retval)
|
||||
struct proc *p;
|
||||
ibcs2_sys_alarm(l, v, retval)
|
||||
struct lwp *l;
|
||||
void *v;
|
||||
register_t *retval;
|
||||
{
|
||||
struct ibcs2_sys_alarm_args /* {
|
||||
syscallarg(unsigned) sec;
|
||||
} */ *uap = v;
|
||||
struct proc *p = l->l_proc;
|
||||
int error;
|
||||
struct itimerval *itp, *oitp;
|
||||
struct sys_setitimer_args sa;
|
||||
|
@ -923,7 +936,7 @@ ibcs2_sys_alarm(p, v, retval)
|
|||
SCARG(&sa, which) = ITIMER_REAL;
|
||||
SCARG(&sa, itv) = itp;
|
||||
SCARG(&sa, oitv) = oitp;
|
||||
error = sys_setitimer(p, &sa, retval);
|
||||
error = sys_setitimer(l, &sa, retval);
|
||||
if (error)
|
||||
return error;
|
||||
if (oitp->it_value.tv_usec)
|
||||
|
@ -933,8 +946,8 @@ ibcs2_sys_alarm(p, v, retval)
|
|||
}
|
||||
|
||||
int
|
||||
ibcs2_sys_getmsg(p, v, retval)
|
||||
struct proc *p;
|
||||
ibcs2_sys_getmsg(l, v, retval)
|
||||
struct lwp *l;
|
||||
void *v;
|
||||
register_t *retval;
|
||||
{
|
||||
|
@ -951,8 +964,8 @@ ibcs2_sys_getmsg(p, v, retval)
|
|||
}
|
||||
|
||||
int
|
||||
ibcs2_sys_putmsg(p, v, retval)
|
||||
struct proc *p;
|
||||
ibcs2_sys_putmsg(l, v, retval)
|
||||
struct lwp *l;
|
||||
void *v;
|
||||
register_t *retval;
|
||||
{
|
||||
|
@ -969,14 +982,15 @@ ibcs2_sys_putmsg(p, v, retval)
|
|||
}
|
||||
|
||||
int
|
||||
ibcs2_sys_times(p, v, retval)
|
||||
struct proc *p;
|
||||
ibcs2_sys_times(l, v, retval)
|
||||
struct lwp *l;
|
||||
void *v;
|
||||
register_t *retval;
|
||||
{
|
||||
struct ibcs2_sys_times_args /* {
|
||||
syscallarg(struct tms *) tp;
|
||||
} */ *uap = v;
|
||||
struct proc *p = l->l_proc;
|
||||
int error;
|
||||
struct sys_getrusage_args ga;
|
||||
struct tms tms;
|
||||
|
@ -987,14 +1001,14 @@ ibcs2_sys_times(p, v, retval)
|
|||
|
||||
SCARG(&ga, who) = RUSAGE_SELF;
|
||||
SCARG(&ga, rusage) = ru;
|
||||
error = sys_getrusage(p, &ga, retval);
|
||||
error = sys_getrusage(l, &ga, retval);
|
||||
if (error)
|
||||
return error;
|
||||
tms.tms_utime = CONVTCK(ru->ru_utime);
|
||||
tms.tms_stime = CONVTCK(ru->ru_stime);
|
||||
|
||||
SCARG(&ga, who) = RUSAGE_CHILDREN;
|
||||
error = sys_getrusage(p, &ga, retval);
|
||||
error = sys_getrusage(l, &ga, retval);
|
||||
if (error)
|
||||
return error;
|
||||
tms.tms_cutime = CONVTCK(ru->ru_utime);
|
||||
|
@ -1008,14 +1022,15 @@ ibcs2_sys_times(p, v, retval)
|
|||
}
|
||||
|
||||
int
|
||||
ibcs2_sys_stime(p, v, retval)
|
||||
struct proc *p;
|
||||
ibcs2_sys_stime(l, v, retval)
|
||||
struct lwp *l;
|
||||
void *v;
|
||||
register_t *retval;
|
||||
{
|
||||
struct ibcs2_sys_stime_args /* {
|
||||
syscallarg(long *) timep;
|
||||
} */ *uap = v;
|
||||
struct proc *p = l->l_proc;
|
||||
int error;
|
||||
struct sys_settimeofday_args sa;
|
||||
caddr_t sg = stackgap_init(p, 0);
|
||||
|
@ -1029,14 +1044,14 @@ ibcs2_sys_stime(p, v, retval)
|
|||
return error;
|
||||
tvp->tv_usec = 0;
|
||||
SCARG(&sa, tv) = tvp;
|
||||
if ((error = sys_settimeofday(p, &sa, retval)) != 0)
|
||||
if ((error = sys_settimeofday(l, &sa, retval)) != 0)
|
||||
return EPERM;
|
||||
return 0;
|
||||
}
|
||||
|
||||
int
|
||||
ibcs2_sys_utime(p, v, retval)
|
||||
struct proc *p;
|
||||
ibcs2_sys_utime(l, v, retval)
|
||||
struct lwp *l;
|
||||
void *v;
|
||||
register_t *retval;
|
||||
{
|
||||
|
@ -1044,6 +1059,7 @@ ibcs2_sys_utime(p, v, retval)
|
|||
syscallarg(const char *) path;
|
||||
syscallarg(struct ibcs2_utimbuf *) buf;
|
||||
} */ *uap = v;
|
||||
struct proc *p = l->l_proc;
|
||||
int error;
|
||||
struct sys_utimes_args sa;
|
||||
struct timeval *tp;
|
||||
|
@ -1066,25 +1082,26 @@ ibcs2_sys_utime(p, v, retval)
|
|||
SCARG(&sa, tptr) = tp;
|
||||
} else
|
||||
SCARG(&sa, tptr) = NULL;
|
||||
return sys_utimes(p, &sa, retval);
|
||||
return sys_utimes(l, &sa, retval);
|
||||
}
|
||||
|
||||
int
|
||||
ibcs2_sys_nice(p, v, retval)
|
||||
struct proc *p;
|
||||
ibcs2_sys_nice(l, v, retval)
|
||||
struct lwp *l;
|
||||
void *v;
|
||||
register_t *retval;
|
||||
{
|
||||
struct ibcs2_sys_nice_args /* {
|
||||
syscallarg(int) incr;
|
||||
} */ *uap = v;
|
||||
struct proc *p = l->l_proc;
|
||||
int error;
|
||||
struct sys_setpriority_args sa;
|
||||
|
||||
SCARG(&sa, which) = PRIO_PROCESS;
|
||||
SCARG(&sa, who) = 0;
|
||||
SCARG(&sa, prio) = p->p_nice - NZERO + SCARG(uap, incr);
|
||||
if ((error = sys_setpriority(p, &sa, retval)) != 0)
|
||||
if ((error = sys_setpriority(l, &sa, retval)) != 0)
|
||||
return EPERM;
|
||||
*retval = p->p_nice - NZERO;
|
||||
return 0;
|
||||
|
@ -1095,8 +1112,8 @@ ibcs2_sys_nice(p, v, retval)
|
|||
*/
|
||||
|
||||
int
|
||||
ibcs2_sys_pgrpsys(p, v, retval)
|
||||
struct proc *p;
|
||||
ibcs2_sys_pgrpsys(l, v, retval)
|
||||
struct lwp *l;
|
||||
void *v;
|
||||
register_t *retval;
|
||||
{
|
||||
|
@ -1106,6 +1123,8 @@ ibcs2_sys_pgrpsys(p, v, retval)
|
|||
syscallarg(int) pid;
|
||||
syscallarg(int) pgid;
|
||||
} */ *uap = v;
|
||||
struct proc *p = l->l_proc;
|
||||
|
||||
switch (SCARG(uap, type)) {
|
||||
case 0: /* getpgrp */
|
||||
*retval = p->p_pgrp->pg_id;
|
||||
|
@ -1117,7 +1136,7 @@ ibcs2_sys_pgrpsys(p, v, retval)
|
|||
|
||||
SCARG(&sa, pid) = 0;
|
||||
SCARG(&sa, pgid) = 0;
|
||||
sys_setpgid(p, &sa, retval);
|
||||
sys_setpgid(l, &sa, retval);
|
||||
*retval = p->p_pgrp->pg_id;
|
||||
return 0;
|
||||
}
|
||||
|
@ -1128,11 +1147,11 @@ ibcs2_sys_pgrpsys(p, v, retval)
|
|||
|
||||
SCARG(&sa, pid) = SCARG(uap, pid);
|
||||
SCARG(&sa, pgid) = SCARG(uap, pgid);
|
||||
return sys_setpgid(p, &sa, retval);
|
||||
return sys_setpgid(l, &sa, retval);
|
||||
}
|
||||
|
||||
case 3: /* setsid */
|
||||
return sys_setsid(p, NULL, retval);
|
||||
return sys_setsid(l, NULL, retval);
|
||||
|
||||
default:
|
||||
return EINVAL;
|
||||
|
@ -1144,14 +1163,15 @@ ibcs2_sys_pgrpsys(p, v, retval)
|
|||
*/
|
||||
|
||||
int
|
||||
ibcs2_sys_plock(p, v, retval)
|
||||
struct proc *p;
|
||||
ibcs2_sys_plock(l, v, retval)
|
||||
struct lwp *l;
|
||||
void *v;
|
||||
register_t *retval;
|
||||
{
|
||||
struct ibcs2_sys_plock_args /* {
|
||||
syscallarg(int) cmd;
|
||||
} */ *uap = v;
|
||||
struct proc *p = l->l_proc;
|
||||
int error;
|
||||
#define IBCS2_UNLOCK 0
|
||||
#define IBCS2_PROCLOCK 1
|
||||
|
@ -1172,8 +1192,8 @@ ibcs2_sys_plock(p, v, retval)
|
|||
}
|
||||
|
||||
int
|
||||
ibcs2_sys_uadmin(p, v, retval)
|
||||
struct proc *p;
|
||||
ibcs2_sys_uadmin(l, v, retval)
|
||||
struct lwp *l;
|
||||
void *v;
|
||||
register_t *retval;
|
||||
{
|
||||
|
@ -1182,6 +1202,7 @@ ibcs2_sys_uadmin(p, v, retval)
|
|||
syscallarg(int) func;
|
||||
syscallarg(caddr_t) data;
|
||||
} */ *uap = v;
|
||||
struct proc *p = l->l_proc;
|
||||
int error;
|
||||
|
||||
#define SCO_A_REBOOT 1
|
||||
|
@ -1230,8 +1251,8 @@ ibcs2_sys_uadmin(p, v, retval)
|
|||
}
|
||||
|
||||
int
|
||||
ibcs2_sys_sysfs(p, v, retval)
|
||||
struct proc *p;
|
||||
ibcs2_sys_sysfs(l, v, retval)
|
||||
struct lwp *l;
|
||||
void *v;
|
||||
register_t *retval;
|
||||
{
|
||||
|
@ -1255,14 +1276,15 @@ ibcs2_sys_sysfs(p, v, retval)
|
|||
}
|
||||
|
||||
int
|
||||
xenix_sys_rdchk(p, v, retval)
|
||||
struct proc *p;
|
||||
xenix_sys_rdchk(l, v, retval)
|
||||
struct lwp *l;
|
||||
void *v;
|
||||
register_t *retval;
|
||||
{
|
||||
struct xenix_sys_rdchk_args /* {
|
||||
syscallarg(int) fd;
|
||||
} */ *uap = v;
|
||||
struct proc *p = l->l_proc;
|
||||
int error;
|
||||
struct sys_ioctl_args sa;
|
||||
caddr_t sg = stackgap_init(p, 0);
|
||||
|
@ -1270,15 +1292,15 @@ xenix_sys_rdchk(p, v, retval)
|
|||
SCARG(&sa, fd) = SCARG(uap, fd);
|
||||
SCARG(&sa, com) = FIONREAD;
|
||||
SCARG(&sa, data) = stackgap_alloc(p, &sg, sizeof(int));
|
||||
if ((error = sys_ioctl(p, &sa, retval)) != 0)
|
||||
if ((error = sys_ioctl(l, &sa, retval)) != 0)
|
||||
return error;
|
||||
*retval = (*((int*)SCARG(&sa, data))) ? 1 : 0;
|
||||
return 0;
|
||||
}
|
||||
|
||||
int
|
||||
xenix_sys_chsize(p, v, retval)
|
||||
struct proc *p;
|
||||
xenix_sys_chsize(l, v, retval)
|
||||
struct lwp *l;
|
||||
void *v;
|
||||
register_t *retval;
|
||||
{
|
||||
|
@ -1291,18 +1313,19 @@ xenix_sys_chsize(p, v, retval)
|
|||
SCARG(&sa, fd) = SCARG(uap, fd);
|
||||
SCARG(&sa, pad) = 0;
|
||||
SCARG(&sa, length) = SCARG(uap, size);
|
||||
return sys_ftruncate(p, &sa, retval);
|
||||
return sys_ftruncate(l, &sa, retval);
|
||||
}
|
||||
|
||||
int
|
||||
xenix_sys_nap(p, v, retval)
|
||||
struct proc *p;
|
||||
xenix_sys_nap(l, v, retval)
|
||||
struct lwp *l;
|
||||
void *v;
|
||||
register_t *retval;
|
||||
{
|
||||
struct xenix_sys_nap_args /* {
|
||||
syscallarg(long) millisec;
|
||||
} */ *uap = v;
|
||||
struct proc *p = l->l_proc;
|
||||
int error;
|
||||
struct sys_nanosleep_args na;
|
||||
struct timespec *rqtp;
|
||||
|
@ -1315,45 +1338,47 @@ xenix_sys_nap(p, v, retval)
|
|||
rqtp->tv_nsec = SCARG(uap, millisec) * 1000;
|
||||
SCARG(&na, rqtp) = rqtp;
|
||||
SCARG(&na, rmtp) = rmtp;
|
||||
if ((error = sys_nanosleep(p, &na, retval)) != 0)
|
||||
if ((error = sys_nanosleep(l, &na, retval)) != 0)
|
||||
return error;
|
||||
*retval = rmtp->tv_nsec / 1000;
|
||||
return 0;
|
||||
}
|
||||
|
||||
int
|
||||
ibcs2_sys_unlink(p, v, retval)
|
||||
struct proc *p;
|
||||
ibcs2_sys_unlink(l, v, retval)
|
||||
struct lwp *l;
|
||||
void *v;
|
||||
register_t *retval;
|
||||
{
|
||||
struct ibcs2_sys_unlink_args /* {
|
||||
syscallarg(const char *) path;
|
||||
} */ *uap = v;
|
||||
struct proc *p = l->l_proc;
|
||||
caddr_t sg = stackgap_init(p, 0);
|
||||
|
||||
CHECK_ALT_EXIST(p, &sg, SCARG(uap, path));
|
||||
return sys_unlink(p, uap, retval);
|
||||
return sys_unlink(l, uap, retval);
|
||||
}
|
||||
|
||||
int
|
||||
ibcs2_sys_chdir(p, v, retval)
|
||||
struct proc *p;
|
||||
ibcs2_sys_chdir(l, v, retval)
|
||||
struct lwp *l;
|
||||
void *v;
|
||||
register_t *retval;
|
||||
{
|
||||
struct ibcs2_sys_chdir_args /* {
|
||||
syscallarg(const char *) path;
|
||||
} */ *uap = v;
|
||||
struct proc *p = l->l_proc;
|
||||
caddr_t sg = stackgap_init(p, 0);
|
||||
|
||||
CHECK_ALT_EXIST(p, &sg, SCARG(uap, path));
|
||||
return sys_chdir(p, uap, retval);
|
||||
return sys_chdir(l, uap, retval);
|
||||
}
|
||||
|
||||
int
|
||||
ibcs2_sys_chmod(p, v, retval)
|
||||
struct proc *p;
|
||||
ibcs2_sys_chmod(l, v, retval)
|
||||
struct lwp *l;
|
||||
void *v;
|
||||
register_t *retval;
|
||||
{
|
||||
|
@ -1361,15 +1386,16 @@ ibcs2_sys_chmod(p, v, retval)
|
|||
syscallarg(const char *) path;
|
||||
syscallarg(int) mode;
|
||||
} */ *uap = v;
|
||||
struct proc *p = l->l_proc;
|
||||
caddr_t sg = stackgap_init(p, 0);
|
||||
|
||||
CHECK_ALT_EXIST(p, &sg, SCARG(uap, path));
|
||||
return sys_chmod(p, uap, retval);
|
||||
return sys_chmod(l, uap, retval);
|
||||
}
|
||||
|
||||
int
|
||||
ibcs2_sys_chown(p, v, retval)
|
||||
struct proc *p;
|
||||
ibcs2_sys_chown(l, v, retval)
|
||||
struct lwp *l;
|
||||
void *v;
|
||||
register_t *retval;
|
||||
{
|
||||
|
@ -1378,30 +1404,32 @@ ibcs2_sys_chown(p, v, retval)
|
|||
syscallarg(int) uid;
|
||||
syscallarg(int) gid;
|
||||
} */ *uap = v;
|
||||
struct proc *p = l->l_proc;
|
||||
caddr_t sg = stackgap_init(p, 0);
|
||||
|
||||
CHECK_ALT_EXIST(p, &sg, SCARG(uap, path));
|
||||
return sys___posix_chown(p, uap, retval);
|
||||
return sys___posix_chown(l, uap, retval);
|
||||
}
|
||||
|
||||
int
|
||||
ibcs2_sys_rmdir(p, v, retval)
|
||||
struct proc *p;
|
||||
ibcs2_sys_rmdir(l, v, retval)
|
||||
struct lwp *l;
|
||||
void *v;
|
||||
register_t *retval;
|
||||
{
|
||||
struct ibcs2_sys_rmdir_args /* {
|
||||
syscallarg(const char *) path;
|
||||
} */ *uap = v;
|
||||
struct proc *p = l->l_proc;
|
||||
caddr_t sg = stackgap_init(p, 0);
|
||||
|
||||
CHECK_ALT_EXIST(p, &sg, SCARG(uap, path));
|
||||
return sys_rmdir(p, uap, retval);
|
||||
return sys_rmdir(l, uap, retval);
|
||||
}
|
||||
|
||||
int
|
||||
ibcs2_sys_mkdir(p, v, retval)
|
||||
struct proc *p;
|
||||
ibcs2_sys_mkdir(l, v, retval)
|
||||
struct lwp *l;
|
||||
void *v;
|
||||
register_t *retval;
|
||||
{
|
||||
|
@ -1409,15 +1437,16 @@ ibcs2_sys_mkdir(p, v, retval)
|
|||
syscallarg(const char *) path;
|
||||
syscallarg(int) mode;
|
||||
} */ *uap = v;
|
||||
struct proc *p = l->l_proc;
|
||||
caddr_t sg = stackgap_init(p, 0);
|
||||
|
||||
CHECK_ALT_CREAT(p, &sg, SCARG(uap, path));
|
||||
return sys_mkdir(p, uap, retval);
|
||||
return sys_mkdir(l, uap, retval);
|
||||
}
|
||||
|
||||
int
|
||||
ibcs2_sys_symlink(p, v, retval)
|
||||
struct proc *p;
|
||||
ibcs2_sys_symlink(l, v, retval)
|
||||
struct lwp *l;
|
||||
void *v;
|
||||
register_t *retval;
|
||||
{
|
||||
|
@ -1425,16 +1454,17 @@ ibcs2_sys_symlink(p, v, retval)
|
|||
syscallarg(const char *) path;
|
||||
syscallarg(const char *) link;
|
||||
} */ *uap = v;
|
||||
struct proc *p = l->l_proc;
|
||||
caddr_t sg = stackgap_init(p, 0);
|
||||
|
||||
CHECK_ALT_EXIST(p, &sg, SCARG(uap, path));
|
||||
CHECK_ALT_CREAT(p, &sg, SCARG(uap, link));
|
||||
return sys_symlink(p, uap, retval);
|
||||
return sys_symlink(l, uap, retval);
|
||||
}
|
||||
|
||||
int
|
||||
ibcs2_sys_rename(p, v, retval)
|
||||
struct proc *p;
|
||||
ibcs2_sys_rename(l, v, retval)
|
||||
struct lwp *l;
|
||||
void *v;
|
||||
register_t *retval;
|
||||
{
|
||||
|
@ -1442,16 +1472,17 @@ ibcs2_sys_rename(p, v, retval)
|
|||
syscallarg(const char *) from;
|
||||
syscallarg(const char *) to;
|
||||
} */ *uap = v;
|
||||
struct proc *p = l->l_proc;
|
||||
caddr_t sg = stackgap_init(p, 0);
|
||||
|
||||
CHECK_ALT_EXIST(p, &sg, SCARG(uap, from));
|
||||
CHECK_ALT_CREAT(p, &sg, SCARG(uap, to));
|
||||
return sys___posix_rename(p, uap, retval);
|
||||
return sys___posix_rename(l, uap, retval);
|
||||
}
|
||||
|
||||
int
|
||||
ibcs2_sys_readlink(p, v, retval)
|
||||
struct proc *p;
|
||||
ibcs2_sys_readlink(l, v, retval)
|
||||
struct lwp *l;
|
||||
void *v;
|
||||
register_t *retval;
|
||||
{
|
||||
|
@ -1460,10 +1491,11 @@ ibcs2_sys_readlink(p, v, retval)
|
|||
syscallarg(char *) buf;
|
||||
syscallarg(int) count;
|
||||
} */ *uap = v;
|
||||
struct proc *p = l->l_proc;
|
||||
caddr_t sg = stackgap_init(p, 0);
|
||||
|
||||
CHECK_ALT_SYMLINK(p, &sg, SCARG(uap, path));
|
||||
return sys_readlink(p, uap, retval);
|
||||
return sys_readlink(l, uap, retval);
|
||||
}
|
||||
|
||||
|
||||
|
@ -1472,8 +1504,8 @@ ibcs2_sys_readlink(p, v, retval)
|
|||
*/
|
||||
|
||||
int
|
||||
ibcs2_sys_mmap(p, v, retval)
|
||||
struct proc *p;
|
||||
ibcs2_sys_mmap(l, v, retval)
|
||||
struct lwp *l;
|
||||
void *v;
|
||||
register_t *retval;
|
||||
{
|
||||
|
@ -1485,6 +1517,7 @@ ibcs2_sys_mmap(p, v, retval)
|
|||
syscallarg(int) fd;
|
||||
syscallarg(ibcs2_off_t) off;
|
||||
} */ *uap = v;
|
||||
struct proc *p = l->l_proc;
|
||||
struct sys_mmap_args mm;
|
||||
void *rp;
|
||||
|
||||
|
@ -1507,12 +1540,12 @@ ibcs2_sys_mmap(p, v, retval)
|
|||
SCARG(&mm, addr) != 0 && SCARG(&mm, addr) < rp)
|
||||
SCARG(&mm, addr) = rp;
|
||||
|
||||
return sys_mmap(p, &mm, retval);
|
||||
return sys_mmap(l, &mm, retval);
|
||||
}
|
||||
|
||||
int
|
||||
ibcs2_sys_memcntl(p, v, retval)
|
||||
struct proc *p;
|
||||
ibcs2_sys_memcntl(l, v, retval)
|
||||
struct lwp *l;
|
||||
void *v;
|
||||
register_t *retval;
|
||||
{
|
||||
|
@ -1534,7 +1567,7 @@ ibcs2_sys_memcntl(p, v, retval)
|
|||
SCARG(&msa, len) = SCARG(uap, len);
|
||||
SCARG(&msa, flags) = (int)SCARG(uap, arg);
|
||||
|
||||
return sys___msync13(p, &msa, retval);
|
||||
return sys___msync13(l, &msa, retval);
|
||||
}
|
||||
#ifdef IBCS2_MC_ADVISE /* supported? */
|
||||
case IBCS2_MC_ADVISE:
|
||||
|
@ -1545,7 +1578,7 @@ ibcs2_sys_memcntl(p, v, retval)
|
|||
SCARG(&maa, len) = SCARG(uap, len);
|
||||
SCARG(&maa, behav) = (int)SCARG(uap, arg);
|
||||
|
||||
return sys_madvise(p, &maa, retval);
|
||||
return sys_madvise(l, &maa, retval);
|
||||
}
|
||||
#endif
|
||||
case IBCS2_MC_LOCK:
|
||||
|
@ -1559,8 +1592,8 @@ ibcs2_sys_memcntl(p, v, retval)
|
|||
}
|
||||
|
||||
int
|
||||
ibcs2_sys_gettimeofday(p, v, retval)
|
||||
struct proc *p;
|
||||
ibcs2_sys_gettimeofday(l, v, retval)
|
||||
struct lwp *l;
|
||||
void *v;
|
||||
register_t *retval;
|
||||
{
|
||||
|
@ -1579,8 +1612,8 @@ ibcs2_sys_gettimeofday(p, v, retval)
|
|||
}
|
||||
|
||||
int
|
||||
ibcs2_sys_settimeofday(p, v, retval)
|
||||
struct proc *p;
|
||||
ibcs2_sys_settimeofday(l, v, retval)
|
||||
struct lwp *l;
|
||||
void *v;
|
||||
register_t *retval;
|
||||
{
|
||||
|
@ -1591,12 +1624,12 @@ ibcs2_sys_settimeofday(p, v, retval)
|
|||
|
||||
SCARG(&ap, tv) = SCARG(uap, tp);
|
||||
SCARG(&ap, tzp) = NULL;
|
||||
return sys_settimeofday(p, &ap, retval);
|
||||
return sys_settimeofday(l, &ap, retval);
|
||||
}
|
||||
|
||||
int
|
||||
ibcs2_sys_scoinfo(p, v, retval)
|
||||
struct proc *p;
|
||||
ibcs2_sys_scoinfo(l, v, retval)
|
||||
struct lwp *l;
|
||||
void *v;
|
||||
register_t *retval;
|
||||
{
|
||||
|
@ -1604,6 +1637,7 @@ ibcs2_sys_scoinfo(p, v, retval)
|
|||
syscallarg(struct scoutsname *) bp;
|
||||
syscallarg(int) len;
|
||||
} */ *uap = v;
|
||||
struct proc *p = l->l_proc;
|
||||
caddr_t sg = stackgap_init(p, 0);
|
||||
struct scoutsname *utsp = stackgap_alloc(p, &sg,
|
||||
sizeof(struct scoutsname));
|
||||
|
@ -1636,8 +1670,8 @@ ibcs2_sys_scoinfo(p, v, retval)
|
|||
#define X_LK_TESTLK 8
|
||||
|
||||
int
|
||||
xenix_sys_locking(p, v, retval)
|
||||
struct proc *p;
|
||||
xenix_sys_locking(l, v, retval)
|
||||
struct lwp *l;
|
||||
void *v;
|
||||
register_t *retval;
|
||||
{
|
||||
|
@ -1646,6 +1680,7 @@ xenix_sys_locking(p, v, retval)
|
|||
syscallarg(int) blk;
|
||||
syscallarg(int) size;
|
||||
} */ *uap = v;
|
||||
struct proc *p = l->l_proc;
|
||||
struct sys_fcntl_args fa;
|
||||
struct flock *flp;
|
||||
struct filedesc *fdp = p->p_fd;
|
||||
|
@ -1658,7 +1693,7 @@ xenix_sys_locking(p, v, retval)
|
|||
case X_LK_GETLK:
|
||||
case X_LK_SETLK:
|
||||
case X_LK_SETLKW:
|
||||
return ibcs2_sys_fcntl(p, v, retval);
|
||||
return ibcs2_sys_fcntl(l, v, retval);
|
||||
}
|
||||
|
||||
if ((fp = fd_getfile(fdp, SCARG(uap, fd))) == NULL)
|
||||
|
@ -1694,5 +1729,5 @@ xenix_sys_locking(p, v, retval)
|
|||
SCARG(&fa, cmd) = cmd;
|
||||
SCARG(&fa, arg) = (void *)flp;
|
||||
|
||||
return sys_fcntl(p, &fa, retval);
|
||||
return sys_fcntl(l, &fa, retval);
|
||||
}
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: ibcs2_signal.c,v 1.17 2002/11/26 18:43:20 christos Exp $ */
|
||||
/* $NetBSD: ibcs2_signal.c,v 1.18 2003/01/18 07:40:45 thorpej Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1995 Scott Bartram
|
||||
|
@ -28,7 +28,7 @@
|
|||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: ibcs2_signal.c,v 1.17 2002/11/26 18:43:20 christos Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: ibcs2_signal.c,v 1.18 2003/01/18 07:40:45 thorpej Exp $");
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <sys/systm.h>
|
||||
|
@ -42,6 +42,7 @@ __KERNEL_RCSID(0, "$NetBSD: ibcs2_signal.c,v 1.17 2002/11/26 18:43:20 christos E
|
|||
#include <sys/signalvar.h>
|
||||
#include <sys/malloc.h>
|
||||
|
||||
#include <sys/sa.h>
|
||||
#include <sys/syscallargs.h>
|
||||
|
||||
#include <compat/ibcs2/ibcs2_types.h>
|
||||
|
@ -177,8 +178,8 @@ native_to_ibcs2_sigaltstack(bss, sss)
|
|||
}
|
||||
|
||||
int
|
||||
ibcs2_sys_sigaction(p, v, retval)
|
||||
struct proc *p;
|
||||
ibcs2_sys_sigaction(l, v, retval)
|
||||
struct lwp *l;
|
||||
void *v;
|
||||
register_t *retval;
|
||||
{
|
||||
|
@ -187,6 +188,7 @@ ibcs2_sys_sigaction(p, v, retval)
|
|||
syscallarg(const struct ibcs2_sigaction *) nsa;
|
||||
syscallarg(struct ibcs2_sigaction *) osa;
|
||||
} */ *uap = v;
|
||||
struct proc *p = l->l_proc;
|
||||
struct ibcs2_sigaction nisa, oisa;
|
||||
struct sigaction nbsa, obsa;
|
||||
int error;
|
||||
|
@ -212,8 +214,8 @@ ibcs2_sys_sigaction(p, v, retval)
|
|||
}
|
||||
|
||||
int
|
||||
ibcs2_sys_sigaltstack(p, v, retval)
|
||||
struct proc *p;
|
||||
ibcs2_sys_sigaltstack(l, v, retval)
|
||||
struct lwp *l;
|
||||
void *v;
|
||||
register_t *retval;
|
||||
{
|
||||
|
@ -221,6 +223,7 @@ ibcs2_sys_sigaltstack(p, v, retval)
|
|||
syscallarg(const struct ibcs2_sigaltstack *) nss;
|
||||
syscallarg(struct ibcs2_sigaltstack *) oss;
|
||||
} */ *uap = v;
|
||||
struct proc *p = l->l_proc;
|
||||
struct ibcs2_sigaltstack nsss, osss;
|
||||
struct sigaltstack nbss, obss;
|
||||
int error;
|
||||
|
@ -245,8 +248,8 @@ ibcs2_sys_sigaltstack(p, v, retval)
|
|||
}
|
||||
|
||||
int
|
||||
ibcs2_sys_sigsys(p, v, retval)
|
||||
struct proc *p;
|
||||
ibcs2_sys_sigsys(l, v, retval)
|
||||
struct lwp *l;
|
||||
void *v;
|
||||
register_t *retval;
|
||||
{
|
||||
|
@ -254,6 +257,7 @@ ibcs2_sys_sigsys(p, v, retval)
|
|||
syscallarg(int) sig;
|
||||
syscallarg(ibcs2_sig_t) fp;
|
||||
} */ *uap = v;
|
||||
struct proc *p = l->l_proc;
|
||||
int signum = ibcs2_to_native_signo[IBCS2_SIGNO(SCARG(uap, sig))];
|
||||
struct sigaction nbsa, obsa;
|
||||
sigset_t ss;
|
||||
|
@ -306,8 +310,8 @@ ibcs2_sys_sigsys(p, v, retval)
|
|||
}
|
||||
|
||||
int
|
||||
ibcs2_sys_sigprocmask(p, v, retval)
|
||||
struct proc *p;
|
||||
ibcs2_sys_sigprocmask(l, v, retval)
|
||||
struct lwp *l;
|
||||
void *v;
|
||||
register_t *retval;
|
||||
{
|
||||
|
@ -316,6 +320,7 @@ ibcs2_sys_sigprocmask(p, v, retval)
|
|||
syscallarg(const ibcs2_sigset_t *) set;
|
||||
syscallarg(ibcs2_sigset_t *) oset;
|
||||
} */ *uap = v;
|
||||
struct proc *p = l->l_proc;
|
||||
ibcs2_sigset_t niss, oiss;
|
||||
sigset_t nbss, obss;
|
||||
int how;
|
||||
|
@ -355,14 +360,15 @@ ibcs2_sys_sigprocmask(p, v, retval)
|
|||
}
|
||||
|
||||
int
|
||||
ibcs2_sys_sigpending(p, v, retval)
|
||||
struct proc *p;
|
||||
ibcs2_sys_sigpending(l, v, retval)
|
||||
struct lwp *l;
|
||||
void *v;
|
||||
register_t *retval;
|
||||
{
|
||||
struct ibcs2_sys_sigpending_args /* {
|
||||
syscallarg(ibcs2_sigset_t *) set;
|
||||
} */ *uap = v;
|
||||
struct proc *p = l->l_proc;
|
||||
sigset_t bss;
|
||||
ibcs2_sigset_t iss;
|
||||
|
||||
|
@ -372,14 +378,15 @@ ibcs2_sys_sigpending(p, v, retval)
|
|||
}
|
||||
|
||||
int
|
||||
ibcs2_sys_sigsuspend(p, v, retval)
|
||||
struct proc *p;
|
||||
ibcs2_sys_sigsuspend(l, v, retval)
|
||||
struct lwp *l;
|
||||
void *v;
|
||||
register_t *retval;
|
||||
{
|
||||
struct ibcs2_sys_sigsuspend_args /* {
|
||||
syscallarg(const ibcs2_sigset_t *) set;
|
||||
} */ *uap = v;
|
||||
struct proc *p = l->l_proc;
|
||||
ibcs2_sigset_t sss;
|
||||
sigset_t bss;
|
||||
int error;
|
||||
|
@ -395,18 +402,18 @@ ibcs2_sys_sigsuspend(p, v, retval)
|
|||
}
|
||||
|
||||
int
|
||||
ibcs2_sys_pause(p, v, retval)
|
||||
struct proc *p;
|
||||
ibcs2_sys_pause(l, v, retval)
|
||||
struct lwp *l;
|
||||
void *v;
|
||||
register_t *retval;
|
||||
{
|
||||
|
||||
return (sigsuspend1(p, 0));
|
||||
return (sigsuspend1(l->l_proc, 0));
|
||||
}
|
||||
|
||||
int
|
||||
ibcs2_sys_kill(p, v, retval)
|
||||
struct proc *p;
|
||||
ibcs2_sys_kill(l, v, retval)
|
||||
struct lwp *l;
|
||||
void *v;
|
||||
register_t *retval;
|
||||
{
|
||||
|
@ -418,5 +425,5 @@ ibcs2_sys_kill(p, v, retval)
|
|||
|
||||
SCARG(&ka, pid) = SCARG(uap, pid);
|
||||
SCARG(&ka, signum) = ibcs2_to_native_signo[SCARG(uap, signo)];
|
||||
return sys_kill(p, &ka, retval);
|
||||
return sys_kill(l, &ka, retval);
|
||||
}
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: ibcs2_socksys.c,v 1.9 2001/11/13 02:08:27 lukem Exp $ */
|
||||
/* $NetBSD: ibcs2_socksys.c,v 1.10 2003/01/18 07:40:45 thorpej Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1994, 1995 Scott Bartram
|
||||
|
@ -26,7 +26,7 @@
|
|||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: ibcs2_socksys.c,v 1.9 2001/11/13 02:08:27 lukem Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: ibcs2_socksys.c,v 1.10 2003/01/18 07:40:45 thorpej Exp $");
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <sys/systm.h>
|
||||
|
@ -42,6 +42,7 @@ __KERNEL_RCSID(0, "$NetBSD: ibcs2_socksys.c,v 1.9 2001/11/13 02:08:27 lukem Exp
|
|||
#include <net/if.h>
|
||||
|
||||
|
||||
#include <sys/sa.h>
|
||||
#include <sys/syscallargs.h>
|
||||
|
||||
#include <compat/ibcs2/ibcs2_socksys.h>
|
||||
|
@ -58,8 +59,8 @@ struct ibcs2_socksys_args {
|
|||
};
|
||||
|
||||
int
|
||||
ibcs2_socksys(p, v, retval)
|
||||
struct proc *p;
|
||||
ibcs2_socksys(l, v, retval)
|
||||
struct lwp *l;
|
||||
void *v;
|
||||
register_t *retval;
|
||||
{
|
||||
|
@ -81,55 +82,55 @@ ibcs2_socksys(p, v, retval)
|
|||
realargs[4], realargs[5], realargs[6]));
|
||||
switch (realargs[0]) {
|
||||
case SOCKSYS_ACCEPT:
|
||||
return sys_accept(p, realargs + 1, retval);
|
||||
return sys_accept(l, realargs + 1, retval);
|
||||
case SOCKSYS_BIND:
|
||||
return sys_bind(p, realargs + 1, retval);
|
||||
return sys_bind(l, realargs + 1, retval);
|
||||
case SOCKSYS_CONNECT:
|
||||
return sys_connect(p, realargs + 1, retval);
|
||||
return sys_connect(l, realargs + 1, retval);
|
||||
case SOCKSYS_GETPEERNAME:
|
||||
return sys_getpeername(p, realargs + 1, retval);
|
||||
return sys_getpeername(l, realargs + 1, retval);
|
||||
case SOCKSYS_GETSOCKNAME:
|
||||
return sys_getsockname(p, realargs + 1, retval);
|
||||
return sys_getsockname(l, realargs + 1, retval);
|
||||
case SOCKSYS_GETSOCKOPT:
|
||||
return sys_getsockopt(p, realargs + 1, retval);
|
||||
return sys_getsockopt(l, realargs + 1, retval);
|
||||
case SOCKSYS_LISTEN:
|
||||
return sys_listen(p, realargs + 1, retval);
|
||||
return sys_listen(l, realargs + 1, retval);
|
||||
case SOCKSYS_RECV:
|
||||
realargs[5] = realargs[6] = 0;
|
||||
/* FALLTHROUGH */
|
||||
case SOCKSYS_RECVFROM:
|
||||
return sys_recvfrom(p, realargs + 1, retval);
|
||||
return sys_recvfrom(l, realargs + 1, retval);
|
||||
case SOCKSYS_SEND:
|
||||
realargs[5] = realargs[6] = 0;
|
||||
/* FALLTHROUGH */
|
||||
case SOCKSYS_SENDTO:
|
||||
return sys_sendto(p, realargs + 1, retval);
|
||||
return sys_sendto(l, realargs + 1, retval);
|
||||
case SOCKSYS_SETSOCKOPT:
|
||||
return sys_setsockopt(p, realargs + 1, retval);
|
||||
return sys_setsockopt(l, realargs + 1, retval);
|
||||
case SOCKSYS_SHUTDOWN:
|
||||
return sys_shutdown(p, realargs + 1, retval);
|
||||
return sys_shutdown(l, realargs + 1, retval);
|
||||
case SOCKSYS_SOCKET:
|
||||
return sys_socket(p, realargs + 1, retval);
|
||||
return sys_socket(l, realargs + 1, retval);
|
||||
case SOCKSYS_SELECT:
|
||||
return sys_select(p, realargs + 1, retval);
|
||||
return sys_select(l, realargs + 1, retval);
|
||||
case SOCKSYS_GETIPDOMAIN:
|
||||
return compat_09_sys_getdomainname(p, realargs + 1, retval);
|
||||
return compat_09_sys_getdomainname(l, realargs + 1, retval);
|
||||
case SOCKSYS_SETIPDOMAIN:
|
||||
return compat_09_sys_setdomainname(p, realargs + 1, retval);
|
||||
return compat_09_sys_setdomainname(l, realargs + 1, retval);
|
||||
case SOCKSYS_ADJTIME:
|
||||
return sys_adjtime(p, realargs + 1, retval);
|
||||
return sys_adjtime(l, realargs + 1, retval);
|
||||
case SOCKSYS_SETREUID:
|
||||
return sys_setreuid(p, realargs + 1, retval);
|
||||
return sys_setreuid(l, realargs + 1, retval);
|
||||
case SOCKSYS_SETREGID:
|
||||
return sys_setregid(p, realargs + 1, retval);
|
||||
return sys_setregid(l, realargs + 1, retval);
|
||||
case SOCKSYS_GETTIME:
|
||||
return sys_gettimeofday(p, realargs + 1, retval);
|
||||
return sys_gettimeofday(l, realargs + 1, retval);
|
||||
case SOCKSYS_SETTIME:
|
||||
return sys_settimeofday(p, realargs + 1, retval);
|
||||
return sys_settimeofday(l, realargs + 1, retval);
|
||||
case SOCKSYS_GETITIMER:
|
||||
return sys_getitimer(p, realargs + 1, retval);
|
||||
return sys_getitimer(l, realargs + 1, retval);
|
||||
case SOCKSYS_SETITIMER:
|
||||
return sys_setitimer(p, realargs + 1, retval);
|
||||
return sys_setitimer(l, realargs + 1, retval);
|
||||
|
||||
default:
|
||||
printf("socksys unknown %08x %08x %08x %08x %08x %08x %08x\n",
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: ibcs2_socksys.h,v 1.2 1996/05/03 17:05:30 christos Exp $ */
|
||||
/* $NetBSD: ibcs2_socksys.h,v 1.3 2003/01/18 07:40:45 thorpej Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1994, 1995 Scott Bartram
|
||||
|
@ -117,6 +117,6 @@ struct socknewproto {
|
|||
int flags;
|
||||
};
|
||||
|
||||
int ibcs2_socksys __P((struct proc *, void *, register_t *));
|
||||
int ibcs2_socksys __P((struct lwp *, void *, register_t *));
|
||||
|
||||
#endif /* _IBCS2_SOCKSYS_H */
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: ibcs2_stat.c,v 1.23 2002/08/08 00:15:32 itojun Exp $ */
|
||||
/* $NetBSD: ibcs2_stat.c,v 1.24 2003/01/18 07:40:46 thorpej Exp $ */
|
||||
/*
|
||||
* Copyright (c) 1995, 1998 Scott Bartram
|
||||
* All rights reserved.
|
||||
|
@ -27,7 +27,7 @@
|
|||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: ibcs2_stat.c,v 1.23 2002/08/08 00:15:32 itojun Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: ibcs2_stat.c,v 1.24 2003/01/18 07:40:46 thorpej Exp $");
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <sys/systm.h>
|
||||
|
@ -41,6 +41,7 @@ __KERNEL_RCSID(0, "$NetBSD: ibcs2_stat.c,v 1.23 2002/08/08 00:15:32 itojun Exp $
|
|||
#include <sys/mount.h>
|
||||
#include <sys/malloc.h>
|
||||
#include <sys/vnode.h>
|
||||
#include <sys/sa.h>
|
||||
#include <sys/syscallargs.h>
|
||||
|
||||
#include <compat/ibcs2/ibcs2_types.h>
|
||||
|
@ -135,8 +136,8 @@ cvt_statvfs(sp, buf, len)
|
|||
}
|
||||
|
||||
int
|
||||
ibcs2_sys_statfs(p, v, retval)
|
||||
struct proc *p;
|
||||
ibcs2_sys_statfs(l, v, retval)
|
||||
struct lwp *l;
|
||||
void *v;
|
||||
register_t *retval;
|
||||
{
|
||||
|
@ -146,6 +147,7 @@ ibcs2_sys_statfs(p, v, retval)
|
|||
syscallarg(int) len;
|
||||
syscallarg(int) fstype;
|
||||
} */ *uap = v;
|
||||
struct proc *p = l->l_proc;
|
||||
struct mount *mp;
|
||||
struct statfs *sp;
|
||||
int error;
|
||||
|
@ -166,8 +168,8 @@ ibcs2_sys_statfs(p, v, retval)
|
|||
}
|
||||
|
||||
int
|
||||
ibcs2_sys_fstatfs(p, v, retval)
|
||||
struct proc *p;
|
||||
ibcs2_sys_fstatfs(l, v, retval)
|
||||
struct lwp *l;
|
||||
void *v;
|
||||
register_t *retval;
|
||||
{
|
||||
|
@ -177,6 +179,7 @@ ibcs2_sys_fstatfs(p, v, retval)
|
|||
syscallarg(int) len;
|
||||
syscallarg(int) fstype;
|
||||
} */ *uap = v;
|
||||
struct proc *p = l->l_proc;
|
||||
struct file *fp;
|
||||
struct mount *mp;
|
||||
struct statfs *sp;
|
||||
|
@ -197,8 +200,8 @@ ibcs2_sys_fstatfs(p, v, retval)
|
|||
}
|
||||
|
||||
int
|
||||
ibcs2_sys_statvfs(p, v, retval)
|
||||
struct proc *p;
|
||||
ibcs2_sys_statvfs(l, v, retval)
|
||||
struct lwp *l;
|
||||
void *v;
|
||||
register_t *retval;
|
||||
{
|
||||
|
@ -206,6 +209,7 @@ ibcs2_sys_statvfs(p, v, retval)
|
|||
syscallarg(const char *) path;
|
||||
syscallarg(struct ibcs2_statvfs *) buf;
|
||||
} */ *uap = v;
|
||||
struct proc *p = l->l_proc;
|
||||
struct mount *mp;
|
||||
struct statfs *sp;
|
||||
int error;
|
||||
|
@ -227,8 +231,8 @@ ibcs2_sys_statvfs(p, v, retval)
|
|||
}
|
||||
|
||||
int
|
||||
ibcs2_sys_fstatvfs(p, v, retval)
|
||||
struct proc *p;
|
||||
ibcs2_sys_fstatvfs(l, v, retval)
|
||||
struct lwp *l;
|
||||
void *v;
|
||||
register_t *retval;
|
||||
{
|
||||
|
@ -236,6 +240,7 @@ ibcs2_sys_fstatvfs(p, v, retval)
|
|||
syscallarg(int) fd;
|
||||
syscallarg(struct ibcs2_statvfs *) buf;
|
||||
} */ *uap = v;
|
||||
struct proc *p = l->l_proc;
|
||||
struct file *fp;
|
||||
struct mount *mp;
|
||||
struct statfs *sp;
|
||||
|
@ -257,8 +262,8 @@ ibcs2_sys_fstatvfs(p, v, retval)
|
|||
}
|
||||
|
||||
int
|
||||
ibcs2_sys_stat(p, v, retval)
|
||||
struct proc *p;
|
||||
ibcs2_sys_stat(l, v, retval)
|
||||
struct lwp *l;
|
||||
void *v;
|
||||
register_t *retval;
|
||||
{
|
||||
|
@ -266,6 +271,7 @@ ibcs2_sys_stat(p, v, retval)
|
|||
syscallarg(const char *) path;
|
||||
syscallarg(struct ibcs2_stat *) st;
|
||||
} */ *uap = v;
|
||||
struct proc *p = l->l_proc;
|
||||
struct stat st;
|
||||
struct ibcs2_stat ibcs2_st;
|
||||
struct sys___stat13_args cup;
|
||||
|
@ -275,7 +281,7 @@ ibcs2_sys_stat(p, v, retval)
|
|||
CHECK_ALT_EXIST(p, &sg, SCARG(uap, path));
|
||||
SCARG(&cup, path) = SCARG(uap, path);
|
||||
|
||||
if ((error = sys___stat13(p, &cup, retval)) != 0)
|
||||
if ((error = sys___stat13(l, &cup, retval)) != 0)
|
||||
return error;
|
||||
if ((error = copyin(SCARG(&cup, ub), &st, sizeof(st))) != 0)
|
||||
return error;
|
||||
|
@ -285,8 +291,8 @@ ibcs2_sys_stat(p, v, retval)
|
|||
}
|
||||
|
||||
int
|
||||
ibcs2_sys_lstat(p, v, retval)
|
||||
struct proc *p;
|
||||
ibcs2_sys_lstat(l, v, retval)
|
||||
struct lwp *l;
|
||||
void *v;
|
||||
register_t *retval;
|
||||
{
|
||||
|
@ -294,6 +300,7 @@ ibcs2_sys_lstat(p, v, retval)
|
|||
syscallarg(const char *) path;
|
||||
syscallarg(struct ibcs2_stat *) st;
|
||||
} */ *uap = v;
|
||||
struct proc *p = l->l_proc;
|
||||
struct stat st;
|
||||
struct ibcs2_stat ibcs2_st;
|
||||
struct sys___lstat13_args cup;
|
||||
|
@ -304,7 +311,7 @@ ibcs2_sys_lstat(p, v, retval)
|
|||
CHECK_ALT_EXIST(p, &sg, SCARG(uap, path));
|
||||
SCARG(&cup, path) = SCARG(uap, path);
|
||||
|
||||
if ((error = sys___lstat13(p, &cup, retval)) != 0)
|
||||
if ((error = sys___lstat13(l, &cup, retval)) != 0)
|
||||
return error;
|
||||
if ((error = copyin(SCARG(&cup, ub), &st, sizeof(st))) != 0)
|
||||
return error;
|
||||
|
@ -314,8 +321,8 @@ ibcs2_sys_lstat(p, v, retval)
|
|||
}
|
||||
|
||||
int
|
||||
ibcs2_sys_fstat(p, v, retval)
|
||||
struct proc *p;
|
||||
ibcs2_sys_fstat(l, v, retval)
|
||||
struct lwp *l;
|
||||
void *v;
|
||||
register_t *retval;
|
||||
{
|
||||
|
@ -323,6 +330,7 @@ ibcs2_sys_fstat(p, v, retval)
|
|||
syscallarg(int) fd;
|
||||
syscallarg(struct ibcs2_stat *) st;
|
||||
} */ *uap = v;
|
||||
struct proc *p = l->l_proc;
|
||||
struct stat st;
|
||||
struct ibcs2_stat ibcs2_st;
|
||||
struct sys___fstat13_args cup;
|
||||
|
@ -331,7 +339,7 @@ ibcs2_sys_fstat(p, v, retval)
|
|||
|
||||
SCARG(&cup, fd) = SCARG(uap, fd);
|
||||
SCARG(&cup, sb) = stackgap_alloc(p, &sg, sizeof(st));
|
||||
if ((error = sys___fstat13(p, &cup, retval)) != 0)
|
||||
if ((error = sys___fstat13(l, &cup, retval)) != 0)
|
||||
return error;
|
||||
if ((error = copyin(SCARG(&cup, sb), &st, sizeof(st))) != 0)
|
||||
return error;
|
||||
|
@ -341,8 +349,8 @@ ibcs2_sys_fstat(p, v, retval)
|
|||
}
|
||||
|
||||
int
|
||||
ibcs2_sys_utssys(p, v, retval)
|
||||
struct proc *p;
|
||||
ibcs2_sys_utssys(l, v, retval)
|
||||
struct lwp *l;
|
||||
void *v;
|
||||
register_t *retval;
|
||||
{
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
$NetBSD: syscalls.master,v 1.26 2001/05/30 11:37:24 mrg Exp $
|
||||
$NetBSD: syscalls.master,v 1.27 2003/01/18 07:40:46 thorpej Exp $
|
||||
|
||||
; @(#)syscalls.master 8.1 (Berkeley) 7/19/93
|
||||
|
||||
|
@ -39,6 +39,7 @@
|
|||
#include <sys/systm.h>
|
||||
#include <sys/signal.h>
|
||||
#include <sys/mount.h>
|
||||
#include <sys/sa.h>
|
||||
#include <sys/syscallargs.h>
|
||||
#include <compat/ibcs2/ibcs2_types.h>
|
||||
#include <compat/ibcs2/ibcs2_signal.h>
|
||||
|
|
Loading…
Reference in New Issue