Move the "retval" (3rd) parameter from all syscall functions and put

it in struct proc instead.

This fixes a boatload of compiler warning, and removes a lot of cruft
from the sources.

I have not removed the /*ARGSUSED*/, they will require some looking at.

libkvm, ps and other userland struct proc frobbing programs will need
recompiled.
This commit is contained in:
Poul-Henning Kamp 1997-11-06 19:29:57 +00:00
parent c62a76ba79
commit cb226aaa62
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=30994
86 changed files with 1928 additions and 2299 deletions

View File

@ -25,7 +25,7 @@
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
* $Id: linux_dummy.c,v 1.6 1997/07/20 16:05:53 bde Exp $
* $Id: linux_dummy.c,v 1.7 1997/10/29 08:17:09 kato Exp $
*/
#include <sys/param.h>
@ -36,140 +36,140 @@
#include <i386/linux/linux_proto.h>
int
linux_setup(struct proc *p, struct linux_setup_args *args, int *retval)
linux_setup(struct proc *p, struct linux_setup_args *args)
{
printf("Linux-emul(%d): setup() not supported\n", p->p_pid);
return ENOSYS;
}
int
linux_break(struct proc *p, struct linux_break_args *args, int *retval)
linux_break(struct proc *p, struct linux_break_args *args)
{
printf("Linux-emul(%d): break() not supported\n", p->p_pid);
return ENOSYS;
}
int
linux_stat(struct proc *p, struct linux_stat_args *args, int *retval)
linux_stat(struct proc *p, struct linux_stat_args *args)
{
printf("Linux-emul(%d): stat() not supported\n", p->p_pid);
return ENOSYS;
}
int
linux_fstat(struct proc *p, struct linux_fstat_args *args, int *retval)
linux_fstat(struct proc *p, struct linux_fstat_args *args)
{
printf("Linux-emul(%d): fstat() not supported\n", p->p_pid);
return ENOSYS;
}
int
linux_mount(struct proc *p, struct linux_mount_args *args, int *retval)
linux_mount(struct proc *p, struct linux_mount_args *args)
{
printf("Linux-emul(%d): mount() not supported\n", p->p_pid);
return ENOSYS;
}
int
linux_umount(struct proc *p, struct linux_umount_args *args, int *retval)
linux_umount(struct proc *p, struct linux_umount_args *args)
{
printf("Linux-emul(%d): umount() not supported\n", p->p_pid);
return ENOSYS;
}
int
linux_stime(struct proc *p, struct linux_stime_args *args, int *retval)
linux_stime(struct proc *p, struct linux_stime_args *args)
{
printf("Linux-emul(%d): stime() not supported\n", p->p_pid);
return ENOSYS;
}
int
linux_ptrace(struct proc *p, struct linux_ptrace_args *args, int *retval)
linux_ptrace(struct proc *p, struct linux_ptrace_args *args)
{
printf("Linux-emul(%d): ptrace() not supported\n", p->p_pid);
return ENOSYS;
}
int
linux_stty(struct proc *p, struct linux_stty_args *args, int *retval)
linux_stty(struct proc *p, struct linux_stty_args *args)
{
printf("Linux-emul(%d): stty() not supported\n", p->p_pid);
return ENOSYS;
}
int
linux_gtty(struct proc *p, struct linux_gtty_args *args, int *retval)
linux_gtty(struct proc *p, struct linux_gtty_args *args)
{
printf("Linux-emul(%d): gtty() not supported\n", p->p_pid);
return ENOSYS;
}
int
linux_ftime(struct proc *p, struct linux_ftime_args *args, int *retval)
linux_ftime(struct proc *p, struct linux_ftime_args *args)
{
printf("Linux-emul(%d): ftime() not supported\n", p->p_pid);
return ENOSYS;
}
int
linux_prof(struct proc *p, struct linux_prof_args *args, int *retval)
linux_prof(struct proc *p, struct linux_prof_args *args)
{
printf("Linux-emul(%d): prof() not supported\n", p->p_pid);
return ENOSYS;
}
int
linux_phys(struct proc *p, struct linux_phys_args *args, int *retval)
linux_phys(struct proc *p, struct linux_phys_args *args)
{
printf("Linux-emul(%d): phys() not supported\n", p->p_pid);
return ENOSYS;
}
int
linux_lock(struct proc *p, struct linux_lock_args *args, int *retval)
linux_lock(struct proc *p, struct linux_lock_args *args)
{
printf("Linux-emul(%d): lock() not supported\n", p->p_pid);
return ENOSYS;
}
int
linux_mpx(struct proc *p, struct linux_mpx_args *args, int *retval)
linux_mpx(struct proc *p, struct linux_mpx_args *args)
{
printf("Linux-emul(%d): mpx() not supported\n", p->p_pid);
return ENOSYS;
}
int
linux_ulimit(struct proc *p, struct linux_ulimit_args *args, int *retval)
linux_ulimit(struct proc *p, struct linux_ulimit_args *args)
{
printf("Linux-emul(%d): ulimit() not supported\n", p->p_pid);
return ENOSYS;
}
int
linux_olduname(struct proc *p, struct linux_olduname_args *args, int *retval)
linux_olduname(struct proc *p, struct linux_olduname_args *args)
{
printf("Linux-emul(%d): olduname() not supported\n", p->p_pid);
return ENOSYS;
}
int
linux_ustat(struct proc *p, struct linux_ustat_args *args, int *retval)
linux_ustat(struct proc *p, struct linux_ustat_args *args)
{
printf("Linux-emul(%d): ustat() not supported\n", p->p_pid);
return ENOSYS;
}
int
linux_ioperm(struct proc *p, struct linux_ioperm_args *args, int *retval)
linux_ioperm(struct proc *p, struct linux_ioperm_args *args)
{
printf("Linux-emul(%d): ioperm() not supported\n", p->p_pid);
return 0; /* EINVAL SOS XXX */
}
int
linux_ksyslog(struct proc *p, struct linux_ksyslog_args *args, int *retval)
linux_ksyslog(struct proc *p, struct linux_ksyslog_args *args)
{
printf("Linux-emul(%d): ksyslog(%x) not supported\n",
p->p_pid, args->what);
@ -177,105 +177,105 @@ linux_ksyslog(struct proc *p, struct linux_ksyslog_args *args, int *retval)
}
int
linux_vhangup(struct proc *p, struct linux_vhangup_args *args, int *retval)
linux_vhangup(struct proc *p, struct linux_vhangup_args *args)
{
printf("Linux-emul(%d): vhangup() not supported\n", p->p_pid);
return ENOSYS;
}
int
linux_idle(struct proc *p, struct linux_idle_args *args, int *retval)
linux_idle(struct proc *p, struct linux_idle_args *args)
{
printf("Linux-emul(%d): idle() not supported\n", p->p_pid);
return ENOSYS;
}
int
linux_vm86(struct proc *p, struct linux_vm86_args *args, int *retval)
linux_vm86(struct proc *p, struct linux_vm86_args *args)
{
printf("Linux-emul(%d): vm86() not supported\n", p->p_pid);
return ENOSYS;
}
int
linux_swapoff(struct proc *p, struct linux_swapoff_args *args, int *retval)
linux_swapoff(struct proc *p, struct linux_swapoff_args *args)
{
printf("Linux-emul(%d): swapoff() not supported\n", p->p_pid);
return ENOSYS;
}
int
linux_sysinfo(struct proc *p, struct linux_sysinfo_args *args, int *retval)
linux_sysinfo(struct proc *p, struct linux_sysinfo_args *args)
{
printf("Linux-emul(%d): sysinfo() not supported\n", p->p_pid);
return ENOSYS;
}
int
linux_clone(struct proc *p, struct linux_clone_args *args, int *retval)
linux_clone(struct proc *p, struct linux_clone_args *args)
{
printf("Linux-emul(%d): clone() not supported\n", p->p_pid);
return ENOSYS;
}
int
linux_uname(struct proc *p, struct linux_uname_args *args, int *retval)
linux_uname(struct proc *p, struct linux_uname_args *args)
{
printf("Linux-emul(%d): uname() not supported\n", p->p_pid);
return ENOSYS;
}
int
linux_modify_ldt(struct proc *p, struct linux_modify_ldt_args *args, int *retval)
linux_modify_ldt(struct proc *p, struct linux_modify_ldt_args *args)
{
printf("Linux-emul(%d): modify_ldt() not supported\n", p->p_pid);
return ENOSYS;
}
int
linux_adjtimex(struct proc *p, struct linux_adjtimex_args *args, int *retval)
linux_adjtimex(struct proc *p, struct linux_adjtimex_args *args)
{
printf("Linux-emul(%d): adjtimex() not supported\n", p->p_pid);
return ENOSYS;
}
int
linux_create_module(struct proc *p, struct linux_create_module_args *args, int *retval)
linux_create_module(struct proc *p, struct linux_create_module_args *args)
{
printf("Linux-emul(%d): create_module() not supported\n", p->p_pid);
return ENOSYS;
}
int
linux_init_module(struct proc *p, struct linux_init_module_args *args, int *retval)
linux_init_module(struct proc *p, struct linux_init_module_args *args)
{
printf("Linux-emul(%d): init_module() not supported\n", p->p_pid);
return ENOSYS;
}
int
linux_delete_module(struct proc *p, struct linux_delete_module_args *args, int *retval)
linux_delete_module(struct proc *p, struct linux_delete_module_args *args)
{
printf("Linux-emul(%d): delete_module() not supported\n", p->p_pid);
return ENOSYS;
}
int
linux_get_kernel_syms(struct proc *p, struct linux_get_kernel_syms_args *args, int *retval)
linux_get_kernel_syms(struct proc *p, struct linux_get_kernel_syms_args *args)
{
printf("Linux-emul(%d): get_kernel_syms() not supported\n", p->p_pid);
return ENOSYS;
}
int
linux_quotactl(struct proc *p, struct linux_quotactl_args *args, int *retval)
linux_quotactl(struct proc *p, struct linux_quotactl_args *args)
{
printf("Linux-emul(%d): quotactl() not supported\n", p->p_pid);
return ENOSYS;
}
int
linux_bdflush(struct proc *p, struct linux_bdflush_args *args, int *retval)
linux_bdflush(struct proc *p, struct linux_bdflush_args *args)
{
printf("Linux-emul(%d): bdflush() not supported\n", p->p_pid);
return ENOSYS;

View File

@ -25,7 +25,7 @@
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
* $Id: linux_sysvec.c,v 1.18 1997/08/25 23:41:39 bde Exp $
* $Id: linux_sysvec.c,v 1.19 1997/09/01 02:12:39 bde Exp $
*/
/* XXX we use functions that might not exist. */
@ -268,10 +268,9 @@ linux_sendsig(sig_t catcher, int sig, int mask, u_long code)
* a machine fault.
*/
int
linux_sigreturn(p, args, retval)
linux_sigreturn(p, args)
struct proc *p;
struct linux_sigreturn_args *args;
int *retval;
{
struct linux_sigcontext *scp, context;
register struct trapframe *regs;

View File

@ -35,7 +35,7 @@
* SUCH DAMAGE.
*
* from: @(#)machdep.c 7.4 (Berkeley) 6/3/91
* $Id: machdep.c,v 1.268 1997/10/10 12:42:52 peter Exp $
* $Id: machdep.c,v 1.269 1997/10/12 20:23:17 phk Exp $
*/
#include "apm.h"
@ -595,12 +595,11 @@ sendsig(catcher, sig, mask, code)
* state to gain improper privileges.
*/
int
sigreturn(p, uap, retval)
sigreturn(p, uap)
struct proc *p;
struct sigreturn_args /* {
struct sigcontext *sigcntxp;
} */ *uap;
int *retval;
{
register struct sigcontext *scp;
register struct sigframe *fp;

View File

@ -31,7 +31,7 @@
* SUCH DAMAGE.
*
* from: @(#)sys_machdep.c 5.5 (Berkeley) 1/19/91
* $Id: sys_machdep.c,v 1.26 1997/10/10 09:44:08 peter Exp $
* $Id: sys_machdep.c,v 1.27 1997/10/10 12:42:54 peter Exp $
*
*/
@ -83,32 +83,31 @@ struct sysarch_args {
#endif
int
sysarch(p, uap, retval)
sysarch(p, uap)
struct proc *p;
register struct sysarch_args *uap;
int *retval;
{
int error = 0;
switch(uap->op) {
#ifdef USER_LDT
case I386_GET_LDT:
error = i386_get_ldt(p, uap->parms, retval);
error = i386_get_ldt(p, uap->parms, p->p_retval);
break;
case I386_SET_LDT:
error = i386_set_ldt(p, uap->parms, retval);
error = i386_set_ldt(p, uap->parms, p->p_retval);
break;
#endif
#ifdef VM86
case I386_GET_IOPERM:
error = i386_get_ioperm(p, uap->parms, retval);
error = i386_get_ioperm(p, uap->parms, p->p_retval);
break;
case I386_SET_IOPERM:
error = i386_set_ioperm(p, uap->parms, retval);
error = i386_set_ioperm(p, uap->parms, p->p_retval);
break;
case I386_VM86:
error = vm86_sysarch(p, uap->parms, retval);
error = vm86_sysarch(p, uap->parms, p->p_retval);
break;
#endif
default:

View File

@ -35,7 +35,7 @@
* SUCH DAMAGE.
*
* from: @(#)trap.c 7.4 (Berkeley) 5/13/91
* $Id: trap.c,v 1.112 1997/10/10 09:44:09 peter Exp $
* $Id: trap.c,v 1.113 1997/10/10 12:42:48 peter Exp $
*/
/*
@ -904,7 +904,7 @@ syscall(frame)
struct proc *p = curproc;
u_quad_t sticks;
int error;
int args[8], rval[2];
int args[8];
u_int code;
sticks = p->p_sticks;
@ -956,10 +956,10 @@ syscall(frame)
if (KTRPOINT(p, KTR_SYSCALL))
ktrsyscall(p->p_tracep, code, callp->sy_narg, args);
#endif
rval[0] = 0;
rval[1] = frame.tf_edx;
p->p_retval[0] = 0;
p->p_retval[1] = frame.tf_edx;
error = (*callp->sy_call)(p, args, rval);
error = (*callp->sy_call)(p, args);
switch (error) {
@ -969,8 +969,8 @@ syscall(frame)
* if this is a child returning from fork syscall.
*/
p = curproc;
frame.tf_eax = rval[0];
frame.tf_edx = rval[1];
frame.tf_eax = p->p_retval[0];
frame.tf_edx = p->p_retval[1];
frame.tf_eflags &= ~PSL_C;
break;
@ -1007,7 +1007,7 @@ syscall(frame)
#ifdef KTRACE
if (KTRPOINT(p, KTR_SYSRET))
ktrsysret(p->p_tracep, code, error, rval[0]);
ktrsysret(p->p_tracep, code, error, p->p_retval[0]);
#endif
}

View File

@ -25,7 +25,7 @@
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
* $Id: linux_file.c,v 1.13 1997/04/05 14:50:56 dfr Exp $
* $Id: linux_file.c,v 1.14 1997/04/06 10:10:50 dfr Exp $
*/
#include <sys/param.h>
@ -46,7 +46,7 @@
#include <i386/linux/linux_util.h>
int
linux_creat(struct proc *p, struct linux_creat_args *args, int *retval)
linux_creat(struct proc *p, struct linux_creat_args *args)
{
struct open_args /* {
char *path;
@ -65,11 +65,11 @@ linux_creat(struct proc *p, struct linux_creat_args *args, int *retval)
bsd_open_args.path = args->path;
bsd_open_args.mode = args->mode;
bsd_open_args.flags = O_WRONLY | O_CREAT | O_TRUNC;
return open(p, &bsd_open_args, retval);
return open(p, &bsd_open_args);
}
int
linux_open(struct proc *p, struct linux_open_args *args, int *retval)
linux_open(struct proc *p, struct linux_open_args *args)
{
struct open_args /* {
char *path;
@ -118,11 +118,11 @@ linux_open(struct proc *p, struct linux_open_args *args, int *retval)
bsd_open_args.path = args->path;
bsd_open_args.mode = args->mode;
error = open(p, &bsd_open_args, retval);
error = open(p, &bsd_open_args);
if (!error && !(bsd_open_args.flags & O_NOCTTY) &&
SESS_LEADER(p) && !(p->p_flag & P_CONTROLT)) {
struct filedesc *fdp = p->p_fd;
struct file *fp = fdp->fd_ofiles[*retval];
struct file *fp = fdp->fd_ofiles[p->p_retval[0]];
if (fp->f_type == DTYPE_VNODE)
(fp->f_ops->fo_ioctl)(fp, TIOCSCTTY, (caddr_t) 0, p);
@ -183,7 +183,7 @@ bsd_to_linux_flock(struct flock *bsd_flock, struct linux_flock *linux_flock)
}
int
linux_fcntl(struct proc *p, struct linux_fcntl_args *args, int *retval)
linux_fcntl(struct proc *p, struct linux_fcntl_args *args)
{
int error, result;
struct fcntl_args /* {
@ -216,26 +216,27 @@ linux_fcntl(struct proc *p, struct linux_fcntl_args *args, int *retval)
switch (args->cmd) {
case LINUX_F_DUPFD:
fcntl_args.cmd = F_DUPFD;
return fcntl(p, &fcntl_args, retval);
return fcntl(p, &fcntl_args);
case LINUX_F_GETFD:
fcntl_args.cmd = F_GETFD;
return fcntl(p, &fcntl_args, retval);
return fcntl(p, &fcntl_args);
case LINUX_F_SETFD:
fcntl_args.cmd = F_SETFD;
return fcntl(p, &fcntl_args, retval);
return fcntl(p, &fcntl_args);
case LINUX_F_GETFL:
fcntl_args.cmd = F_GETFL;
error = fcntl(p, &fcntl_args, &result);
*retval = 0;
if (result & O_RDONLY) *retval |= LINUX_O_RDONLY;
if (result & O_WRONLY) *retval |= LINUX_O_WRONLY;
if (result & O_RDWR) *retval |= LINUX_O_RDWR;
if (result & O_NDELAY) *retval |= LINUX_O_NONBLOCK;
if (result & O_APPEND) *retval |= LINUX_O_APPEND;
if (result & O_FSYNC) *retval |= LINUX_O_SYNC;
error = fcntl(p, &fcntl_args);
result = p->p_retval[0];
p->p_retval[0] = 0;
if (result & O_RDONLY) p->p_retval[0] |= LINUX_O_RDONLY;
if (result & O_WRONLY) p->p_retval[0] |= LINUX_O_WRONLY;
if (result & O_RDWR) p->p_retval[0] |= LINUX_O_RDWR;
if (result & O_NDELAY) p->p_retval[0] |= LINUX_O_NONBLOCK;
if (result & O_APPEND) p->p_retval[0] |= LINUX_O_APPEND;
if (result & O_FSYNC) p->p_retval[0] |= LINUX_O_SYNC;
return error;
case LINUX_F_SETFL:
@ -243,7 +244,7 @@ linux_fcntl(struct proc *p, struct linux_fcntl_args *args, int *retval)
if (args->arg & LINUX_O_APPEND) fcntl_args.arg |= O_APPEND;
if (args->arg & LINUX_O_SYNC) fcntl_args.arg |= O_FSYNC;
fcntl_args.cmd = F_SETFL;
return fcntl(p, &fcntl_args, retval);
return fcntl(p, &fcntl_args);
case LINUX_F_GETLK:
if ((error = copyin((caddr_t)args->arg, (caddr_t)&linux_flock,
@ -252,7 +253,7 @@ linux_fcntl(struct proc *p, struct linux_fcntl_args *args, int *retval)
linux_to_bsd_flock(&linux_flock, bsd_flock);
fcntl_args.cmd = F_GETLK;
fcntl_args.arg = (int)bsd_flock;
if (error = fcntl(p, &fcntl_args, retval))
if (error = fcntl(p, &fcntl_args))
return error;
bsd_to_linux_flock(bsd_flock, &linux_flock);
return copyout((caddr_t)&linux_flock, (caddr_t)args->arg,
@ -265,7 +266,7 @@ linux_fcntl(struct proc *p, struct linux_fcntl_args *args, int *retval)
linux_to_bsd_flock(&linux_flock, bsd_flock);
fcntl_args.cmd = F_SETLK;
fcntl_args.arg = (int)bsd_flock;
return fcntl(p, &fcntl_args, retval);
return fcntl(p, &fcntl_args);
case LINUX_F_SETLKW:
if ((error = copyin((caddr_t)args->arg, (caddr_t)&linux_flock,
@ -274,7 +275,7 @@ linux_fcntl(struct proc *p, struct linux_fcntl_args *args, int *retval)
linux_to_bsd_flock(&linux_flock, bsd_flock);
fcntl_args.cmd = F_SETLKW;
fcntl_args.arg = (int)bsd_flock;
return fcntl(p, &fcntl_args, retval);
return fcntl(p, &fcntl_args);
case LINUX_F_SETOWN:
case LINUX_F_GETOWN:
@ -290,7 +291,7 @@ linux_fcntl(struct proc *p, struct linux_fcntl_args *args, int *retval)
return EBADF;
if (fp->f_type == DTYPE_SOCKET) {
fcntl_args.cmd = args->cmd == LINUX_F_SETOWN ? F_SETOWN : F_GETOWN;
return fcntl(p, &fcntl_args, retval);
return fcntl(p, &fcntl_args);
}
vp = (struct vnode *)fp->f_data;
if (vp->v_type != VCHR)
@ -302,7 +303,7 @@ linux_fcntl(struct proc *p, struct linux_fcntl_args *args, int *retval)
if (!d_tty || (!(tp = (*d_tty)(va.va_rdev))))
return EINVAL;
if (args->cmd == LINUX_F_GETOWN) {
retval[0] = tp->t_pgrp ? tp->t_pgrp->pg_id : NO_PID;
p->p_retval[0] = tp->t_pgrp ? tp->t_pgrp->pg_id : NO_PID;
return 0;
}
if ((long)args->arg <= 0) {
@ -323,7 +324,7 @@ linux_fcntl(struct proc *p, struct linux_fcntl_args *args, int *retval)
}
int
linux_lseek(struct proc *p, struct linux_lseek_args *args, int *retval)
linux_lseek(struct proc *p, struct linux_lseek_args *args)
{
struct lseek_args /* {
@ -341,12 +342,12 @@ linux_lseek(struct proc *p, struct linux_lseek_args *args, int *retval)
tmp_args.fd = args->fdes;
tmp_args.offset = (off_t)args->off;
tmp_args.whence = args->whence;
error = lseek(p, &tmp_args, retval);
error = lseek(p, &tmp_args);
return error;
}
int
linux_llseek(struct proc *p, struct linux_llseek_args *args, int *retval)
linux_llseek(struct proc *p, struct linux_llseek_args *args)
{
struct lseek_args bsd_args;
int error;
@ -362,13 +363,13 @@ linux_llseek(struct proc *p, struct linux_llseek_args *args, int *retval)
bsd_args.offset = off;
bsd_args.whence = args->whence;
if ((error = lseek(p, &bsd_args, retval)))
if ((error = lseek(p, &bsd_args)))
return error;
if ((error = copyout(retval, (caddr_t)args->res, sizeof (off_t))))
if ((error = copyout(p->p_retval, (caddr_t)args->res, sizeof (off_t))))
return error;
retval[0] = 0;
p->p_retval[0] = 0;
return 0;
}
@ -384,18 +385,18 @@ struct linux_dirent {
ALIGN((((char *)&(de)->dname - (char *)de) + (namlen) + 1))
int
linux_readdir(struct proc *p, struct linux_readdir_args *args, int *retval)
linux_readdir(struct proc *p, struct linux_readdir_args *args)
{
struct linux_getdents_args lda;
lda.fd = args->fd;
lda.dent = args->dent;
lda.count = 1;
return linux_getdents(p, &lda, retval);
return linux_getdents(p, &lda);
}
int
linux_getdents(struct proc *p, struct linux_getdents_args *args, int *retval)
linux_getdents(struct proc *p, struct linux_getdents_args *args)
{
register struct dirent *bdp;
struct vnode *vp;
@ -556,7 +557,7 @@ linux_getdents(struct proc *p, struct linux_getdents_args *args, int *retval)
nbytes = resid + linuxreclen;
eof:
*retval = nbytes - resid;
p->p_retval[0] = nbytes - resid;
out:
if (cookies)
free(cookies, M_TEMP);
@ -570,7 +571,7 @@ linux_getdents(struct proc *p, struct linux_getdents_args *args, int *retval)
*/
int
linux_access(struct proc *p, struct linux_access_args *args, int *retval)
linux_access(struct proc *p, struct linux_access_args *args)
{
struct access_args bsd;
caddr_t sg;
@ -585,11 +586,11 @@ linux_access(struct proc *p, struct linux_access_args *args, int *retval)
bsd.path = args->path;
bsd.flags = args->flags;
return access(p, &bsd, retval);
return access(p, &bsd);
}
int
linux_unlink(struct proc *p, struct linux_unlink_args *args, int *retval)
linux_unlink(struct proc *p, struct linux_unlink_args *args)
{
struct unlink_args bsd;
caddr_t sg;
@ -603,11 +604,11 @@ linux_unlink(struct proc *p, struct linux_unlink_args *args, int *retval)
#endif
bsd.path = args->path;
return unlink(p, &bsd, retval);
return unlink(p, &bsd);
}
int
linux_chdir(struct proc *p, struct linux_chdir_args *args, int *retval)
linux_chdir(struct proc *p, struct linux_chdir_args *args)
{
struct chdir_args bsd;
caddr_t sg;
@ -621,11 +622,11 @@ linux_chdir(struct proc *p, struct linux_chdir_args *args, int *retval)
#endif
bsd.path = args->path;
return chdir(p, &bsd, retval);
return chdir(p, &bsd);
}
int
linux_chmod(struct proc *p, struct linux_chmod_args *args, int *retval)
linux_chmod(struct proc *p, struct linux_chmod_args *args)
{
struct chmod_args bsd;
caddr_t sg;
@ -640,11 +641,11 @@ linux_chmod(struct proc *p, struct linux_chmod_args *args, int *retval)
bsd.path = args->path;
bsd.mode = args->mode;
return chmod(p, &bsd, retval);
return chmod(p, &bsd);
}
int
linux_chown(struct proc *p, struct linux_chown_args *args, int *retval)
linux_chown(struct proc *p, struct linux_chown_args *args)
{
struct chown_args bsd;
caddr_t sg;
@ -661,11 +662,11 @@ linux_chown(struct proc *p, struct linux_chown_args *args, int *retval)
bsd.uid = args->uid;
bsd.gid = args->gid;
return chown(p, &bsd, retval);
return chown(p, &bsd);
}
int
linux_mkdir(struct proc *p, struct linux_mkdir_args *args, int *retval)
linux_mkdir(struct proc *p, struct linux_mkdir_args *args)
{
struct mkdir_args bsd;
caddr_t sg;
@ -680,11 +681,11 @@ linux_mkdir(struct proc *p, struct linux_mkdir_args *args, int *retval)
bsd.path = args->path;
bsd.mode = args->mode;
return mkdir(p, &bsd, retval);
return mkdir(p, &bsd);
}
int
linux_rmdir(struct proc *p, struct linux_rmdir_args *args, int *retval)
linux_rmdir(struct proc *p, struct linux_rmdir_args *args)
{
struct rmdir_args bsd;
caddr_t sg;
@ -698,11 +699,11 @@ linux_rmdir(struct proc *p, struct linux_rmdir_args *args, int *retval)
#endif
bsd.path = args->path;
return rmdir(p, &bsd, retval);
return rmdir(p, &bsd);
}
int
linux_rename(struct proc *p, struct linux_rename_args *args, int *retval)
linux_rename(struct proc *p, struct linux_rename_args *args)
{
struct rename_args bsd;
caddr_t sg;
@ -718,11 +719,11 @@ linux_rename(struct proc *p, struct linux_rename_args *args, int *retval)
bsd.from = args->from;
bsd.to = args->to;
return rename(p, &bsd, retval);
return rename(p, &bsd);
}
int
linux_symlink(struct proc *p, struct linux_symlink_args *args, int *retval)
linux_symlink(struct proc *p, struct linux_symlink_args *args)
{
struct symlink_args bsd;
caddr_t sg;
@ -738,11 +739,11 @@ linux_symlink(struct proc *p, struct linux_symlink_args *args, int *retval)
bsd.path = args->path;
bsd.link = args->to;
return symlink(p, &bsd, retval);
return symlink(p, &bsd);
}
int
linux_execve(struct proc *p, struct linux_execve_args *args, int *retval)
linux_execve(struct proc *p, struct linux_execve_args *args)
{
struct execve_args bsd;
caddr_t sg;
@ -758,11 +759,11 @@ linux_execve(struct proc *p, struct linux_execve_args *args, int *retval)
bsd.argv = args->argp;
bsd.envv = args->envp;
return execve(p, &bsd, retval);
return execve(p, &bsd);
}
int
linux_readlink(struct proc *p, struct linux_readlink_args *args, int *retval)
linux_readlink(struct proc *p, struct linux_readlink_args *args)
{
struct readlink_args bsd;
caddr_t sg;
@ -778,11 +779,11 @@ linux_readlink(struct proc *p, struct linux_readlink_args *args, int *retval)
bsd.buf = args->buf;
bsd.count = args->count;
return readlink(p, &bsd, retval);
return readlink(p, &bsd);
}
int
linux_truncate(struct proc *p, struct linux_truncate_args *args, int *retval)
linux_truncate(struct proc *p, struct linux_truncate_args *args)
{
struct otruncate_args bsd;
caddr_t sg;
@ -796,6 +797,6 @@ linux_truncate(struct proc *p, struct linux_truncate_args *args, int *retval)
#endif
bsd.path = args->path;
return otruncate(p, &bsd, retval);
return otruncate(p, &bsd);
}

View File

@ -25,7 +25,7 @@
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
* $Id: linux_ioctl.c,v 1.19 1997/06/02 10:43:41 dfr Exp $
* $Id: linux_ioctl.c,v 1.20 1997/07/20 16:05:59 bde Exp $
*/
#include <sys/param.h>
@ -447,7 +447,7 @@ linux_tiocsserial(struct file *fp, struct linux_serial_struct *lss)
}
int
linux_ioctl(struct proc *p, struct linux_ioctl_args *args, int *retval)
linux_ioctl(struct proc *p, struct linux_ioctl_args *args)
{
struct termios bsd_termios;
struct linux_termios linux_termios;
@ -513,79 +513,79 @@ linux_ioctl(struct proc *p, struct linux_ioctl_args *args, int *retval)
case LINUX_TIOCGPGRP:
args->cmd = TIOCGPGRP;
return ioctl(p, (struct ioctl_args *)args, retval);
return ioctl(p, (struct ioctl_args *)args);
case LINUX_TIOCSPGRP:
args->cmd = TIOCSPGRP;
return ioctl(p, (struct ioctl_args *)args, retval);
return ioctl(p, (struct ioctl_args *)args);
case LINUX_TIOCGWINSZ:
args->cmd = TIOCGWINSZ;
return ioctl(p, (struct ioctl_args *)args, retval);
return ioctl(p, (struct ioctl_args *)args);
case LINUX_TIOCSWINSZ:
args->cmd = TIOCSWINSZ;
return ioctl(p, (struct ioctl_args *)args, retval);
return ioctl(p, (struct ioctl_args *)args);
case LINUX_FIONREAD:
args->cmd = FIONREAD;
return ioctl(p, (struct ioctl_args *)args, retval);
return ioctl(p, (struct ioctl_args *)args);
case LINUX_FIONBIO:
args->cmd = FIONBIO;
return ioctl(p, (struct ioctl_args *)args, retval);
return ioctl(p, (struct ioctl_args *)args);
case LINUX_FIOASYNC:
args->cmd = FIOASYNC;
return ioctl(p, (struct ioctl_args *)args, retval);
return ioctl(p, (struct ioctl_args *)args);
case LINUX_FIONCLEX:
args->cmd = FIONCLEX;
return ioctl(p, (struct ioctl_args *)args, retval);
return ioctl(p, (struct ioctl_args *)args);
case LINUX_FIOCLEX:
args->cmd = FIOCLEX;
return ioctl(p, (struct ioctl_args *)args, retval);
return ioctl(p, (struct ioctl_args *)args);
case LINUX_TIOCEXCL:
args->cmd = TIOCEXCL;
return ioctl(p, (struct ioctl_args *)args, retval);
return ioctl(p, (struct ioctl_args *)args);
case LINUX_TIOCNXCL:
args->cmd = TIOCNXCL;
return ioctl(p, (struct ioctl_args *)args, retval);
return ioctl(p, (struct ioctl_args *)args);
case LINUX_TIOCCONS:
args->cmd = TIOCCONS;
return ioctl(p, (struct ioctl_args *)args, retval);
return ioctl(p, (struct ioctl_args *)args);
case LINUX_TIOCNOTTY:
args->cmd = TIOCNOTTY;
return ioctl(p, (struct ioctl_args *)args, retval);
return ioctl(p, (struct ioctl_args *)args);
case LINUX_SIOCGIFCONF:
args->cmd = OSIOCGIFCONF;
return ioctl(p, (struct ioctl_args *)args, retval);
return ioctl(p, (struct ioctl_args *)args);
case LINUX_SIOCGIFFLAGS:
args->cmd = SIOCGIFFLAGS;
return ioctl(p, (struct ioctl_args *)args, retval);
return ioctl(p, (struct ioctl_args *)args);
case LINUX_SIOCGIFADDR:
args->cmd = OSIOCGIFADDR;
return ioctl(p, (struct ioctl_args *)args, retval);
return ioctl(p, (struct ioctl_args *)args);
case LINUX_SIOCGIFDSTADDR:
args->cmd = OSIOCGIFDSTADDR;
return ioctl(p, (struct ioctl_args *)args, retval);
return ioctl(p, (struct ioctl_args *)args);
case LINUX_SIOCGIFBRDADDR:
args->cmd = OSIOCGIFBRDADDR;
return ioctl(p, (struct ioctl_args *)args, retval);
return ioctl(p, (struct ioctl_args *)args);
case LINUX_SIOCGIFNETMASK:
args->cmd = OSIOCGIFNETMASK;
return ioctl(p, (struct ioctl_args *)args, retval);
return ioctl(p, (struct ioctl_args *)args);
/* get hardware address */
case LINUX_SIOCGIFHWADDR:
@ -621,11 +621,11 @@ linux_ioctl(struct proc *p, struct linux_ioctl_args *args, int *retval)
case LINUX_SIOCADDMULTI:
args->cmd = SIOCADDMULTI;
return ioctl(p, (struct ioctl_args *)args, retval);
return ioctl(p, (struct ioctl_args *)args);
case LINUX_SIOCDELMULTI:
args->cmd = SIOCDELMULTI;
return ioctl(p, (struct ioctl_args *)args, retval);
return ioctl(p, (struct ioctl_args *)args);
case LINUX_TIOCSETD:
switch (args->arg) {
@ -664,136 +664,136 @@ linux_ioctl(struct proc *p, struct linux_ioctl_args *args, int *retval)
case LINUX_SNDCTL_DSP_RESET:
args->cmd = SNDCTL_DSP_RESET;
return ioctl(p, (struct ioctl_args *)args, retval);
return ioctl(p, (struct ioctl_args *)args);
case LINUX_SNDCTL_DSP_SYNC:
args->cmd = SNDCTL_DSP_SYNC;
return ioctl(p, (struct ioctl_args *)args, retval);
return ioctl(p, (struct ioctl_args *)args);
case LINUX_SNDCTL_DSP_SPEED:
args->cmd = SNDCTL_DSP_SPEED;
return ioctl(p, (struct ioctl_args *)args, retval);
return ioctl(p, (struct ioctl_args *)args);
case LINUX_SNDCTL_DSP_STEREO:
args->cmd = SNDCTL_DSP_STEREO;
return ioctl(p, (struct ioctl_args *)args, retval);
return ioctl(p, (struct ioctl_args *)args);
case LINUX_SNDCTL_DSP_GETBLKSIZE:
/* LINUX_SNDCTL_DSP_SETBLKSIZE */
args->cmd = SNDCTL_DSP_GETBLKSIZE;
return ioctl(p, (struct ioctl_args *)args, retval);
return ioctl(p, (struct ioctl_args *)args);
case LINUX_SNDCTL_DSP_SETFMT:
args->cmd = SNDCTL_DSP_SETFMT;
return ioctl(p, (struct ioctl_args *)args, retval);
return ioctl(p, (struct ioctl_args *)args);
case LINUX_SOUND_PCM_WRITE_CHANNELS:
args->cmd = SOUND_PCM_WRITE_CHANNELS;
return ioctl(p, (struct ioctl_args *)args, retval);
return ioctl(p, (struct ioctl_args *)args);
case LINUX_SOUND_PCM_WRITE_FILTER:
args->cmd = SOUND_PCM_WRITE_FILTER;
return ioctl(p, (struct ioctl_args *)args, retval);
return ioctl(p, (struct ioctl_args *)args);
case LINUX_SNDCTL_DSP_POST:
args->cmd = SNDCTL_DSP_POST;
return ioctl(p, (struct ioctl_args *)args, retval);
return ioctl(p, (struct ioctl_args *)args);
case LINUX_SNDCTL_DSP_SUBDIVIDE:
args->cmd = SNDCTL_DSP_SUBDIVIDE;
return ioctl(p, (struct ioctl_args *)args, retval);
return ioctl(p, (struct ioctl_args *)args);
case LINUX_SNDCTL_DSP_SETFRAGMENT:
args->cmd = SNDCTL_DSP_SETFRAGMENT;
return ioctl(p, (struct ioctl_args *)args, retval);
return ioctl(p, (struct ioctl_args *)args);
case LINUX_SNDCTL_DSP_GETFMTS:
args->cmd = SNDCTL_DSP_GETFMTS;
return ioctl(p, (struct ioctl_args *)args, retval);
return ioctl(p, (struct ioctl_args *)args);
case LINUX_SNDCTL_DSP_GETOSPACE:
args->cmd = SNDCTL_DSP_GETOSPACE;
return ioctl(p, (struct ioctl_args *)args, retval);
return ioctl(p, (struct ioctl_args *)args);
case LINUX_SNDCTL_DSP_GETISPACE:
args->cmd = SNDCTL_DSP_GETISPACE;
return ioctl(p, (struct ioctl_args *)args, retval);
return ioctl(p, (struct ioctl_args *)args);
case LINUX_SNDCTL_DSP_NONBLOCK:
args->cmd = SNDCTL_DSP_NONBLOCK;
return ioctl(p, (struct ioctl_args *)args, retval);
return ioctl(p, (struct ioctl_args *)args);
case LINUX_SOUND_MIXER_WRITE_VOLUME:
args->cmd = SOUND_MIXER_WRITE_VOLUME;
return ioctl(p, (struct ioctl_args *)args, retval);
return ioctl(p, (struct ioctl_args *)args);
case LINUX_SOUND_MIXER_WRITE_BASS:
args->cmd = SOUND_MIXER_WRITE_BASS;
return ioctl(p, (struct ioctl_args *)args, retval);
return ioctl(p, (struct ioctl_args *)args);
case LINUX_SOUND_MIXER_WRITE_TREBLE:
args->cmd = SOUND_MIXER_WRITE_TREBLE;
return ioctl(p, (struct ioctl_args *)args, retval);
return ioctl(p, (struct ioctl_args *)args);
case LINUX_SOUND_MIXER_WRITE_SYNTH:
args->cmd = SOUND_MIXER_WRITE_SYNTH;
return ioctl(p, (struct ioctl_args *)args, retval);
return ioctl(p, (struct ioctl_args *)args);
case LINUX_SOUND_MIXER_WRITE_PCM:
args->cmd = SOUND_MIXER_WRITE_PCM;
return ioctl(p, (struct ioctl_args *)args, retval);
return ioctl(p, (struct ioctl_args *)args);
case LINUX_SOUND_MIXER_WRITE_SPEAKER:
args->cmd = SOUND_MIXER_WRITE_SPEAKER;
return ioctl(p, (struct ioctl_args *)args, retval);
return ioctl(p, (struct ioctl_args *)args);
case LINUX_SOUND_MIXER_WRITE_LINE:
args->cmd = SOUND_MIXER_WRITE_LINE;
return ioctl(p, (struct ioctl_args *)args, retval);
return ioctl(p, (struct ioctl_args *)args);
case LINUX_SOUND_MIXER_WRITE_MIC:
args->cmd = SOUND_MIXER_WRITE_MIC;
return ioctl(p, (struct ioctl_args *)args, retval);
return ioctl(p, (struct ioctl_args *)args);
case LINUX_SOUND_MIXER_WRITE_CD:
args->cmd = SOUND_MIXER_WRITE_CD;
return ioctl(p, (struct ioctl_args *)args, retval);
return ioctl(p, (struct ioctl_args *)args);
case LINUX_SOUND_MIXER_WRITE_IMIX:
args->cmd = SOUND_MIXER_WRITE_IMIX;
return ioctl(p, (struct ioctl_args *)args, retval);
return ioctl(p, (struct ioctl_args *)args);
case LINUX_SOUND_MIXER_WRITE_ALTPCM:
args->cmd = SOUND_MIXER_WRITE_ALTPCM;
return ioctl(p, (struct ioctl_args *)args, retval);
return ioctl(p, (struct ioctl_args *)args);
case LINUX_SOUND_MIXER_WRITE_RECLEV:
args->cmd = SOUND_MIXER_WRITE_RECLEV;
return ioctl(p, (struct ioctl_args *)args, retval);
return ioctl(p, (struct ioctl_args *)args);
case LINUX_SOUND_MIXER_WRITE_IGAIN:
args->cmd = SOUND_MIXER_WRITE_IGAIN;
return ioctl(p, (struct ioctl_args *)args, retval);
return ioctl(p, (struct ioctl_args *)args);
case LINUX_SOUND_MIXER_WRITE_OGAIN:
args->cmd = SOUND_MIXER_WRITE_OGAIN;
return ioctl(p, (struct ioctl_args *)args, retval);
return ioctl(p, (struct ioctl_args *)args);
case LINUX_SOUND_MIXER_WRITE_LINE1:
args->cmd = SOUND_MIXER_WRITE_LINE1;
return ioctl(p, (struct ioctl_args *)args, retval);
return ioctl(p, (struct ioctl_args *)args);
case LINUX_SOUND_MIXER_WRITE_LINE2:
args->cmd = SOUND_MIXER_WRITE_LINE2;
return ioctl(p, (struct ioctl_args *)args, retval);
return ioctl(p, (struct ioctl_args *)args);
case LINUX_SOUND_MIXER_WRITE_LINE3:
args->cmd = SOUND_MIXER_WRITE_LINE3;
return ioctl(p, (struct ioctl_args *)args, retval);
return ioctl(p, (struct ioctl_args *)args);
case LINUX_SOUND_MIXER_READ_DEVMASK:
args->cmd = SOUND_MIXER_READ_DEVMASK;
return ioctl(p, (struct ioctl_args *)args, retval);
return ioctl(p, (struct ioctl_args *)args);
case LINUX_TIOCGSERIAL:
linux_tiocgserial(fp, (struct linux_serial_struct *)args->arg);
@ -818,7 +818,7 @@ linux_ioctl(struct proc *p, struct linux_ioctl_args *args, int *retval)
default:
return EINVAL;
}
return ioctl(p, (struct ioctl_args *)args, retval);
return ioctl(p, (struct ioctl_args *)args);
}
uprintf("LINUX: 'ioctl' fd=%d, typ=0x%x(%c), num=0x%x not implemented\n",

View File

@ -25,7 +25,7 @@
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
* $Id: linux_ipc.c,v 1.11 1997/08/10 18:15:20 sos Exp $
* $Id: linux_ipc.c,v 1.12 1997/10/28 10:50:02 kato Exp $
*/
@ -40,16 +40,16 @@
#include <i386/linux/linux_proto.h>
#include <i386/linux/linux_util.h>
static int linux_semop __P((struct proc *, struct linux_ipc_args *, int *));
static int linux_semget __P((struct proc *, struct linux_ipc_args *, int *));
static int linux_semctl __P((struct proc *, struct linux_ipc_args *, int *));
static int linux_msgsnd __P((struct proc *, struct linux_ipc_args *, int *));
static int linux_msgrcv __P((struct proc *, struct linux_ipc_args *, int *));
static int linux_msgctl __P((struct proc *, struct linux_ipc_args *, int *));
static int linux_shmat __P((struct proc *, struct linux_ipc_args *, int *));
static int linux_shmdt __P((struct proc *, struct linux_ipc_args *, int *));
static int linux_shmget __P((struct proc *, struct linux_ipc_args *, int *));
static int linux_shmctl __P((struct proc *, struct linux_ipc_args *, int *));
static int linux_semop __P((struct proc *, struct linux_ipc_args *));
static int linux_semget __P((struct proc *, struct linux_ipc_args *));
static int linux_semctl __P((struct proc *, struct linux_ipc_args *));
static int linux_msgsnd __P((struct proc *, struct linux_ipc_args *));
static int linux_msgrcv __P((struct proc *, struct linux_ipc_args *));
static int linux_msgctl __P((struct proc *, struct linux_ipc_args *));
static int linux_shmat __P((struct proc *, struct linux_ipc_args *));
static int linux_shmdt __P((struct proc *, struct linux_ipc_args *));
static int linux_shmget __P((struct proc *, struct linux_ipc_args *));
static int linux_shmctl __P((struct proc *, struct linux_ipc_args *));
struct linux_ipc_perm {
linux_key_t key;
@ -160,7 +160,7 @@ bsd_to_linux_shmid_ds(struct shmid_ds *bsp, struct linux_shmid_ds *lsp)
}
static int
linux_semop(struct proc *p, struct linux_ipc_args *args, int *retval)
linux_semop(struct proc *p, struct linux_ipc_args *args)
{
struct semop_args /* {
int semid;
@ -171,11 +171,11 @@ linux_semop(struct proc *p, struct linux_ipc_args *args, int *retval)
bsd_args.semid = args->arg1;
bsd_args.sops = (struct sembuf *)args->ptr;
bsd_args.nsops = args->arg2;
return semop(p, &bsd_args, retval);
return semop(p, &bsd_args);
}
static int
linux_semget(struct proc *p, struct linux_ipc_args *args, int *retval)
linux_semget(struct proc *p, struct linux_ipc_args *args)
{
struct semget_args /* {
key_t key;
@ -186,11 +186,11 @@ linux_semget(struct proc *p, struct linux_ipc_args *args, int *retval)
bsd_args.key = args->arg1;
bsd_args.nsems = args->arg2;
bsd_args.semflg = args->arg3;
return semget(p, &bsd_args, retval);
return semget(p, &bsd_args);
}
static int
linux_semctl(struct proc *p, struct linux_ipc_args *args, int *retval)
linux_semctl(struct proc *p, struct linux_ipc_args *args)
{
struct linux_semid_ds linux_semid;
struct semid_ds bsd_semid;
@ -246,7 +246,7 @@ linux_semctl(struct proc *p, struct linux_ipc_args *args, int *retval)
if (error)
return error;
bsd_args.arg = (union semun *)unptr;
return __semctl(p, &bsd_args, retval);
return __semctl(p, &bsd_args);
case LINUX_IPC_STAT:
bsd_args.cmd = IPC_STAT;
unptr = stackgap_alloc(&sg, sizeof(union semun *));
@ -255,7 +255,7 @@ linux_semctl(struct proc *p, struct linux_ipc_args *args, int *retval)
if (error)
return error;
bsd_args.arg = (union semun *)unptr;
error = __semctl(p, &bsd_args, retval);
error = __semctl(p, &bsd_args);
if (error)
return error;
error = copyin(dsp, (caddr_t)&bsd_semid, sizeof(bsd_semid));
@ -274,11 +274,11 @@ linux_semctl(struct proc *p, struct linux_ipc_args *args, int *retval)
uprintf("LINUX: 'ipc' typ=%d not implemented\n", args->what);
return EINVAL;
}
return __semctl(p, &bsd_args, retval);
return __semctl(p, &bsd_args);
}
static int
linux_msgsnd(struct proc *p, struct linux_ipc_args *args, int *retval)
linux_msgsnd(struct proc *p, struct linux_ipc_args *args)
{
struct msgsnd_args /* {
int msqid;
@ -291,11 +291,11 @@ linux_msgsnd(struct proc *p, struct linux_ipc_args *args, int *retval)
bsd_args.msgp = args->ptr;
bsd_args.msgsz = args->arg2;
bsd_args.msgflg = args->arg3;
return msgsnd(p, &bsd_args, retval);
return msgsnd(p, &bsd_args);
}
static int
linux_msgrcv(struct proc *p, struct linux_ipc_args *args, int *retval)
linux_msgrcv(struct proc *p, struct linux_ipc_args *args)
{
struct msgrcv_args /* {
int msqid;
@ -310,11 +310,11 @@ linux_msgrcv(struct proc *p, struct linux_ipc_args *args, int *retval)
bsd_args.msgsz = args->arg2;
bsd_args.msgtyp = 0;
bsd_args.msgflg = args->arg3;
return msgrcv(p, &bsd_args, retval);
return msgrcv(p, &bsd_args);
}
static int
linux_msgget(struct proc *p, struct linux_ipc_args *args, int *retval)
linux_msgget(struct proc *p, struct linux_ipc_args *args)
{
struct msgget_args /* {
key_t key;
@ -323,11 +323,11 @@ linux_msgget(struct proc *p, struct linux_ipc_args *args, int *retval)
bsd_args.key = args->arg1;
bsd_args.msgflg = args->arg2;
return msgget(p, &bsd_args, retval);
return msgget(p, &bsd_args);
}
static int
linux_msgctl(struct proc *p, struct linux_ipc_args *args, int *retval)
linux_msgctl(struct proc *p, struct linux_ipc_args *args)
{
struct msgctl_args /* {
int msqid;
@ -338,11 +338,11 @@ linux_msgctl(struct proc *p, struct linux_ipc_args *args, int *retval)
bsd_args.msqid = args->arg1;
bsd_args.cmd = args->arg2;
bsd_args.buf = (struct msqid_ds *)args->ptr;
return msgctl(p, &bsd_args, retval);
return msgctl(p, &bsd_args);
}
static int
linux_shmat(struct proc *p, struct linux_ipc_args *args, int *retval)
linux_shmat(struct proc *p, struct linux_ipc_args *args)
{
struct shmat_args /* {
int shmid;
@ -354,27 +354,27 @@ linux_shmat(struct proc *p, struct linux_ipc_args *args, int *retval)
bsd_args.shmid = args->arg1;
bsd_args.shmaddr = args->ptr;
bsd_args.shmflg = args->arg2;
if ((error = shmat(p, &bsd_args, retval)))
if ((error = shmat(p, &bsd_args)))
return error;
if ((error = copyout(retval, (caddr_t)args->arg3, sizeof(int))))
if ((error = copyout(p->p_retval, (caddr_t)args->arg3, sizeof(int))))
return error;
retval[0] = 0;
p->p_retval[0] = 0;
return 0;
}
static int
linux_shmdt(struct proc *p, struct linux_ipc_args *args, int *retval)
linux_shmdt(struct proc *p, struct linux_ipc_args *args)
{
struct shmdt_args /* {
void *shmaddr;
} */ bsd_args;
bsd_args.shmaddr = args->ptr;
return shmdt(p, &bsd_args, retval);
return shmdt(p, &bsd_args);
}
static int
linux_shmget(struct proc *p, struct linux_ipc_args *args, int *retval)
linux_shmget(struct proc *p, struct linux_ipc_args *args)
{
struct shmget_args /* {
key_t key;
@ -385,11 +385,11 @@ linux_shmget(struct proc *p, struct linux_ipc_args *args, int *retval)
bsd_args.key = args->arg1;
bsd_args.size = args->arg2;
bsd_args.shmflg = args->arg3;
return shmget(p, &bsd_args, retval);
return shmget(p, &bsd_args);
}
static int
linux_shmctl(struct proc *p, struct linux_ipc_args *args, int *retval)
linux_shmctl(struct proc *p, struct linux_ipc_args *args)
{
struct shmid_ds bsd_shmid;
struct linux_shmid_ds linux_shmid;
@ -406,7 +406,7 @@ linux_shmctl(struct proc *p, struct linux_ipc_args *args, int *retval)
bsd_args.shmid = args->arg1;
bsd_args.cmd = IPC_STAT;
bsd_args.buf = (struct shmid_ds*)stackgap_alloc(&sg, sizeof(struct shmid_ds));
if ((error = shmctl(p, &bsd_args, retval)))
if ((error = shmctl(p, &bsd_args)))
return error;
if ((error = copyin((caddr_t)bsd_args.buf, (caddr_t)&bsd_shmid,
sizeof(struct shmid_ds))))
@ -425,7 +425,7 @@ linux_shmctl(struct proc *p, struct linux_ipc_args *args, int *retval)
return error;
bsd_args.shmid = args->arg1;
bsd_args.cmd = IPC_SET;
return shmctl(p, &bsd_args, retval);
return shmctl(p, &bsd_args);
case LINUX_IPC_RMID:
bsd_args.shmid = args->arg1;
@ -438,7 +438,7 @@ linux_shmctl(struct proc *p, struct linux_ipc_args *args, int *retval)
if ((error = copyout((caddr_t)&bsd_shmid, (caddr_t)bsd_args.buf,
sizeof(struct shmid_ds))))
return error;
return shmctl(p, &bsd_args, retval);
return shmctl(p, &bsd_args);
case LINUX_IPC_INFO:
case LINUX_SHM_STAT:
@ -452,31 +452,31 @@ linux_shmctl(struct proc *p, struct linux_ipc_args *args, int *retval)
}
int
linux_ipc(struct proc *p, struct linux_ipc_args *args, int *retval)
linux_ipc(struct proc *p, struct linux_ipc_args *args)
{
switch (args->what) {
case LINUX_SEMOP:
return linux_semop(p, args, retval);
return linux_semop(p, args);
case LINUX_SEMGET:
return linux_semget(p, args, retval);
return linux_semget(p, args);
case LINUX_SEMCTL:
return linux_semctl(p, args, retval);
return linux_semctl(p, args);
case LINUX_MSGSND:
return linux_msgsnd(p, args, retval);
return linux_msgsnd(p, args);
case LINUX_MSGRCV:
return linux_msgrcv(p, args, retval);
return linux_msgrcv(p, args);
case LINUX_MSGGET:
return linux_msgget(p, args, retval);
return linux_msgget(p, args);
case LINUX_MSGCTL:
return linux_msgctl(p, args, retval);
return linux_msgctl(p, args);
case LINUX_SHMAT:
return linux_shmat(p, args, retval);
return linux_shmat(p, args);
case LINUX_SHMDT:
return linux_shmdt(p, args, retval);
return linux_shmdt(p, args);
case LINUX_SHMGET:
return linux_shmget(p, args, retval);
return linux_shmget(p, args);
case LINUX_SHMCTL:
return linux_shmctl(p, args, retval);
return linux_shmctl(p, args);
default:
uprintf("LINUX: 'ipc' typ=%d not implemented\n", args->what);
return ENOSYS;

View File

@ -25,7 +25,7 @@
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
* $Id: linux_misc.c,v 1.31 1997/10/29 08:17:12 kato Exp $
* $Id: linux_misc.c,v 1.32 1997/10/30 10:53:30 kato Exp $
*/
#include <sys/param.h>
@ -60,7 +60,7 @@
#include <i386/linux/linux_util.h>
int
linux_alarm(struct proc *p, struct linux_alarm_args *args, int *retval)
linux_alarm(struct proc *p, struct linux_alarm_args *args)
{
struct itimerval it, old_it;
struct timeval tv;
@ -96,12 +96,12 @@ linux_alarm(struct proc *p, struct linux_alarm_args *args, int *retval)
splx(s);
if (old_it.it_value.tv_usec)
old_it.it_value.tv_sec++;
*retval = old_it.it_value.tv_sec;
p->p_retval[0] = old_it.it_value.tv_sec;
return 0;
}
int
linux_brk(struct proc *p, struct linux_brk_args *args, int *retval)
linux_brk(struct proc *p, struct linux_brk_args *args)
{
#if 0
struct vmspace *vm = p->p_vmspace;
@ -116,7 +116,7 @@ linux_brk(struct proc *p, struct linux_brk_args *args, int *retval)
old = round_page((vm_offset_t)vm->vm_daddr) + ctob(vm->vm_dsize);
new = round_page((vm_offset_t)args->dsend);
*retval = old;
p->p_retval[0] = old;
if ((new-old) > 0) {
if (swap_pager_full)
return ENOMEM;
@ -125,7 +125,7 @@ linux_brk(struct proc *p, struct linux_brk_args *args, int *retval)
if (error)
return error;
vm->vm_dsize += btoc((new-old));
*retval = (int)(vm->vm_daddr + ctob(vm->vm_dsize));
p->p_retval[0] = (int)(vm->vm_daddr + ctob(vm->vm_dsize));
}
return 0;
#else
@ -141,17 +141,17 @@ linux_brk(struct proc *p, struct linux_brk_args *args, int *retval)
old = (vm_offset_t)vm->vm_daddr + ctob(vm->vm_dsize);
new = (vm_offset_t)args->dsend;
tmp.nsize = (char *) new;
if (((caddr_t)new > vm->vm_daddr) && !obreak(p, &tmp, retval))
retval[0] = (int)new;
if (((caddr_t)new > vm->vm_daddr) && !obreak(p, &tmp))
p->p_retval[0] = (int)new;
else
retval[0] = (int)old;
p->p_retval[0] = (int)old;
return 0;
#endif
}
int
linux_uselib(struct proc *p, struct linux_uselib_args *args, int *retval)
linux_uselib(struct proc *p, struct linux_uselib_args *args)
{
struct nameidata ni;
struct vnode *vp;
@ -408,7 +408,7 @@ struct linux_select_argv {
};
int
linux_select(struct proc *p, struct linux_select_args *args, int *retval)
linux_select(struct proc *p, struct linux_select_args *args)
{
struct linux_select_argv linux_args;
struct linux_newselect_args newsel;
@ -428,11 +428,11 @@ linux_select(struct proc *p, struct linux_select_args *args, int *retval)
newsel.exceptfds = linux_args.exceptfds;
newsel.timeout = linux_args.timeout;
return linux_newselect(p, &newsel, retval);
return linux_newselect(p, &newsel);
}
int
linux_newselect(struct proc *p, struct linux_newselect_args *args, int *retval)
linux_newselect(struct proc *p, struct linux_newselect_args *args)
{
struct select_args bsa;
struct timeval tv0, tv1, utv, *tvp;
@ -484,7 +484,7 @@ linux_newselect(struct proc *p, struct linux_newselect_args *args, int *retval)
microtime(&tv0);
}
error = select(p, &bsa, retval);
error = select(p, &bsa);
#ifdef DEBUG
printf("Linux-emul(%d): real select returns %d\n",
p->p_pid, error);
@ -501,7 +501,7 @@ linux_newselect(struct proc *p, struct linux_newselect_args *args, int *retval)
}
if (args->timeout) {
if (*retval) {
if (p->p_retval[0]) {
/*
* Compute how much time was left of the timeout,
* by subtracting the current time and the time
@ -532,7 +532,7 @@ linux_newselect(struct proc *p, struct linux_newselect_args *args, int *retval)
}
int
linux_getpgid(struct proc *p, struct linux_getpgid_args *args, int *retval)
linux_getpgid(struct proc *p, struct linux_getpgid_args *args)
{
struct proc *curproc;
@ -545,22 +545,22 @@ linux_getpgid(struct proc *p, struct linux_getpgid_args *args, int *retval)
}
else
curproc = p;
*retval = curproc->p_pgid;
p->p_retval[0] = curproc->p_pgid;
return 0;
}
int
linux_fork(struct proc *p, struct linux_fork_args *args, int *retval)
linux_fork(struct proc *p, struct linux_fork_args *args)
{
int error;
#ifdef DEBUG
printf("Linux-emul(%d): fork()\n", p->p_pid);
#endif
if (error = fork(p, (struct fork_args *)args, retval))
if (error = fork(p, (struct fork_args *)args))
return error;
if (retval[1] == 1)
retval[0] = 0;
if (p->p_retval[1] == 1)
p->p_retval[0] = 0;
return 0;
}
@ -575,7 +575,7 @@ struct linux_mmap_argv {
};
int
linux_mmap(struct proc *p, struct linux_mmap_args *args, int *retval)
linux_mmap(struct proc *p, struct linux_mmap_args *args)
{
struct mmap_args /* {
caddr_t addr;
@ -612,11 +612,11 @@ linux_mmap(struct proc *p, struct linux_mmap_args *args, int *retval)
bsd_args.fd = linux_args.fd;
bsd_args.pos = linux_args.pos;
bsd_args.pad = 0;
return mmap(p, &bsd_args, retval);
return mmap(p, &bsd_args);
}
int
linux_msync(struct proc *p, struct linux_msync_args *args, int *retval)
linux_msync(struct proc *p, struct linux_msync_args *args)
{
struct msync_args bsd_args;
@ -624,27 +624,27 @@ linux_msync(struct proc *p, struct linux_msync_args *args, int *retval)
bsd_args.len = args->len;
bsd_args.flags = 0; /* XXX ignore */
return msync(p, &bsd_args, retval);
return msync(p, &bsd_args);
}
int
linux_pipe(struct proc *p, struct linux_pipe_args *args, int *retval)
linux_pipe(struct proc *p, struct linux_pipe_args *args)
{
int error;
#ifdef DEBUG
printf("Linux-emul(%d): pipe(*)\n", p->p_pid);
#endif
if (error = pipe(p, 0, retval))
if (error = pipe(p, 0))
return error;
if (error = copyout(retval, args->pipefds, 2*sizeof(int)))
if (error = copyout(p->p_retval, args->pipefds, 2*sizeof(int)))
return error;
*retval = 0;
p->p_retval[0] = 0;
return 0;
}
int
linux_time(struct proc *p, struct linux_time_args *args, int *retval)
linux_time(struct proc *p, struct linux_time_args *args)
{
struct timeval tv;
linux_time_t tm;
@ -657,7 +657,7 @@ linux_time(struct proc *p, struct linux_time_args *args, int *retval)
tm = tv.tv_sec;
if (args->tm && (error = copyout(&tm, args->tm, sizeof(linux_time_t))))
return error;
*retval = tm;
p->p_retval[0] = tm;
return 0;
}
@ -672,7 +672,7 @@ struct linux_times_argv {
#define CONVTCK(r) (r.tv_sec * CLK_TCK + r.tv_usec / (1000000 / CLK_TCK))
int
linux_times(struct proc *p, struct linux_times_args *args, int *retval)
linux_times(struct proc *p, struct linux_times_args *args)
{
struct timeval tv;
struct linux_times_argv tms;
@ -696,7 +696,7 @@ linux_times(struct proc *p, struct linux_times_args *args, int *retval)
microtime(&tv);
timevalsub(&tv, &boottime);
*retval = (int)CONVTCK(tv);
p->p_retval[0] = (int)CONVTCK(tv);
return 0;
}
@ -711,7 +711,7 @@ struct linux_newuname_t {
};
int
linux_newuname(struct proc *p, struct linux_newuname_args *args, int *retval)
linux_newuname(struct proc *p, struct linux_newuname_args *args)
{
struct linux_newuname_t linux_newuname;
@ -735,7 +735,7 @@ struct linux_utimbuf {
};
int
linux_utime(struct proc *p, struct linux_utime_args *args, int *retval)
linux_utime(struct proc *p, struct linux_utime_args *args)
{
struct utimes_args /* {
char *path;
@ -768,11 +768,11 @@ linux_utime(struct proc *p, struct linux_utime_args *args, int *retval)
bsdutimes.tptr = NULL;
bsdutimes.path = args->fname;
return utimes(p, &bsdutimes, retval);
return utimes(p, &bsdutimes);
}
int
linux_waitpid(struct proc *p, struct linux_waitpid_args *args, int *retval)
linux_waitpid(struct proc *p, struct linux_waitpid_args *args)
{
struct wait_args /* {
int pid;
@ -791,7 +791,7 @@ linux_waitpid(struct proc *p, struct linux_waitpid_args *args, int *retval)
tmp.options = args->options;
tmp.rusage = NULL;
if (error = wait4(p, &tmp, retval))
if (error = wait4(p, &tmp))
return error;
if (args->status) {
if (error = copyin(args->status, &tmpstat, sizeof(int)))
@ -808,7 +808,7 @@ linux_waitpid(struct proc *p, struct linux_waitpid_args *args, int *retval)
}
int
linux_wait4(struct proc *p, struct linux_wait4_args *args, int *retval)
linux_wait4(struct proc *p, struct linux_wait4_args *args)
{
struct wait_args /* {
int pid;
@ -827,7 +827,7 @@ linux_wait4(struct proc *p, struct linux_wait4_args *args, int *retval)
tmp.options = args->options;
tmp.rusage = args->rusage;
if (error = wait4(p, &tmp, retval))
if (error = wait4(p, &tmp))
return error;
p->p_siglist &= ~sigmask(SIGCHLD);
@ -847,7 +847,7 @@ linux_wait4(struct proc *p, struct linux_wait4_args *args, int *retval)
}
int
linux_mknod(struct proc *p, struct linux_mknod_args *args, int *retval)
linux_mknod(struct proc *p, struct linux_mknod_args *args)
{
caddr_t sg;
struct mknod_args bsd_mknod;
@ -865,12 +865,12 @@ linux_mknod(struct proc *p, struct linux_mknod_args *args, int *retval)
if (args->mode & S_IFIFO) {
bsd_mkfifo.path = args->path;
bsd_mkfifo.mode = args->mode;
return mkfifo(p, &bsd_mkfifo, retval);
return mkfifo(p, &bsd_mkfifo);
} else {
bsd_mknod.path = args->path;
bsd_mknod.mode = args->mode;
bsd_mknod.dev = args->dev;
return mknod(p, &bsd_mknod, retval);
return mknod(p, &bsd_mknod);
}
}
@ -878,8 +878,7 @@ linux_mknod(struct proc *p, struct linux_mknod_args *args, int *retval)
* UGH! This is just about the dumbest idea I've ever heard!!
*/
int
linux_personality(struct proc *p, struct linux_personality_args *args,
int *retval)
linux_personality(struct proc *p, struct linux_personality_args *args)
{
#ifdef DEBUG
printf("Linux-emul(%d): personality(%d)\n",
@ -889,7 +888,7 @@ linux_personality(struct proc *p, struct linux_personality_args *args,
return EINVAL;
/* Yes Jim, it's still a Linux... */
retval[0] = 0;
p->p_retval[0] = 0;
return 0;
}
@ -897,7 +896,7 @@ linux_personality(struct proc *p, struct linux_personality_args *args,
* Wrappers for get/setitimer for debugging..
*/
int
linux_setitimer(struct proc *p, struct linux_setitimer_args *args, int *retval)
linux_setitimer(struct proc *p, struct linux_setitimer_args *args)
{
struct setitimer_args bsa;
struct itimerval foo;
@ -919,11 +918,11 @@ linux_setitimer(struct proc *p, struct linux_setitimer_args *args, int *retval)
printf("setitimer: interval: sec: %d, usec: %d\n", foo.it_interval.tv_sec, foo.it_interval.tv_usec);
#endif
}
return setitimer(p, &bsa, retval);
return setitimer(p, &bsa);
}
int
linux_getitimer(struct proc *p, struct linux_getitimer_args *args, int *retval)
linux_getitimer(struct proc *p, struct linux_getitimer_args *args)
{
struct getitimer_args bsa;
#ifdef DEBUG
@ -932,11 +931,11 @@ linux_getitimer(struct proc *p, struct linux_getitimer_args *args, int *retval)
#endif
bsa.which = args->which;
bsa.itv = args->itv;
return getitimer(p, &bsa, retval);
return getitimer(p, &bsa);
}
int
linux_iopl(struct proc *p, struct linux_iopl_args *args, int *retval)
linux_iopl(struct proc *p, struct linux_iopl_args *args)
{
int error;
@ -950,13 +949,13 @@ linux_iopl(struct proc *p, struct linux_iopl_args *args, int *retval)
}
int
linux_nice(struct proc *p, struct linux_nice_args *args, int *retval)
linux_nice(struct proc *p, struct linux_nice_args *args)
{
struct setpriority_args bsd_args;
bsd_args.which = PRIO_PROCESS;
bsd_args.who = 0; /* current process */
bsd_args.prio = args->inc;
return setpriority(p, &bsd_args, retval);
return setpriority(p, &bsd_args);
}

View File

@ -25,7 +25,7 @@
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
* $Id: linux_signal.c,v 1.8 1997/02/22 09:38:24 peter Exp $
* $Id: linux_signal.c,v 1.9 1997/07/20 16:06:03 bde Exp $
*/
#include <sys/param.h>
@ -104,7 +104,7 @@ bsd_to_linux_sigaction(struct sigaction *bsa, linux_sigaction_t *lsa)
}
int
linux_sigaction(struct proc *p, struct linux_sigaction_args *args, int *retval)
linux_sigaction(struct proc *p, struct linux_sigaction_args *args)
{
linux_sigaction_t linux_sa;
struct sigaction *nsa = NULL, *osa = NULL, bsd_sa;
@ -131,7 +131,7 @@ linux_sigaction(struct proc *p, struct linux_sigaction_args *args, int *retval)
sa.signum = linux_to_bsd_signal[args->sig];
sa.nsa = nsa;
sa.osa = osa;
if ((error = sigaction(p, &sa, retval)))
if ((error = sigaction(p, &sa)))
return error;
if (args->osa) {
@ -145,7 +145,7 @@ linux_sigaction(struct proc *p, struct linux_sigaction_args *args, int *retval)
}
int
linux_signal(struct proc *p, struct linux_signal_args *args, int *retval)
linux_signal(struct proc *p, struct linux_signal_args *args)
{
caddr_t sg;
struct sigaction_args sa_args;
@ -169,21 +169,20 @@ linux_signal(struct proc *p, struct linux_signal_args *args, int *retval)
sa_args.signum = linux_to_bsd_signal[args->sig];
sa_args.osa = osa;
sa_args.nsa = nsa;
if ((error = sigaction(p, &sa_args, retval)))
if ((error = sigaction(p, &sa_args)))
return error;
if ((error = copyin(osa, &tmpsa, sizeof *osa)))
return error;
*retval = (int)tmpsa.sa_handler;
p->p_retval[0] = (int)tmpsa.sa_handler;
return 0;
}
int
linux_sigprocmask(struct proc *p, struct linux_sigprocmask_args *args,
int *retval)
linux_sigprocmask(struct proc *p, struct linux_sigprocmask_args *args)
{
int error, s;
sigset_t mask;
@ -193,7 +192,7 @@ linux_sigprocmask(struct proc *p, struct linux_sigprocmask_args *args,
printf("Linux-emul(%d): sigprocmask(%d, *, *)\n", p->p_pid, args->how);
#endif
*retval = 0;
p->p_retval[0] = 0;
if (args->omask != NULL) {
omask = bsd_to_linux_sigset(p->p_sigmask);
@ -226,17 +225,17 @@ linux_sigprocmask(struct proc *p, struct linux_sigprocmask_args *args,
}
int
linux_siggetmask(struct proc *p, struct linux_siggetmask_args *args, int *retval)
linux_siggetmask(struct proc *p, struct linux_siggetmask_args *args)
{
#ifdef DEBUG
printf("Linux-emul(%d): siggetmask()\n", p->p_pid);
#endif
*retval = bsd_to_linux_sigset(p->p_sigmask);
p->p_retval[0] = bsd_to_linux_sigset(p->p_sigmask);
return 0;
}
int
linux_sigsetmask(struct proc *p, struct linux_sigsetmask_args *args,int *retval)
linux_sigsetmask(struct proc *p, struct linux_sigsetmask_args *args)
{
int s;
sigset_t mask;
@ -244,7 +243,7 @@ linux_sigsetmask(struct proc *p, struct linux_sigsetmask_args *args,int *retval)
#ifdef DEBUG
printf("Linux-emul(%d): sigsetmask(%08x)\n", p->p_pid, args->mask);
#endif
*retval = bsd_to_linux_sigset(p->p_sigmask);
p->p_retval[0] = bsd_to_linux_sigset(p->p_sigmask);
mask = linux_to_bsd_sigset(args->mask);
s = splhigh();
@ -254,7 +253,7 @@ linux_sigsetmask(struct proc *p, struct linux_sigsetmask_args *args,int *retval)
}
int
linux_sigpending(struct proc *p, struct linux_sigpending_args *args,int *retval)
linux_sigpending(struct proc *p, struct linux_sigpending_args *args)
{
linux_sigset_t linux_sig;
@ -271,7 +270,7 @@ linux_sigpending(struct proc *p, struct linux_sigpending_args *args,int *retval)
* enables the signal to happen with a different register set.
*/
int
linux_sigsuspend(struct proc *p, struct linux_sigsuspend_args *args,int *retval)
linux_sigsuspend(struct proc *p, struct linux_sigsuspend_args *args)
{
struct sigsuspend_args tmp;
@ -279,11 +278,11 @@ linux_sigsuspend(struct proc *p, struct linux_sigsuspend_args *args,int *retval)
printf("Linux-emul(%d): sigsuspend(%08x)\n", p->p_pid, args->mask);
#endif
tmp.mask = linux_to_bsd_sigset(args->mask);
return sigsuspend(p, &tmp , retval);
return sigsuspend(p, &tmp);
}
int
linux_pause(struct proc *p, struct linux_pause_args *args,int *retval)
linux_pause(struct proc *p, struct linux_pause_args *args)
{
struct sigsuspend_args tmp;
@ -291,11 +290,11 @@ linux_pause(struct proc *p, struct linux_pause_args *args,int *retval)
printf("Linux-emul(%d): pause()\n", p->p_pid);
#endif
tmp.mask = p->p_sigmask;
return sigsuspend(p, &tmp , retval);
return sigsuspend(p, &tmp);
}
int
linux_kill(struct proc *p, struct linux_kill_args *args, int *retval)
linux_kill(struct proc *p, struct linux_kill_args *args)
{
struct kill_args /* {
int pid;
@ -308,5 +307,5 @@ linux_kill(struct proc *p, struct linux_kill_args *args, int *retval)
#endif
tmp.pid = args->pid;
tmp.signum = linux_to_bsd_signal[args->signum];
return kill(p, &tmp, retval);
return kill(p, &tmp);
}

View File

@ -25,7 +25,7 @@
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
* $Id: linux_socket.c,v 1.7 1997/02/22 09:38:25 peter Exp $
* $Id: linux_socket.c,v 1.8 1997/07/20 16:06:04 bde Exp $
*/
/* XXX we use functions that might not exist. */
@ -138,7 +138,7 @@ struct linux_socket_args {
};
static int
linux_socket(struct proc *p, struct linux_socket_args *args, int *retval)
linux_socket(struct proc *p, struct linux_socket_args *args)
{
struct linux_socket_args linux_args;
struct socket_args /* {
@ -155,7 +155,7 @@ linux_socket(struct proc *p, struct linux_socket_args *args, int *retval)
bsd_args.domain = linux_to_bsd_domain(linux_args.domain);
if (bsd_args.domain == -1)
return EINVAL;
return socket(p, &bsd_args, retval);
return socket(p, &bsd_args);
}
struct linux_bind_args {
@ -165,7 +165,7 @@ struct linux_bind_args {
};
static int
linux_bind(struct proc *p, struct linux_bind_args *args, int *retval)
linux_bind(struct proc *p, struct linux_bind_args *args)
{
struct linux_bind_args linux_args;
struct bind_args /* {
@ -180,7 +180,7 @@ linux_bind(struct proc *p, struct linux_bind_args *args, int *retval)
bsd_args.s = linux_args.s;
bsd_args.name = (caddr_t)linux_args.name;
bsd_args.namelen = linux_args.namelen;
return bind(p, &bsd_args, retval);
return bind(p, &bsd_args);
}
struct linux_connect_args {
@ -190,7 +190,7 @@ struct linux_connect_args {
};
static int
linux_connect(struct proc *p, struct linux_connect_args *args, int *retval)
linux_connect(struct proc *p, struct linux_connect_args *args)
{
struct linux_connect_args linux_args;
struct connect_args /* {
@ -205,7 +205,7 @@ linux_connect(struct proc *p, struct linux_connect_args *args, int *retval)
bsd_args.s = linux_args.s;
bsd_args.name = (caddr_t)linux_args.name;
bsd_args.namelen = linux_args.namelen;
return connect(p, &bsd_args, retval);
return connect(p, &bsd_args);
}
struct linux_listen_args {
@ -214,7 +214,7 @@ struct linux_listen_args {
};
static int
linux_listen(struct proc *p, struct linux_listen_args *args, int *retval)
linux_listen(struct proc *p, struct linux_listen_args *args)
{
struct linux_listen_args linux_args;
struct listen_args /* {
@ -227,7 +227,7 @@ linux_listen(struct proc *p, struct linux_listen_args *args, int *retval)
return error;
bsd_args.s = linux_args.s;
bsd_args.backlog = linux_args.backlog;
return listen(p, &bsd_args, retval);
return listen(p, &bsd_args);
}
struct linux_accept_args {
@ -237,7 +237,7 @@ struct linux_accept_args {
};
static int
linux_accept(struct proc *p, struct linux_accept_args *args, int *retval)
linux_accept(struct proc *p, struct linux_accept_args *args)
{
struct linux_accept_args linux_args;
struct accept_args /* {
@ -252,7 +252,7 @@ linux_accept(struct proc *p, struct linux_accept_args *args, int *retval)
bsd_args.s = linux_args.s;
bsd_args.name = (caddr_t)linux_args.addr;
bsd_args.anamelen = linux_args.namelen;
return oaccept(p, &bsd_args, retval);
return oaccept(p, &bsd_args);
}
struct linux_getsockname_args {
@ -262,7 +262,7 @@ struct linux_getsockname_args {
};
static int
linux_getsockname(struct proc *p, struct linux_getsockname_args *args, int *retval)
linux_getsockname(struct proc *p, struct linux_getsockname_args *args)
{
struct linux_getsockname_args linux_args;
struct getsockname_args /* {
@ -277,7 +277,7 @@ linux_getsockname(struct proc *p, struct linux_getsockname_args *args, int *retv
bsd_args.fdes = linux_args.s;
bsd_args.asa = (caddr_t) linux_args.addr;
bsd_args.alen = linux_args.namelen;
return ogetsockname(p, &bsd_args, retval);
return ogetsockname(p, &bsd_args);
}
struct linux_getpeername_args {
@ -287,7 +287,7 @@ struct linux_getpeername_args {
};
static int
linux_getpeername(struct proc *p, struct linux_getpeername_args *args, int *retval)
linux_getpeername(struct proc *p, struct linux_getpeername_args *args)
{
struct linux_getpeername_args linux_args;
struct ogetpeername_args /* {
@ -302,7 +302,7 @@ linux_getpeername(struct proc *p, struct linux_getpeername_args *args, int *retv
bsd_args.fdes = linux_args.s;
bsd_args.asa = (caddr_t) linux_args.addr;
bsd_args.alen = linux_args.namelen;
return ogetpeername(p, &bsd_args, retval);
return ogetpeername(p, &bsd_args);
}
struct linux_socketpair_args {
@ -313,7 +313,7 @@ struct linux_socketpair_args {
};
static int
linux_socketpair(struct proc *p, struct linux_socketpair_args *args, int *retval)
linux_socketpair(struct proc *p, struct linux_socketpair_args *args)
{
struct linux_socketpair_args linux_args;
struct socketpair_args /* {
@ -332,7 +332,7 @@ linux_socketpair(struct proc *p, struct linux_socketpair_args *args, int *retval
bsd_args.type = linux_args.type;
bsd_args.protocol = linux_args.protocol;
bsd_args.rsv = linux_args.rsv;
return socketpair(p, &bsd_args, retval);
return socketpair(p, &bsd_args);
}
struct linux_send_args {
@ -343,7 +343,7 @@ struct linux_send_args {
};
static int
linux_send(struct proc *p, struct linux_send_args *args, int *retval)
linux_send(struct proc *p, struct linux_send_args *args)
{
struct linux_send_args linux_args;
struct osend_args /* {
@ -360,7 +360,7 @@ linux_send(struct proc *p, struct linux_send_args *args, int *retval)
bsd_args.buf = linux_args.msg;
bsd_args.len = linux_args.len;
bsd_args.flags = linux_args.flags;
return osend(p, &bsd_args, retval);
return osend(p, &bsd_args);
}
struct linux_recv_args {
@ -371,7 +371,7 @@ struct linux_recv_args {
};
static int
linux_recv(struct proc *p, struct linux_recv_args *args, int *retval)
linux_recv(struct proc *p, struct linux_recv_args *args)
{
struct linux_recv_args linux_args;
struct orecv_args /* {
@ -388,7 +388,7 @@ linux_recv(struct proc *p, struct linux_recv_args *args, int *retval)
bsd_args.buf = linux_args.msg;
bsd_args.len = linux_args.len;
bsd_args.flags = linux_args.flags;
return orecv(p, &bsd_args, retval);
return orecv(p, &bsd_args);
}
struct linux_sendto_args {
@ -401,7 +401,7 @@ struct linux_sendto_args {
};
static int
linux_sendto(struct proc *p, struct linux_sendto_args *args, int *retval)
linux_sendto(struct proc *p, struct linux_sendto_args *args)
{
struct linux_sendto_args linux_args;
struct sendto_args /* {
@ -422,7 +422,7 @@ linux_sendto(struct proc *p, struct linux_sendto_args *args, int *retval)
bsd_args.flags = linux_args.flags;
bsd_args.to = linux_args.to;
bsd_args.tolen = linux_args.tolen;
return sendto(p, &bsd_args, retval);
return sendto(p, &bsd_args);
}
struct linux_recvfrom_args {
@ -435,7 +435,7 @@ struct linux_recvfrom_args {
};
static int
linux_recvfrom(struct proc *p, struct linux_recvfrom_args *args, int *retval)
linux_recvfrom(struct proc *p, struct linux_recvfrom_args *args)
{
struct linux_recvfrom_args linux_args;
struct recvfrom_args /* {
@ -456,7 +456,7 @@ linux_recvfrom(struct proc *p, struct linux_recvfrom_args *args, int *retval)
bsd_args.flags = linux_args.flags;
bsd_args.from = linux_args.from;
bsd_args.fromlenaddr = linux_args.fromlen;
return orecvfrom(p, &bsd_args, retval);
return orecvfrom(p, &bsd_args);
}
struct linux_shutdown_args {
@ -465,7 +465,7 @@ struct linux_shutdown_args {
};
static int
linux_shutdown(struct proc *p, struct linux_shutdown_args *args, int *retval)
linux_shutdown(struct proc *p, struct linux_shutdown_args *args)
{
struct linux_shutdown_args linux_args;
struct shutdown_args /* {
@ -478,7 +478,7 @@ linux_shutdown(struct proc *p, struct linux_shutdown_args *args, int *retval)
return error;
bsd_args.s = linux_args.s;
bsd_args.how = linux_args.how;
return shutdown(p, &bsd_args, retval);
return shutdown(p, &bsd_args);
}
struct linux_setsockopt_args {
@ -490,7 +490,7 @@ struct linux_setsockopt_args {
};
static int
linux_setsockopt(struct proc *p, struct linux_setsockopt_args *args, int *retval)
linux_setsockopt(struct proc *p, struct linux_setsockopt_args *args)
{
struct linux_setsockopt_args linux_args;
struct setsockopt_args /* {
@ -521,7 +521,7 @@ linux_setsockopt(struct proc *p, struct linux_setsockopt_args *args, int *retval
bsd_args.name = name;
bsd_args.val = linux_args.optval;
bsd_args.valsize = linux_args.optlen;
return setsockopt(p, &bsd_args, retval);
return setsockopt(p, &bsd_args);
}
struct linux_getsockopt_args {
@ -533,7 +533,7 @@ struct linux_getsockopt_args {
};
static int
linux_getsockopt(struct proc *p, struct linux_getsockopt_args *args, int *retval)
linux_getsockopt(struct proc *p, struct linux_getsockopt_args *args)
{
struct linux_getsockopt_args linux_args;
struct getsockopt_args /* {
@ -563,43 +563,43 @@ linux_getsockopt(struct proc *p, struct linux_getsockopt_args *args, int *retval
return EINVAL;
bsd_args.val = linux_args.optval;
bsd_args.avalsize = linux_args.optlen;
return getsockopt(p, &bsd_args, retval);
return getsockopt(p, &bsd_args);
}
int
linux_socketcall(struct proc *p, struct linux_socketcall_args *args,int *retval)
linux_socketcall(struct proc *p, struct linux_socketcall_args *args)
{
switch (args->what) {
case LINUX_SOCKET:
return linux_socket(p, args->args, retval);
return linux_socket(p, args->args);
case LINUX_BIND:
return linux_bind(p, args->args, retval);
return linux_bind(p, args->args);
case LINUX_CONNECT:
return linux_connect(p, args->args, retval);
return linux_connect(p, args->args);
case LINUX_LISTEN:
return linux_listen(p, args->args, retval);
return linux_listen(p, args->args);
case LINUX_ACCEPT:
return linux_accept(p, args->args, retval);
return linux_accept(p, args->args);
case LINUX_GETSOCKNAME:
return linux_getsockname(p, args->args, retval);
return linux_getsockname(p, args->args);
case LINUX_GETPEERNAME:
return linux_getpeername(p, args->args, retval);
return linux_getpeername(p, args->args);
case LINUX_SOCKETPAIR:
return linux_socketpair(p, args->args, retval);
return linux_socketpair(p, args->args);
case LINUX_SEND:
return linux_send(p, args->args, retval);
return linux_send(p, args->args);
case LINUX_RECV:
return linux_recv(p, args->args, retval);
return linux_recv(p, args->args);
case LINUX_SENDTO:
return linux_sendto(p, args->args, retval);
return linux_sendto(p, args->args);
case LINUX_RECVFROM:
return linux_recvfrom(p, args->args, retval);
return linux_recvfrom(p, args->args);
case LINUX_SHUTDOWN:
return linux_shutdown(p, args->args, retval);
return linux_shutdown(p, args->args);
case LINUX_SETSOCKOPT:
return linux_setsockopt(p, args->args, retval);
return linux_setsockopt(p, args->args);
case LINUX_GETSOCKOPT:
return linux_getsockopt(p, args->args, retval);
return linux_getsockopt(p, args->args);
default:
uprintf("LINUX: 'socket' typ=%d not implemented\n", args->what);
return ENOSYS;

View File

@ -25,7 +25,7 @@
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
* $Id$
* $Id: linux_stats.c,v 1.8 1997/02/22 09:38:25 peter Exp $
*/
#include <sys/param.h>
@ -91,7 +91,7 @@ newstat_copyout(struct stat *buf, void *ubuf)
}
int
linux_newstat(struct proc *p, struct linux_newstat_args *args, int *retval)
linux_newstat(struct proc *p, struct linux_newstat_args *args)
{
struct stat buf;
struct nameidata nd;
@ -119,10 +119,9 @@ linux_newstat(struct proc *p, struct linux_newstat_args *args, int *retval)
* Get file status; this version does not follow links.
*/
int
linux_newlstat(p, uap, retval)
linux_newlstat(p, uap)
struct proc *p;
struct linux_newlstat_args *uap;
int *retval;
{
int error;
struct vnode *vp, *dvp;
@ -178,7 +177,7 @@ linux_newlstat(p, uap, retval)
}
int
linux_newfstat(struct proc *p, struct linux_newfstat_args *args, int *retval)
linux_newfstat(struct proc *p, struct linux_newfstat_args *args)
{
struct filedesc *fdp = p->p_fd;
struct file *fp;
@ -224,7 +223,7 @@ struct linux_statfs_buf {
};
int
linux_statfs(struct proc *p, struct linux_statfs_args *args, int *retval)
linux_statfs(struct proc *p, struct linux_statfs_args *args)
{
struct mount *mp;
struct nameidata *ndp;
@ -265,7 +264,7 @@ linux_statfs(struct proc *p, struct linux_statfs_args *args, int *retval)
}
int
linux_fstatfs(struct proc *p, struct linux_fstatfs_args *args, int *retval)
linux_fstatfs(struct proc *p, struct linux_fstatfs_args *args)
{
struct file *fp;
struct mount *mp;

View File

@ -35,7 +35,7 @@
*
* @(#)portal_vnops.c 8.14 (Berkeley) 5/21/95
*
* $Id: portal_vnops.c,v 1.27 1997/10/26 20:55:20 phk Exp $
* $Id: portal_vnops.c,v 1.28 1997/10/27 13:33:41 bde Exp $
*/
/*
@ -84,10 +84,9 @@ portal_closefd(p, fd)
{
int error;
struct close_args ua;
int rc;
ua.fd = fd;
error = close(p, &ua, &rc);
error = close(p, &ua);
/*
* We should never get an error, and there isn't anything
* we could do if we got one, so just print a message.

View File

@ -35,7 +35,7 @@
* SUCH DAMAGE.
*
* from: @(#)machdep.c 7.4 (Berkeley) 6/3/91
* $Id: machdep.c,v 1.268 1997/10/10 12:42:52 peter Exp $
* $Id: machdep.c,v 1.269 1997/10/12 20:23:17 phk Exp $
*/
#include "apm.h"
@ -595,12 +595,11 @@ sendsig(catcher, sig, mask, code)
* state to gain improper privileges.
*/
int
sigreturn(p, uap, retval)
sigreturn(p, uap)
struct proc *p;
struct sigreturn_args /* {
struct sigcontext *sigcntxp;
} */ *uap;
int *retval;
{
register struct sigcontext *scp;
register struct sigframe *fp;

View File

@ -31,7 +31,7 @@
* SUCH DAMAGE.
*
* from: @(#)sys_machdep.c 5.5 (Berkeley) 1/19/91
* $Id: sys_machdep.c,v 1.26 1997/10/10 09:44:08 peter Exp $
* $Id: sys_machdep.c,v 1.27 1997/10/10 12:42:54 peter Exp $
*
*/
@ -83,32 +83,31 @@ struct sysarch_args {
#endif
int
sysarch(p, uap, retval)
sysarch(p, uap)
struct proc *p;
register struct sysarch_args *uap;
int *retval;
{
int error = 0;
switch(uap->op) {
#ifdef USER_LDT
case I386_GET_LDT:
error = i386_get_ldt(p, uap->parms, retval);
error = i386_get_ldt(p, uap->parms, p->p_retval);
break;
case I386_SET_LDT:
error = i386_set_ldt(p, uap->parms, retval);
error = i386_set_ldt(p, uap->parms, p->p_retval);
break;
#endif
#ifdef VM86
case I386_GET_IOPERM:
error = i386_get_ioperm(p, uap->parms, retval);
error = i386_get_ioperm(p, uap->parms, p->p_retval);
break;
case I386_SET_IOPERM:
error = i386_set_ioperm(p, uap->parms, retval);
error = i386_set_ioperm(p, uap->parms, p->p_retval);
break;
case I386_VM86:
error = vm86_sysarch(p, uap->parms, retval);
error = vm86_sysarch(p, uap->parms, p->p_retval);
break;
#endif
default:

View File

@ -35,7 +35,7 @@
* SUCH DAMAGE.
*
* from: @(#)trap.c 7.4 (Berkeley) 5/13/91
* $Id: trap.c,v 1.112 1997/10/10 09:44:09 peter Exp $
* $Id: trap.c,v 1.113 1997/10/10 12:42:48 peter Exp $
*/
/*
@ -904,7 +904,7 @@ syscall(frame)
struct proc *p = curproc;
u_quad_t sticks;
int error;
int args[8], rval[2];
int args[8];
u_int code;
sticks = p->p_sticks;
@ -956,10 +956,10 @@ syscall(frame)
if (KTRPOINT(p, KTR_SYSCALL))
ktrsyscall(p->p_tracep, code, callp->sy_narg, args);
#endif
rval[0] = 0;
rval[1] = frame.tf_edx;
p->p_retval[0] = 0;
p->p_retval[1] = frame.tf_edx;
error = (*callp->sy_call)(p, args, rval);
error = (*callp->sy_call)(p, args);
switch (error) {
@ -969,8 +969,8 @@ syscall(frame)
* if this is a child returning from fork syscall.
*/
p = curproc;
frame.tf_eax = rval[0];
frame.tf_edx = rval[1];
frame.tf_eax = p->p_retval[0];
frame.tf_edx = p->p_retval[1];
frame.tf_eflags &= ~PSL_C;
break;
@ -1007,7 +1007,7 @@ syscall(frame)
#ifdef KTRACE
if (KTRPOINT(p, KTR_SYSRET))
ktrsysret(p->p_tracep, code, error, rval[0]);
ktrsysret(p->p_tracep, code, error, p->p_retval[0]);
#endif
}

View File

@ -24,7 +24,7 @@
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
* $Id: ibcs2_fcntl.c,v 1.8 1997/03/24 11:52:23 bde Exp $
* $Id: ibcs2_fcntl.c,v 1.9 1997/07/20 09:39:41 bde Exp $
*/
#include <sys/param.h>
@ -165,10 +165,9 @@ oflags2ioflags(flags)
}
int
ibcs2_open(p, uap, retval)
ibcs2_open(p, uap)
struct proc *p;
struct ibcs2_open_args *uap;
int *retval;
{
int noctty = SCARG(uap, flags) & IBCS2_O_NOCTTY;
int ret;
@ -179,17 +178,17 @@ ibcs2_open(p, uap, retval)
CHECKALTCREAT(p, &sg, SCARG(uap, path));
else
CHECKALTEXIST(p, &sg, SCARG(uap, path));
ret = open(p, (struct open_args *)uap, retval);
ret = open(p, (struct open_args *)uap);
#ifdef SPX_HACK
if(ret == ENXIO)
if(!strcmp(SCARG(uap, path), "/compat/ibcs2/dev/spx"))
ret = spx_open(p, uap, retval);
ret = spx_open(p, uap);
else
#endif /* SPX_HACK */
if (!ret && !noctty && SESS_LEADER(p) && !(p->p_flag & P_CONTROLT)) {
struct filedesc *fdp = p->p_fd;
struct file *fp = fdp->fd_ofiles[*retval];
struct file *fp = fdp->fd_ofiles[p->p_retval[0]];
/* ignore any error, just give it a try */
if (fp->f_type == DTYPE_VNODE)
@ -199,10 +198,9 @@ ibcs2_open(p, uap, retval)
}
int
ibcs2_creat(p, uap, retval)
ibcs2_creat(p, uap)
struct proc *p;
struct ibcs2_creat_args *uap;
int *retval;
{
struct open_args cup;
caddr_t sg = stackgap_init();
@ -211,14 +209,13 @@ ibcs2_creat(p, uap, retval)
SCARG(&cup, path) = SCARG(uap, path);
SCARG(&cup, mode) = SCARG(uap, mode);
SCARG(&cup, flags) = O_WRONLY | O_CREAT | O_TRUNC;
return open(p, &cup, retval);
return open(p, &cup);
}
int
ibcs2_access(p, uap, retval)
ibcs2_access(p, uap)
struct proc *p;
struct ibcs2_access_args *uap;
int *retval;
{
struct access_args cup;
caddr_t sg = stackgap_init();
@ -226,14 +223,13 @@ ibcs2_access(p, uap, retval)
CHECKALTEXIST(p, &sg, SCARG(uap, path));
SCARG(&cup, path) = SCARG(uap, path);
SCARG(&cup, flags) = SCARG(uap, flags);
return access(p, &cup, retval);
return access(p, &cup);
}
int
ibcs2_fcntl(p, uap, retval)
ibcs2_fcntl(p, uap)
struct proc *p;
struct ibcs2_fcntl_args *uap;
int *retval;
{
int error;
struct fcntl_args fa;
@ -245,32 +241,32 @@ ibcs2_fcntl(p, uap, retval)
SCARG(&fa, fd) = SCARG(uap, fd);
SCARG(&fa, cmd) = F_DUPFD;
SCARG(&fa, arg) = (/* XXX */ int)SCARG(uap, arg);
return fcntl(p, &fa, retval);
return fcntl(p, &fa);
case IBCS2_F_GETFD:
SCARG(&fa, fd) = SCARG(uap, fd);
SCARG(&fa, cmd) = F_GETFD;
SCARG(&fa, arg) = (/* XXX */ int)SCARG(uap, arg);
return fcntl(p, &fa, retval);
return fcntl(p, &fa);
case IBCS2_F_SETFD:
SCARG(&fa, fd) = SCARG(uap, fd);
SCARG(&fa, cmd) = F_SETFD;
SCARG(&fa, arg) = (/* XXX */ int)SCARG(uap, arg);
return fcntl(p, &fa, retval);
return fcntl(p, &fa);
case IBCS2_F_GETFL:
SCARG(&fa, fd) = SCARG(uap, fd);
SCARG(&fa, cmd) = F_GETFL;
SCARG(&fa, arg) = (/* XXX */ int)SCARG(uap, arg);
error = fcntl(p, &fa, retval);
error = fcntl(p, &fa);
if (error)
return error;
*retval = oflags2ioflags(*retval);
p->p_retval[0] = oflags2ioflags(p->p_retval[0]);
return error;
case IBCS2_F_SETFL:
SCARG(&fa, fd) = SCARG(uap, fd);
SCARG(&fa, cmd) = F_SETFL;
SCARG(&fa, arg) = (/* XXX */ int)
ioflags2oflags((int)SCARG(uap, arg));
return fcntl(p, &fa, retval);
return fcntl(p, &fa);
case IBCS2_F_GETLK:
{
@ -284,7 +280,7 @@ ibcs2_fcntl(p, uap, retval)
SCARG(&fa, fd) = SCARG(uap, fd);
SCARG(&fa, cmd) = F_GETLK;
SCARG(&fa, arg) = (/* XXX */ int)flp;
error = fcntl(p, &fa, retval);
error = fcntl(p, &fa);
if (error)
return error;
cvt_flock2iflock(flp, &ifl);
@ -305,7 +301,7 @@ ibcs2_fcntl(p, uap, retval)
SCARG(&fa, cmd) = F_SETLK;
SCARG(&fa, arg) = (/* XXX */ int)flp;
return fcntl(p, &fa, retval);
return fcntl(p, &fa);
}
case IBCS2_F_SETLKW:
@ -320,7 +316,7 @@ ibcs2_fcntl(p, uap, retval)
SCARG(&fa, fd) = SCARG(uap, fd);
SCARG(&fa, cmd) = F_SETLKW;
SCARG(&fa, arg) = (/* XXX */ int)flp;
return fcntl(p, &fa, retval);
return fcntl(p, &fa);
}
}
return ENOSYS;

View File

@ -53,7 +53,7 @@ static void stio2stios __P((struct ibcs2_termio *, struct ibcs2_termios *));
int
ibcs2_gtty(struct proc *p, struct ibcs2_gtty_args *args, int *retval)
ibcs2_gtty(struct proc *p, struct ibcs2_gtty_args *args)
{
struct ioctl_args ioctl_arg;
@ -61,11 +61,11 @@ ibcs2_gtty(struct proc *p, struct ibcs2_gtty_args *args, int *retval)
ioctl_arg.com = TIOCGETC;
ioctl_arg.data = (caddr_t)args->buf;
return ioctl(p, &ioctl_arg, retval);
return ioctl(p, &ioctl_arg);
}
int
ibcs2_stty(struct proc *p, struct ibcs2_stty_args *args, int *retval)
ibcs2_stty(struct proc *p, struct ibcs2_stty_args *args)
{
struct ioctl_args ioctl_arg;
@ -73,7 +73,7 @@ ibcs2_stty(struct proc *p, struct ibcs2_stty_args *args, int *retval)
ioctl_arg.com = TIOCSETC;
ioctl_arg.data = (caddr_t)args->buf;
return ioctl(p, &ioctl_arg, retval);
return ioctl(p, &ioctl_arg);
}
@ -332,10 +332,9 @@ stio2stios(t, ts)
}
int
ibcs2_ioctl(p, uap, retval)
ibcs2_ioctl(p, uap)
struct proc *p;
struct ibcs2_ioctl_args *uap;
int *retval;
{
struct filedesc *fdp = p->p_fd;
struct file *fp;
@ -493,11 +492,11 @@ ibcs2_ioctl(p, uap, retval)
case IBCS2_TIOCGWINSZ:
SCARG(uap, cmd) = TIOCGWINSZ;
return ioctl(p, (struct ioctl_args *)uap, retval);
return ioctl(p, (struct ioctl_args *)uap);
case IBCS2_TIOCSWINSZ:
SCARG(uap, cmd) = TIOCSWINSZ;
return ioctl(p, (struct ioctl_args *)uap, retval);
return ioctl(p, (struct ioctl_args *)uap);
case IBCS2_TIOCGPGRP:
return copyout((caddr_t)&p->p_pgrp->pg_id, SCARG(uap, data),
@ -509,7 +508,7 @@ ibcs2_ioctl(p, uap, retval)
SCARG(&sa, pid) = 0;
SCARG(&sa, pgid) = (int)SCARG(uap, data);
if (error = setpgid(p, &sa, retval))
if (error = setpgid(p, &sa))
return error;
return 0;
}
@ -543,93 +542,92 @@ ibcs2_ioctl(p, uap, retval)
case IBCS2_KDGKBMODE: /* get keyboard translation mode */
SCARG(uap, cmd) = KDGKBMODE;
/* printf("ioctl KDGKBMODE = %x\n", SCARG(uap, cmd));*/
return ioctl(p, (struct ioctl_args *)uap, retval);
return ioctl(p, (struct ioctl_args *)uap);
case IBCS2_KDSKBMODE: /* set keyboard translation mode */
SCARG(uap, cmd) = KDSKBMODE;
return ioctl(p, (struct ioctl_args *)uap, retval);
return ioctl(p, (struct ioctl_args *)uap);
case IBCS2_KDMKTONE: /* sound tone */
SCARG(uap, cmd) = KDMKTONE;
return ioctl(p, (struct ioctl_args *)uap, retval);
return ioctl(p, (struct ioctl_args *)uap);
case IBCS2_KDGETMODE: /* get text/graphics mode */
SCARG(uap, cmd) = KDGETMODE;
return ioctl(p, (struct ioctl_args *)uap, retval);
return ioctl(p, (struct ioctl_args *)uap);
case IBCS2_KDSETMODE: /* set text/graphics mode */
SCARG(uap, cmd) = KDSETMODE;
return ioctl(p, (struct ioctl_args *)uap, retval);
return ioctl(p, (struct ioctl_args *)uap);
case IBCS2_KDSBORDER: /* set ega color border */
SCARG(uap, cmd) = KDSBORDER;
return ioctl(p, (struct ioctl_args *)uap, retval);
return ioctl(p, (struct ioctl_args *)uap);
case IBCS2_KDGKBSTATE:
SCARG(uap, cmd) = KDGKBSTATE;
return ioctl(p, (struct ioctl_args *)uap, retval);
return ioctl(p, (struct ioctl_args *)uap);
case IBCS2_KDSETRAD:
SCARG(uap, cmd) = KDSETRAD;
return ioctl(p, (struct ioctl_args *)uap, retval);
return ioctl(p, (struct ioctl_args *)uap);
case IBCS2_KDENABIO: /* enable direct I/O to ports */
SCARG(uap, cmd) = KDENABIO;
return ioctl(p, (struct ioctl_args *)uap, retval);
return ioctl(p, (struct ioctl_args *)uap);
case IBCS2_KDDISABIO: /* disable direct I/O to ports */
SCARG(uap, cmd) = KDDISABIO;
return ioctl(p, (struct ioctl_args *)uap, retval);
return ioctl(p, (struct ioctl_args *)uap);
case IBCS2_KIOCSOUND: /* start sound generation */
SCARG(uap, cmd) = KIOCSOUND;
return ioctl(p, (struct ioctl_args *)uap, retval);
return ioctl(p, (struct ioctl_args *)uap);
case IBCS2_KDGKBTYPE: /* get keyboard type */
SCARG(uap, cmd) = KDGKBTYPE;
return ioctl(p, (struct ioctl_args *)uap, retval);
return ioctl(p, (struct ioctl_args *)uap);
case IBCS2_KDGETLED: /* get keyboard LED status */
SCARG(uap, cmd) = KDGETLED;
return ioctl(p, (struct ioctl_args *)uap, retval);
return ioctl(p, (struct ioctl_args *)uap);
case IBCS2_KDSETLED: /* set keyboard LED status */
SCARG(uap, cmd) = KDSETLED;
return ioctl(p, (struct ioctl_args *)uap, retval);
return ioctl(p, (struct ioctl_args *)uap);
/* Xenix keyboard and display ioctl's from sys/kd.h -- type 'k' */
case IBCS2_GETFKEY: /* Get function key */
SCARG(uap, cmd) = GETFKEY;
return ioctl(p, (struct ioctl_args *)uap, retval);
return ioctl(p, (struct ioctl_args *)uap);
case IBCS2_SETFKEY: /* Set function key */
SCARG(uap, cmd) = SETFKEY;
return ioctl(p, (struct ioctl_args *)uap, retval);
return ioctl(p, (struct ioctl_args *)uap);
case IBCS2_GIO_SCRNMAP: /* Get screen output map table */
SCARG(uap, cmd) = GIO_SCRNMAP;
return ioctl(p, (struct ioctl_args *)uap, retval);
return ioctl(p, (struct ioctl_args *)uap);
case IBCS2_PIO_SCRNMAP: /* Set screen output map table */
SCARG(uap, cmd) = PIO_SCRNMAP;
return ioctl(p, (struct ioctl_args *)uap, retval);
return ioctl(p, (struct ioctl_args *)uap);
case IBCS2_GIO_KEYMAP: /* Get keyboard map table */
SCARG(uap, cmd) = GIO_KEYMAP;
return ioctl(p, (struct ioctl_args *)uap, retval);
return ioctl(p, (struct ioctl_args *)uap);
case IBCS2_PIO_KEYMAP: /* Set keyboard map table */
SCARG(uap, cmd) = PIO_KEYMAP;
return ioctl(p, (struct ioctl_args *)uap, retval);
return ioctl(p, (struct ioctl_args *)uap);
/* socksys */
case IBCS2_SIOCSOCKSYS:
return ibcs2_socksys(p, (struct ibcs2_socksys_args *)uap,
retval);
return ibcs2_socksys(p, (struct ibcs2_socksys_args *)uap);
case IBCS2_I_NREAD: /* STREAMS */
SCARG(uap, cmd) = FIONREAD;
return ioctl(p, (struct ioctl_args *)uap, retval);
return ioctl(p, (struct ioctl_args *)uap);
default:
DPRINTF(("ibcs2_ioctl(%d): unknown cmd 0x%lx ",

View File

@ -22,7 +22,7 @@
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
* $Id: ibcs2_ipc.c,v 1.11 1997/03/24 11:23:31 bde Exp $
* $Id: ibcs2_ipc.c,v 1.12 1997/07/20 09:39:42 bde Exp $
*/
#include <sys/param.h>
@ -100,15 +100,14 @@ struct msqid_ds *bp;
}
int
ibcs2_msgsys(p, uap, retval)
ibcs2_msgsys(p, uap)
struct proc *p;
struct ibcs2_msgsys_args *uap;
int *retval;
{
switch (SCARG(uap, which)) {
case 0: /* msgget */
SCARG(uap, which) = 1;
return msgsys(p, (struct msgsys_args *)uap, retval);
return msgsys(p, (struct msgsys_args *)uap);
case 1: { /* msgctl */
int error;
struct msgsys_args margs;
@ -121,7 +120,7 @@ ibcs2_msgsys(p, uap, retval)
SCARG(&margs, a3) = SCARG(uap, a3);
switch (SCARG(&margs, a3)) {
case IBCS2_IPC_STAT:
error = msgsys(p, &margs, retval);
error = msgsys(p, &margs);
if (!error)
cvt_msqid2imsqid(
(struct msqid_ds *)SCARG(&margs, a4),
@ -131,18 +130,18 @@ ibcs2_msgsys(p, uap, retval)
cvt_imsqid2msqid((struct ibcs2_msqid_ds *)SCARG(uap,
a4),
(struct msqid_ds *)SCARG(&margs, a4));
return msgsys(p, &margs, retval);
return msgsys(p, &margs);
case IBCS2_IPC_RMID:
return msgsys(p, &margs, retval);
return msgsys(p, &margs);
}
return EINVAL;
}
case 2: /* msgrcv */
SCARG(uap, which) = 3;
return msgsys(p, (struct msgsys_args *)uap, retval);
return msgsys(p, (struct msgsys_args *)uap);
case 3: /* msgsnd */
SCARG(uap, which) = 2;
return msgsys(p, (struct msgsys_args *)uap, retval);
return msgsys(p, (struct msgsys_args *)uap);
default:
return EINVAL;
}
@ -204,10 +203,9 @@ struct semid_ds *bp;
}
int
ibcs2_semsys(p, uap, retval)
ibcs2_semsys(p, uap)
struct proc *p;
struct ibcs2_semsys_args *uap;
int *retval;
{
int error;
@ -223,7 +221,7 @@ ibcs2_semsys(p, uap, retval)
isp = (struct ibcs2_semid_ds *)SCARG(uap, a5);
sp = stackgap_alloc(&sg, sizeof(struct semid_ds));
SCARG(uap, a5) = (int)sp;
error = semsys(p, (struct semsys_args *)uap, retval);
error = semsys(p, (struct semsys_args *)uap);
if (!error) {
SCARG(uap, a5) = (int)isp;
isp = stackgap_alloc(&sg, sizeof(*isp));
@ -248,7 +246,7 @@ ibcs2_semsys(p, uap, retval)
return error;
cvt_isemid2semid(isp, sp);
SCARG(uap, a5) = (int)sp;
return semsys(p, (struct semsys_args *)uap, retval);
return semsys(p, (struct semsys_args *)uap);
}
case IBCS2_SETVAL:
{
@ -258,17 +256,17 @@ ibcs2_semsys(p, uap, retval)
sp = stackgap_alloc(&sg, sizeof(*sp));
sp->val = (int) SCARG(uap, a5);
SCARG(uap, a5) = (int)sp;
return semsys(p, (struct semsys_args *)uap, retval);
return semsys(p, (struct semsys_args *)uap);
}
}
return semsys(p, (struct semsys_args *)uap, retval);
return semsys(p, (struct semsys_args *)uap);
case 1: /* semget */
return semsys(p, (struct semsys_args *)uap, retval);
return semsys(p, (struct semsys_args *)uap);
case 2: /* semop */
return semsys(p, (struct semsys_args *)uap, retval);
return semsys(p, (struct semsys_args *)uap);
}
return EINVAL;
}
@ -313,16 +311,15 @@ struct shmid_ds *bp;
}
int
ibcs2_shmsys(p, uap, retval)
ibcs2_shmsys(p, uap)
struct proc *p;
struct ibcs2_shmsys_args *uap;
int *retval;
{
int error;
switch (SCARG(uap, which)) {
case 0: /* shmat */
return shmsys(p, (struct shmsys_args *)uap, retval);
return shmsys(p, (struct shmsys_args *)uap);
case 1: /* shmctl */
switch(SCARG(uap, a3)) {
@ -335,7 +332,7 @@ ibcs2_shmsys(p, uap, retval)
isp = (struct ibcs2_shmid_ds *)SCARG(uap, a4);
sp = stackgap_alloc(&sg, sizeof(*sp));
SCARG(uap, a4) = (int)sp;
error = shmsys(p, (struct shmsys_args *)uap, retval);
error = shmsys(p, (struct shmsys_args *)uap);
if (!error) {
SCARG(uap, a4) = (int)isp;
isp = stackgap_alloc(&sg, sizeof(*isp));
@ -360,17 +357,17 @@ ibcs2_shmsys(p, uap, retval)
return error;
cvt_ishmid2shmid(isp, sp);
SCARG(uap, a4) = (int)sp;
return shmsys(p, (struct shmsys_args *)uap, retval);
return shmsys(p, (struct shmsys_args *)uap);
}
}
return shmsys(p, (struct shmsys_args *)uap, retval);
return shmsys(p, (struct shmsys_args *)uap);
case 2: /* shmdt */
return shmsys(p, (struct shmsys_args *)uap, retval);
return shmsys(p, (struct shmsys_args *)uap);
case 3: /* shmget */
return shmsys(p, (struct shmsys_args *)uap, retval);
return shmsys(p, (struct shmsys_args *)uap);
}
return EINVAL;
}

View File

@ -27,7 +27,7 @@
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
* $Id: ibcs2_isc.c,v 1.9 1997/05/07 20:05:44 peter Exp $
* $Id: ibcs2_isc.c,v 1.10 1997/07/20 09:39:43 bde Exp $
*/
#include <sys/param.h>
@ -44,7 +44,7 @@
extern struct sysent isc_sysent[];
int
ibcs2_isc(struct proc *p, struct ibcs2_isc_args *uap, int *retval)
ibcs2_isc(struct proc *p, struct ibcs2_isc_args *uap)
{
struct trapframe *tf = p->p_md.md_regs;
struct sysent *callp;
@ -54,7 +54,7 @@ ibcs2_isc(struct proc *p, struct ibcs2_isc_args *uap, int *retval)
callp = &isc_sysent[code];
if(code < IBCS2_ISC_MAXSYSCALL)
return((*callp->sy_call)(p, (void *)uap, retval));
return((*callp->sy_call)(p, (void *)uap));
else
return ENOSYS;
}

View File

@ -45,7 +45,7 @@
*
* @(#)sun_misc.c 8.1 (Berkeley) 6/18/93
*
* $Id: ibcs2_misc.c,v 1.22 1997/07/20 09:39:44 bde Exp $
* $Id: ibcs2_misc.c,v 1.23 1997/08/25 21:56:23 bde Exp $
*/
/*
@ -85,10 +85,9 @@
int
ibcs2_ulimit(p, uap, retval)
ibcs2_ulimit(p, uap)
struct proc *p;
struct ibcs2_ulimit_args *uap;
int *retval;
{
#ifdef notyet
int error;
@ -105,31 +104,30 @@ ibcs2_ulimit(p, uap, retval)
switch (SCARG(uap, cmd)) {
case IBCS2_GETFSIZE:
*retval = p->p_rlimit[RLIMIT_FSIZE].rlim_cur;
if (*retval == -1) *retval = 0x7fffffff;
p->p_retval[0] = p->p_rlimit[RLIMIT_FSIZE].rlim_cur;
if (p->p_retval[0] == -1) p->p_retval[0] = 0x7fffffff;
return 0;
case IBCS2_SETFSIZE: /* XXX - fix this */
#ifdef notyet
rl.rlim_cur = SCARG(uap, newlimit);
sra.resource = RLIMIT_FSIZE;
sra.rlp = &rl;
error = setrlimit(p, &sra, retval);
error = setrlimit(p, &sra);
if (!error)
*retval = p->p_rlimit[RLIMIT_FSIZE].rlim_cur;
p->p_retval[0] = p->p_rlimit[RLIMIT_FSIZE].rlim_cur;
else
DPRINTF(("failed "));
return error;
#else
*retval = SCARG(uap, newlimit);
p->p_retval[0] = SCARG(uap, newlimit);
return 0;
#endif
case IBCS2_GETPSIZE:
*retval = p->p_rlimit[RLIMIT_RSS].rlim_cur; /* XXX */
p->p_retval[0] = p->p_rlimit[RLIMIT_RSS].rlim_cur; /* XXX */
return 0;
case IBCS2_GETDTABLESIZE:
uap->cmd = IBCS2_SC_OPEN_MAX;
return ibcs2_sysconf(p, (struct ibcs2_sysconf_args *)uap,
retval);
return ibcs2_sysconf(p, (struct ibcs2_sysconf_args *)uap);
default:
return ENOSYS;
}
@ -138,10 +136,9 @@ ibcs2_ulimit(p, uap, retval)
#define IBCS2_WSTOPPED 0177
#define IBCS2_STOPCODE(sig) ((sig) << 8 | IBCS2_WSTOPPED)
int
ibcs2_wait(p, uap, retval)
ibcs2_wait(p, uap)
struct proc *p;
struct ibcs2_wait_args *uap;
int *retval;
{
int error, status;
struct wait_args w4;
@ -160,7 +157,7 @@ ibcs2_wait(p, uap, retval)
SCARG(&w4, status) = (int *)SCARG(uap, a1);
SCARG(&w4, options) = 0;
}
if ((error = wait4(p, &w4, retval)) != 0)
if ((error = wait4(p, &w4)) != 0)
return error;
if (SCARG(&w4, status)) { /* this is real iBCS brain-damage */
error = copyin((caddr_t)SCARG(&w4, status), (caddr_t)&status,
@ -177,7 +174,7 @@ ibcs2_wait(p, uap, retval)
/* else exit status -- identical */
/* record result/status */
retval[1] = status;
p->p_retval[1] = status;
return copyout((caddr_t)&status, (caddr_t)SCARG(&w4, status),
sizeof(SCARG(&w4, status)));
}
@ -186,10 +183,9 @@ ibcs2_wait(p, uap, retval)
}
int
ibcs2_execv(p, uap, retval)
ibcs2_execv(p, uap)
struct proc *p;
struct ibcs2_execv_args *uap;
int *retval;
{
struct execve_args ea;
caddr_t sg = stackgap_init();
@ -198,38 +194,35 @@ ibcs2_execv(p, uap, retval)
SCARG(&ea, fname) = SCARG(uap, path);
SCARG(&ea, argv) = SCARG(uap, argp);
SCARG(&ea, envv) = NULL;
return execve(p, &ea, retval);
return execve(p, &ea);
}
int
ibcs2_execve(p, uap, retval)
ibcs2_execve(p, uap)
struct proc *p;
struct ibcs2_execve_args *uap;
int *retval;
{
caddr_t sg = stackgap_init();
CHECKALTEXIST(p, &sg, SCARG(uap, path));
return execve(p, (struct execve_args *)uap, retval);
return execve(p, (struct execve_args *)uap);
}
int
ibcs2_umount(p, uap, retval)
ibcs2_umount(p, uap)
struct proc *p;
struct ibcs2_umount_args *uap;
int *retval;
{
struct unmount_args um;
SCARG(&um, path) = SCARG(uap, name);
SCARG(&um, flags) = 0;
return unmount(p, &um, retval);
return unmount(p, &um);
}
int
ibcs2_mount(p, uap, retval)
ibcs2_mount(p, uap)
struct proc *p;
struct ibcs2_mount_args *uap;
int *retval;
{
#ifdef notyet
int oflags = SCARG(uap, flags), nflags, error;
@ -285,7 +278,7 @@ ibcs2_mount(p, uap, retval)
if (error = copyout(&na, SCARG(uap, data), sizeof na))
return (error);
}
return (mount(p, uap, retval));
return (mount(p, uap));
#else
return EINVAL;
#endif
@ -300,10 +293,9 @@ ibcs2_mount(p, uap, retval)
*/
int
ibcs2_getdents(p, uap, retval)
ibcs2_getdents(p, uap)
struct proc *p;
register struct ibcs2_getdents_args *uap;
int *retval;
{
register struct vnode *vp;
register caddr_t inp, buf; /* BSD-format */
@ -432,7 +424,7 @@ ibcs2_getdents(p, uap, retval)
goto again;
fp->f_offset = off; /* update the vnode offset */
eof:
*retval = SCARG(uap, nbytes) - resid;
p->p_retval[0] = SCARG(uap, nbytes) - resid;
out:
if (cookies)
free(cookies, M_TEMP);
@ -442,10 +434,9 @@ ibcs2_getdents(p, uap, retval)
}
int
ibcs2_read(p, uap, retval)
ibcs2_read(p, uap)
struct proc *p;
struct ibcs2_read_args *uap;
int *retval;
{
register struct vnode *vp;
register caddr_t inp, buf; /* BSD-format */
@ -466,7 +457,7 @@ ibcs2_read(p, uap, retval)
if (error = getvnode(p->p_fd, SCARG(uap, fd), &fp)) {
if (error == EINVAL)
return read(p, (struct read_args *)uap, retval);
return read(p, (struct read_args *)uap);
else
return error;
}
@ -474,7 +465,7 @@ ibcs2_read(p, uap, retval)
return (EBADF);
vp = (struct vnode *)fp->f_data;
if (vp->v_type != VDIR)
return read(p, (struct read_args *)uap, retval);
return read(p, (struct read_args *)uap);
DPRINTF(("ibcs2_read: read directory\n"));
@ -584,7 +575,7 @@ ibcs2_read(p, uap, retval)
goto again;
fp->f_offset = off; /* update the vnode offset */
eof:
*retval = SCARG(uap, nbytes) - resid;
p->p_retval[0] = SCARG(uap, nbytes) - resid;
out:
if (cookies)
free(cookies, M_TEMP);
@ -594,10 +585,9 @@ ibcs2_read(p, uap, retval)
}
int
ibcs2_mknod(p, uap, retval)
ibcs2_mknod(p, uap)
struct proc *p;
struct ibcs2_mknod_args *uap;
int *retval;
{
caddr_t sg = stackgap_init();
@ -606,21 +596,20 @@ ibcs2_mknod(p, uap, retval)
struct mkfifo_args ap;
SCARG(&ap, path) = SCARG(uap, path);
SCARG(&ap, mode) = SCARG(uap, mode);
return mkfifo(p, &ap, retval);
return mkfifo(p, &ap);
} else {
struct mknod_args ap;
SCARG(&ap, path) = SCARG(uap, path);
SCARG(&ap, mode) = SCARG(uap, mode);
SCARG(&ap, dev) = SCARG(uap, dev);
return mknod(p, &ap, retval);
return mknod(p, &ap);
}
}
int
ibcs2_getgroups(p, uap, retval)
ibcs2_getgroups(p, uap)
struct proc *p;
struct ibcs2_getgroups_args *uap;
int *retval;
{
int error, i;
ibcs2_gid_t *iset;
@ -635,25 +624,24 @@ ibcs2_getgroups(p, uap, retval)
iset = stackgap_alloc(&sg, SCARG(uap, gidsetsize) *
sizeof(ibcs2_gid_t));
}
if (error = getgroups(p, &sa, retval))
if (error = getgroups(p, &sa))
return error;
if (SCARG(uap, gidsetsize) == 0)
return 0;
for (i = 0, gp = SCARG(&sa, gidset); i < retval[0]; i++)
for (i = 0, gp = SCARG(&sa, gidset); i < p->p_retval[0]; i++)
iset[i] = (ibcs2_gid_t)*gp++;
if (retval[0] && (error = copyout((caddr_t)iset,
if (p->p_retval[0] && (error = copyout((caddr_t)iset,
(caddr_t)SCARG(uap, gidset),
sizeof(ibcs2_gid_t) * retval[0])))
sizeof(ibcs2_gid_t) * p->p_retval[0])))
return error;
return 0;
}
int
ibcs2_setgroups(p, uap, retval)
ibcs2_setgroups(p, uap)
struct proc *p;
struct ibcs2_setgroups_args *uap;
int *retval;
{
int error, i;
ibcs2_gid_t *iset;
@ -674,43 +662,40 @@ ibcs2_setgroups(p, uap, retval)
}
for (i = 0, gp = SCARG(&sa, gidset); i < SCARG(&sa, gidsetsize); i++)
*gp++ = (gid_t)iset[i];
return setgroups(p, &sa, retval);
return setgroups(p, &sa);
}
int
ibcs2_setuid(p, uap, retval)
ibcs2_setuid(p, uap)
struct proc *p;
struct ibcs2_setuid_args *uap;
int *retval;
{
struct setuid_args sa;
SCARG(&sa, uid) = (uid_t)SCARG(uap, uid);
return setuid(p, &sa, retval);
return setuid(p, &sa);
}
int
ibcs2_setgid(p, uap, retval)
ibcs2_setgid(p, uap)
struct proc *p;
struct ibcs2_setgid_args *uap;
int *retval;
{
struct setgid_args sa;
SCARG(&sa, gid) = (gid_t)SCARG(uap, gid);
return setgid(p, &sa, retval);
return setgid(p, &sa);
}
int
ibcs2_time(p, uap, retval)
ibcs2_time(p, uap)
struct proc *p;
struct ibcs2_time_args *uap;
int *retval;
{
struct timeval tv;
microtime(&tv);
*retval = tv.tv_sec;
p->p_retval[0] = tv.tv_sec;
if (SCARG(uap, tp))
return copyout((caddr_t)&tv.tv_sec, (caddr_t)SCARG(uap, tp),
sizeof(ibcs2_time_t));
@ -719,30 +704,27 @@ ibcs2_time(p, uap, retval)
}
int
ibcs2_pathconf(p, uap, retval)
ibcs2_pathconf(p, uap)
struct proc *p;
struct ibcs2_pathconf_args *uap;
int *retval;
{
SCARG(uap, name)++; /* iBCS2 _PC_* defines are offset by one */
return pathconf(p, (struct pathconf_args *)uap, retval);
return pathconf(p, (struct pathconf_args *)uap);
}
int
ibcs2_fpathconf(p, uap, retval)
ibcs2_fpathconf(p, uap)
struct proc *p;
struct ibcs2_fpathconf_args *uap;
int *retval;
{
SCARG(uap, name)++; /* iBCS2 _PC_* defines are offset by one */
return fpathconf(p, (struct fpathconf_args *)uap, retval);
return fpathconf(p, (struct fpathconf_args *)uap);
}
int
ibcs2_sysconf(p, uap, retval)
ibcs2_sysconf(p, uap)
struct proc *p;
struct ibcs2_sysconf_args *uap;
int *retval;
{
int mib[2], value, len, error;
struct sysctl_args sa;
@ -759,14 +741,14 @@ ibcs2_sysconf(p, uap, retval)
SCARG(&ga, which) = RLIMIT_NPROC;
SCARG(&ga, rlp) = stackgap_alloc(&sg, sizeof(struct rlimit *));
if (error = getrlimit(p, &ga, retval))
if (error = getrlimit(p, &ga))
return error;
*retval = SCARG(&ga, rlp)->rlim_cur;
p->p_retval[0] = SCARG(&ga, rlp)->rlim_cur;
return 0;
}
case IBCS2_SC_CLK_TCK:
*retval = hz;
p->p_retval[0] = hz;
return 0;
case IBCS2_SC_NGROUPS_MAX:
@ -779,9 +761,9 @@ ibcs2_sysconf(p, uap, retval)
SCARG(&ga, which) = RLIMIT_NOFILE;
SCARG(&ga, rlp) = stackgap_alloc(&sg, sizeof(struct rlimit *));
if (error = getrlimit(p, &ga, retval))
if (error = getrlimit(p, &ga))
return error;
*retval = SCARG(&ga, rlp)->rlim_cur;
p->p_retval[0] = SCARG(&ga, rlp)->rlim_cur;
return 0;
}
@ -798,11 +780,11 @@ ibcs2_sysconf(p, uap, retval)
break;
case IBCS2_SC_PASS_MAX:
*retval = 128; /* XXX - should we create PASS_MAX ? */
p->p_retval[0] = 128; /* XXX - should we create PASS_MAX ? */
return 0;
case IBCS2_SC_XOPEN_VERSION:
*retval = 2; /* XXX: What should that be? */
p->p_retval[0] = 2; /* XXX: What should that be? */
return 0;
default:
@ -817,17 +799,16 @@ ibcs2_sysconf(p, uap, retval)
SCARG(&sa, oldlenp) = &len;
SCARG(&sa, new) = NULL;
SCARG(&sa, newlen) = 0;
if (error = __sysctl(p, &sa, retval))
if (error = __sysctl(p, &sa))
return error;
*retval = value;
p->p_retval[0] = value;
return 0;
}
int
ibcs2_alarm(p, uap, retval)
ibcs2_alarm(p, uap)
struct proc *p;
struct ibcs2_alarm_args *uap;
int *retval;
{
int error;
struct itimerval *itp, *oitp;
@ -843,20 +824,19 @@ ibcs2_alarm(p, uap, retval)
SCARG(&sa, which) = ITIMER_REAL;
SCARG(&sa, itv) = itp;
SCARG(&sa, oitv) = oitp;
error = setitimer(p, &sa, retval);
error = setitimer(p, &sa);
if (error)
return error;
if (oitp->it_value.tv_usec)
oitp->it_value.tv_sec++;
*retval = oitp->it_value.tv_sec;
p->p_retval[0] = oitp->it_value.tv_sec;
return 0;
}
int
ibcs2_times(p, uap, retval)
ibcs2_times(p, uap)
struct proc *p;
struct ibcs2_times_args *uap;
int *retval;
{
int error;
struct getrusage_args ga;
@ -868,31 +848,30 @@ ibcs2_times(p, uap, retval)
SCARG(&ga, who) = RUSAGE_SELF;
SCARG(&ga, rusage) = ru;
error = getrusage(p, &ga, retval);
error = getrusage(p, &ga);
if (error)
return error;
tms.tms_utime = CONVTCK(ru->ru_utime);
tms.tms_stime = CONVTCK(ru->ru_stime);
SCARG(&ga, who) = RUSAGE_CHILDREN;
error = getrusage(p, &ga, retval);
error = getrusage(p, &ga);
if (error)
return error;
tms.tms_cutime = CONVTCK(ru->ru_utime);
tms.tms_cstime = CONVTCK(ru->ru_stime);
microtime(&t);
*retval = CONVTCK(t);
p->p_retval[0] = CONVTCK(t);
return copyout((caddr_t)&tms, (caddr_t)SCARG(uap, tp),
sizeof(struct tms));
}
int
ibcs2_stime(p, uap, retval)
ibcs2_stime(p, uap)
struct proc *p;
struct ibcs2_stime_args *uap;
int *retval;
{
int error;
struct settimeofday_args sa;
@ -904,16 +883,15 @@ ibcs2_stime(p, uap, retval)
&(SCARG(&sa, tv)->tv_sec), sizeof(long)))
return error;
SCARG(&sa, tv)->tv_usec = 0;
if (error = settimeofday(p, &sa, retval))
if (error = settimeofday(p, &sa))
return EPERM;
return 0;
}
int
ibcs2_utime(p, uap, retval)
ibcs2_utime(p, uap)
struct proc *p;
struct ibcs2_utime_args *uap;
int *retval;
{
int error;
struct utimes_args sa;
@ -938,14 +916,13 @@ ibcs2_utime(p, uap, retval)
tp->tv_usec = 0;
} else
SCARG(&sa, tptr) = NULL;
return utimes(p, &sa, retval);
return utimes(p, &sa);
}
int
ibcs2_nice(p, uap, retval)
ibcs2_nice(p, uap)
struct proc *p;
struct ibcs2_nice_args *uap;
int *retval;
{
int error;
struct setpriority_args sa;
@ -953,9 +930,9 @@ ibcs2_nice(p, uap, retval)
SCARG(&sa, which) = PRIO_PROCESS;
SCARG(&sa, who) = 0;
SCARG(&sa, prio) = p->p_nice + SCARG(uap, incr);
if (error = setpriority(p, &sa, retval))
if (error = setpriority(p, &sa))
return EPERM;
*retval = p->p_nice;
p->p_retval[0] = p->p_nice;
return 0;
}
@ -964,14 +941,13 @@ ibcs2_nice(p, uap, retval)
*/
int
ibcs2_pgrpsys(p, uap, retval)
ibcs2_pgrpsys(p, uap)
struct proc *p;
struct ibcs2_pgrpsys_args *uap;
int *retval;
{
switch (SCARG(uap, type)) {
case 0: /* getpgrp */
*retval = p->p_pgrp->pg_id;
p->p_retval[0] = p->p_pgrp->pg_id;
return 0;
case 1: /* setpgrp */
@ -980,8 +956,8 @@ ibcs2_pgrpsys(p, uap, retval)
SCARG(&sa, pid) = 0;
SCARG(&sa, pgid) = 0;
setpgid(p, &sa, retval);
*retval = p->p_pgrp->pg_id;
setpgid(p, &sa);
p->p_retval[0] = p->p_pgrp->pg_id;
return 0;
}
@ -991,11 +967,11 @@ ibcs2_pgrpsys(p, uap, retval)
SCARG(&sa, pid) = SCARG(uap, pid);
SCARG(&sa, pgid) = SCARG(uap, pgid);
return setpgid(p, &sa, retval);
return setpgid(p, &sa);
}
case 3: /* setsid */
return setsid(p, NULL, retval);
return setsid(p, NULL);
default:
return EINVAL;
@ -1007,10 +983,9 @@ ibcs2_pgrpsys(p, uap, retval)
*/
int
ibcs2_plock(p, uap, retval)
ibcs2_plock(p, uap)
struct proc *p;
struct ibcs2_plock_args *uap;
int *retval;
{
int error;
#define IBCS2_UNLOCK 0
@ -1032,10 +1007,9 @@ ibcs2_plock(p, uap, retval)
}
int
ibcs2_uadmin(p, uap, retval)
ibcs2_uadmin(p, uap)
struct proc *p;
struct ibcs2_uadmin_args *uap;
int *retval;
{
#define SCO_A_REBOOT 1
#define SCO_A_SHUTDOWN 2
@ -1067,11 +1041,11 @@ ibcs2_uadmin(p, uap, retval)
case SCO_AD_PWRDOWN:
case SCO_AD_PWRNAP:
r.opt = RB_HALT;
reboot(p, &r, retval);
reboot(p, &r);
case SCO_AD_BOOT:
case SCO_AD_IBOOT:
r.opt = RB_AUTOBOOT;
reboot(p, &r, retval);
reboot(p, &r);
}
return EINVAL;
case SCO_A_REMOUNT:
@ -1085,10 +1059,9 @@ ibcs2_uadmin(p, uap, retval)
}
int
ibcs2_sysfs(p, uap, retval)
ibcs2_sysfs(p, uap)
struct proc *p;
struct ibcs2_sysfs_args *uap;
int *retval;
{
#define IBCS2_GETFSIND 1
#define IBCS2_GETFSTYP 2
@ -1104,111 +1077,102 @@ ibcs2_sysfs(p, uap, retval)
}
int
ibcs2_unlink(p, uap, retval)
ibcs2_unlink(p, uap)
struct proc *p;
struct ibcs2_unlink_args *uap;
int *retval;
{
caddr_t sg = stackgap_init();
CHECKALTEXIST(p, &sg, SCARG(uap, path));
return unlink(p, (struct unlink_args *)uap, retval);
return unlink(p, (struct unlink_args *)uap);
}
int
ibcs2_chdir(p, uap, retval)
ibcs2_chdir(p, uap)
struct proc *p;
struct ibcs2_chdir_args *uap;
int *retval;
{
caddr_t sg = stackgap_init();
CHECKALTEXIST(p, &sg, SCARG(uap, path));
return chdir(p, (struct chdir_args *)uap, retval);
return chdir(p, (struct chdir_args *)uap);
}
int
ibcs2_chmod(p, uap, retval)
ibcs2_chmod(p, uap)
struct proc *p;
struct ibcs2_chmod_args *uap;
int *retval;
{
caddr_t sg = stackgap_init();
CHECKALTEXIST(p, &sg, SCARG(uap, path));
return chmod(p, (struct chmod_args *)uap, retval);
return chmod(p, (struct chmod_args *)uap);
}
int
ibcs2_chown(p, uap, retval)
ibcs2_chown(p, uap)
struct proc *p;
struct ibcs2_chown_args *uap;
int *retval;
{
caddr_t sg = stackgap_init();
CHECKALTEXIST(p, &sg, SCARG(uap, path));
return chown(p, (struct chown_args *)uap, retval);
return chown(p, (struct chown_args *)uap);
}
int
ibcs2_rmdir(p, uap, retval)
ibcs2_rmdir(p, uap)
struct proc *p;
struct ibcs2_rmdir_args *uap;
int *retval;
{
caddr_t sg = stackgap_init();
CHECKALTEXIST(p, &sg, SCARG(uap, path));
return rmdir(p, (struct rmdir_args *)uap, retval);
return rmdir(p, (struct rmdir_args *)uap);
}
int
ibcs2_mkdir(p, uap, retval)
ibcs2_mkdir(p, uap)
struct proc *p;
struct ibcs2_mkdir_args *uap;
int *retval;
{
caddr_t sg = stackgap_init();
CHECKALTCREAT(p, &sg, SCARG(uap, path));
return mkdir(p, (struct mkdir_args *)uap, retval);
return mkdir(p, (struct mkdir_args *)uap);
}
int
ibcs2_symlink(p, uap, retval)
ibcs2_symlink(p, uap)
struct proc *p;
struct ibcs2_symlink_args *uap;
int *retval;
{
caddr_t sg = stackgap_init();
CHECKALTEXIST(p, &sg, SCARG(uap, path));
CHECKALTCREAT(p, &sg, SCARG(uap, link));
return symlink(p, (struct symlink_args *)uap, retval);
return symlink(p, (struct symlink_args *)uap);
}
int
ibcs2_rename(p, uap, retval)
ibcs2_rename(p, uap)
struct proc *p;
struct ibcs2_rename_args *uap;
int *retval;
{
caddr_t sg = stackgap_init();
CHECKALTEXIST(p, &sg, SCARG(uap, from));
CHECKALTCREAT(p, &sg, SCARG(uap, to));
return rename(p, (struct rename_args *)uap, retval);
return rename(p, (struct rename_args *)uap);
}
int
ibcs2_readlink(p, uap, retval)
ibcs2_readlink(p, uap)
struct proc *p;
struct ibcs2_readlink_args *uap;
int *retval;
{
caddr_t sg = stackgap_init();
CHECKALTEXIST(p, &sg, SCARG(uap, path));
return readlink(p, (struct readlink_args *) uap, retval);
return readlink(p, (struct readlink_args *) uap);
}

View File

@ -21,7 +21,7 @@
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
* $Id: ibcs2_msg.c,v 1.3 1997/02/22 09:33:23 peter Exp $
* $Id: ibcs2_msg.c,v 1.4 1997/07/20 09:39:44 bde Exp $
*/
/*
@ -41,29 +41,26 @@
int
ibcs2_getmsg(p, uap, retval)
ibcs2_getmsg(p, uap)
struct proc *p;
struct ibcs2_getmsg_args *uap;
int *retval;
{
return 0; /* fake */
}
int
ibcs2_putmsg(p, uap, retval)
ibcs2_putmsg(p, uap)
struct proc *p;
struct ibcs2_putmsg_args *uap;
int *retval;
{
return 0; /* fake */
}
int
ibcs2_poll(p, uap, retval)
ibcs2_poll(p, uap)
struct proc *p;
struct ibcs2_poll_args *uap;
int *retval;
{
int error, i;
fd_set *readfds, *writefds, *exceptfds;
@ -110,12 +107,12 @@ ibcs2_poll(p, uap, retval)
FD_SET(conv.fd, writefds);
FD_SET(conv.fd, exceptfds);
}
if (error = select(p, &tmp_select, retval))
if (error = select(p, &tmp_select))
return error;
if (*retval == 0)
if (p->p_retval[0] == 0)
return 0;
*retval = 0;
for (*retval = 0, i = 0; i < uap->nfds; i++) {
p->p_retval[0] = 0;
for (p->p_retval[0] = 0, i = 0; i < uap->nfds; i++) {
copyin(uap->fds + i*sizeof(struct ibcs2_poll),
&conv, sizeof(conv));
conv.revents = 0;
@ -130,7 +127,7 @@ ibcs2_poll(p, uap, retval)
if (FD_ISSET(conv.fd, exceptfds))
conv.revents |= IBCS2_POLLERR;
if (conv.revents)
++*retval;
++p->p_retval[0];
}
if (error = copyout(&conv,
uap->fds + i*sizeof(struct ibcs2_poll),

View File

@ -21,7 +21,7 @@
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
* $Id: ibcs2_other.c,v 1.6 1997/07/20 09:39:45 bde Exp $
* $Id: ibcs2_other.c,v 1.7 1997/08/25 21:57:55 bde Exp $
*/
/*
@ -41,12 +41,12 @@
#define IBCS2_SECURE_SETLUID 2
int
ibcs2_secure(struct proc *p, struct ibcs2_secure_args *uap, int *retval)
ibcs2_secure(struct proc *p, struct ibcs2_secure_args *uap)
{
switch (uap->cmd) {
case IBCS2_SECURE_GETLUID: /* get login uid */
*retval = p->p_ucred->cr_uid;
p->p_retval[0] = p->p_ucred->cr_uid;
return 0;
case IBCS2_SECURE_SETLUID: /* set login uid */
@ -60,17 +60,15 @@ ibcs2_secure(struct proc *p, struct ibcs2_secure_args *uap, int *retval)
}
int
ibcs2_lseek(struct proc *p, register struct ibcs2_lseek_args *uap, int *retval)
ibcs2_lseek(struct proc *p, register struct ibcs2_lseek_args *uap)
{
struct lseek_args largs;
off_t lret;
int error;
largs.fd = uap->fd;
largs.offset = uap->offset;
largs.whence = uap->whence;
error = lseek(p, &largs, (int *)&lret);
*(long *)retval = lret;
error = lseek(p, &largs);
return (error);
}
@ -79,7 +77,7 @@ ibcs2_lseek(struct proc *p, register struct ibcs2_lseek_args *uap, int *retval)
#include <sys/un.h>
int
spx_open(struct proc *p, void *uap, int *retval)
spx_open(struct proc *p, void *uap)
{
struct socket_args sock;
struct connect_args conn;
@ -92,7 +90,7 @@ spx_open(struct proc *p, void *uap, int *retval)
sock.domain = AF_UNIX;
sock.type = SOCK_STREAM;
sock.protocol = 0;
error = socket(p, &sock, retval);
error = socket(p, &sock);
if (error)
return error;
@ -104,17 +102,17 @@ spx_open(struct proc *p, void *uap, int *retval)
strlen(Xaddr->sun_path) + 1;
copyout("/tmp/.X11-unix/X0", Xaddr->sun_path, 18);
conn.s = fd = *retval;
conn.s = fd = p->p_retval[0];
conn.name = (caddr_t)Xaddr;
conn.namelen = sizeof(struct sockaddr_un);
error = connect(p, &conn, retval);
error = connect(p, &conn);
if (error) {
struct close_args cl;
cl.fd = fd;
close(p, &cl, retval);
close(p, &cl);
return error;
}
*retval = fd;
p->p_retval[0] = fd;
return 0;
}
#endif /* SPX_HACK */

View File

@ -265,62 +265,62 @@ struct ibcs2_readlink_args {
struct ibcs2_isc_args {
int dummy;
};
int ibcs2_read __P((struct proc *, struct ibcs2_read_args *, int []));
int ibcs2_open __P((struct proc *, struct ibcs2_open_args *, int []));
int ibcs2_wait __P((struct proc *, struct ibcs2_wait_args *, int []));
int ibcs2_creat __P((struct proc *, struct ibcs2_creat_args *, int []));
int ibcs2_unlink __P((struct proc *, struct ibcs2_unlink_args *, int []));
int ibcs2_execv __P((struct proc *, struct ibcs2_execv_args *, int []));
int ibcs2_chdir __P((struct proc *, struct ibcs2_chdir_args *, int []));
int ibcs2_time __P((struct proc *, struct ibcs2_time_args *, int []));
int ibcs2_mknod __P((struct proc *, struct ibcs2_mknod_args *, int []));
int ibcs2_chmod __P((struct proc *, struct ibcs2_chmod_args *, int []));
int ibcs2_chown __P((struct proc *, struct ibcs2_chown_args *, int []));
int ibcs2_stat __P((struct proc *, struct ibcs2_stat_args *, int []));
int ibcs2_lseek __P((struct proc *, struct ibcs2_lseek_args *, int []));
int ibcs2_mount __P((struct proc *, struct ibcs2_mount_args *, int []));
int ibcs2_umount __P((struct proc *, struct ibcs2_umount_args *, int []));
int ibcs2_setuid __P((struct proc *, struct ibcs2_setuid_args *, int []));
int ibcs2_stime __P((struct proc *, struct ibcs2_stime_args *, int []));
int ibcs2_alarm __P((struct proc *, struct ibcs2_alarm_args *, int []));
int ibcs2_fstat __P((struct proc *, struct ibcs2_fstat_args *, int []));
int ibcs2_pause __P((struct proc *, struct ibcs2_pause_args *, int []));
int ibcs2_utime __P((struct proc *, struct ibcs2_utime_args *, int []));
int ibcs2_stty __P((struct proc *, struct ibcs2_stty_args *, int []));
int ibcs2_gtty __P((struct proc *, struct ibcs2_gtty_args *, int []));
int ibcs2_access __P((struct proc *, struct ibcs2_access_args *, int []));
int ibcs2_nice __P((struct proc *, struct ibcs2_nice_args *, int []));
int ibcs2_statfs __P((struct proc *, struct ibcs2_statfs_args *, int []));
int ibcs2_kill __P((struct proc *, struct ibcs2_kill_args *, int []));
int ibcs2_fstatfs __P((struct proc *, struct ibcs2_fstatfs_args *, int []));
int ibcs2_pgrpsys __P((struct proc *, struct ibcs2_pgrpsys_args *, int []));
int ibcs2_xenix __P((struct proc *, struct ibcs2_xenix_args *, int []));
int ibcs2_times __P((struct proc *, struct ibcs2_times_args *, int []));
int ibcs2_plock __P((struct proc *, struct ibcs2_plock_args *, int []));
int ibcs2_setgid __P((struct proc *, struct ibcs2_setgid_args *, int []));
int ibcs2_sigsys __P((struct proc *, struct ibcs2_sigsys_args *, int []));
int ibcs2_msgsys __P((struct proc *, struct ibcs2_msgsys_args *, int []));
int ibcs2_sysi86 __P((struct proc *, struct ibcs2_sysi86_args *, int []));
int ibcs2_shmsys __P((struct proc *, struct ibcs2_shmsys_args *, int []));
int ibcs2_semsys __P((struct proc *, struct ibcs2_semsys_args *, int []));
int ibcs2_ioctl __P((struct proc *, struct ibcs2_ioctl_args *, int []));
int ibcs2_uadmin __P((struct proc *, struct ibcs2_uadmin_args *, int []));
int ibcs2_utssys __P((struct proc *, struct ibcs2_utssys_args *, int []));
int ibcs2_execve __P((struct proc *, struct ibcs2_execve_args *, int []));
int ibcs2_fcntl __P((struct proc *, struct ibcs2_fcntl_args *, int []));
int ibcs2_ulimit __P((struct proc *, struct ibcs2_ulimit_args *, int []));
int ibcs2_rmdir __P((struct proc *, struct ibcs2_rmdir_args *, int []));
int ibcs2_mkdir __P((struct proc *, struct ibcs2_mkdir_args *, int []));
int ibcs2_getdents __P((struct proc *, struct ibcs2_getdents_args *, int []));
int ibcs2_sysfs __P((struct proc *, struct ibcs2_sysfs_args *, int []));
int ibcs2_getmsg __P((struct proc *, struct ibcs2_getmsg_args *, int []));
int ibcs2_putmsg __P((struct proc *, struct ibcs2_putmsg_args *, int []));
int ibcs2_poll __P((struct proc *, struct ibcs2_poll_args *, int []));
int ibcs2_secure __P((struct proc *, struct ibcs2_secure_args *, int []));
int ibcs2_symlink __P((struct proc *, struct ibcs2_symlink_args *, int []));
int ibcs2_lstat __P((struct proc *, struct ibcs2_lstat_args *, int []));
int ibcs2_readlink __P((struct proc *, struct ibcs2_readlink_args *, int []));
int ibcs2_isc __P((struct proc *, struct ibcs2_isc_args *, int []));
int ibcs2_read __P((struct proc *, struct ibcs2_read_args *));
int ibcs2_open __P((struct proc *, struct ibcs2_open_args *));
int ibcs2_wait __P((struct proc *, struct ibcs2_wait_args *));
int ibcs2_creat __P((struct proc *, struct ibcs2_creat_args *));
int ibcs2_unlink __P((struct proc *, struct ibcs2_unlink_args *));
int ibcs2_execv __P((struct proc *, struct ibcs2_execv_args *));
int ibcs2_chdir __P((struct proc *, struct ibcs2_chdir_args *));
int ibcs2_time __P((struct proc *, struct ibcs2_time_args *));
int ibcs2_mknod __P((struct proc *, struct ibcs2_mknod_args *));
int ibcs2_chmod __P((struct proc *, struct ibcs2_chmod_args *));
int ibcs2_chown __P((struct proc *, struct ibcs2_chown_args *));
int ibcs2_stat __P((struct proc *, struct ibcs2_stat_args *));
int ibcs2_lseek __P((struct proc *, struct ibcs2_lseek_args *));
int ibcs2_mount __P((struct proc *, struct ibcs2_mount_args *));
int ibcs2_umount __P((struct proc *, struct ibcs2_umount_args *));
int ibcs2_setuid __P((struct proc *, struct ibcs2_setuid_args *));
int ibcs2_stime __P((struct proc *, struct ibcs2_stime_args *));
int ibcs2_alarm __P((struct proc *, struct ibcs2_alarm_args *));
int ibcs2_fstat __P((struct proc *, struct ibcs2_fstat_args *));
int ibcs2_pause __P((struct proc *, struct ibcs2_pause_args *));
int ibcs2_utime __P((struct proc *, struct ibcs2_utime_args *));
int ibcs2_stty __P((struct proc *, struct ibcs2_stty_args *));
int ibcs2_gtty __P((struct proc *, struct ibcs2_gtty_args *));
int ibcs2_access __P((struct proc *, struct ibcs2_access_args *));
int ibcs2_nice __P((struct proc *, struct ibcs2_nice_args *));
int ibcs2_statfs __P((struct proc *, struct ibcs2_statfs_args *));
int ibcs2_kill __P((struct proc *, struct ibcs2_kill_args *));
int ibcs2_fstatfs __P((struct proc *, struct ibcs2_fstatfs_args *));
int ibcs2_pgrpsys __P((struct proc *, struct ibcs2_pgrpsys_args *));
int ibcs2_xenix __P((struct proc *, struct ibcs2_xenix_args *));
int ibcs2_times __P((struct proc *, struct ibcs2_times_args *));
int ibcs2_plock __P((struct proc *, struct ibcs2_plock_args *));
int ibcs2_setgid __P((struct proc *, struct ibcs2_setgid_args *));
int ibcs2_sigsys __P((struct proc *, struct ibcs2_sigsys_args *));
int ibcs2_msgsys __P((struct proc *, struct ibcs2_msgsys_args *));
int ibcs2_sysi86 __P((struct proc *, struct ibcs2_sysi86_args *));
int ibcs2_shmsys __P((struct proc *, struct ibcs2_shmsys_args *));
int ibcs2_semsys __P((struct proc *, struct ibcs2_semsys_args *));
int ibcs2_ioctl __P((struct proc *, struct ibcs2_ioctl_args *));
int ibcs2_uadmin __P((struct proc *, struct ibcs2_uadmin_args *));
int ibcs2_utssys __P((struct proc *, struct ibcs2_utssys_args *));
int ibcs2_execve __P((struct proc *, struct ibcs2_execve_args *));
int ibcs2_fcntl __P((struct proc *, struct ibcs2_fcntl_args *));
int ibcs2_ulimit __P((struct proc *, struct ibcs2_ulimit_args *));
int ibcs2_rmdir __P((struct proc *, struct ibcs2_rmdir_args *));
int ibcs2_mkdir __P((struct proc *, struct ibcs2_mkdir_args *));
int ibcs2_getdents __P((struct proc *, struct ibcs2_getdents_args *));
int ibcs2_sysfs __P((struct proc *, struct ibcs2_sysfs_args *));
int ibcs2_getmsg __P((struct proc *, struct ibcs2_getmsg_args *));
int ibcs2_putmsg __P((struct proc *, struct ibcs2_putmsg_args *));
int ibcs2_poll __P((struct proc *, struct ibcs2_poll_args *));
int ibcs2_secure __P((struct proc *, struct ibcs2_secure_args *));
int ibcs2_symlink __P((struct proc *, struct ibcs2_symlink_args *));
int ibcs2_lstat __P((struct proc *, struct ibcs2_lstat_args *));
int ibcs2_readlink __P((struct proc *, struct ibcs2_readlink_args *));
int ibcs2_isc __P((struct proc *, struct ibcs2_isc_args *));
#ifdef COMPAT_43

View File

@ -25,7 +25,7 @@
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
* $Id: ibcs2_signal.c,v 1.10 1997/03/24 11:23:32 bde Exp $
* $Id: ibcs2_signal.c,v 1.11 1997/07/20 09:39:46 bde Exp $
*/
#include <sys/param.h>
@ -186,10 +186,9 @@ bsd_to_ibcs2_sigaction(bsa, isa)
}
int
ibcs2_sigaction(p, uap, retval)
ibcs2_sigaction(p, uap)
register struct proc *p;
struct ibcs2_sigaction_args *uap;
int *retval;
{
struct ibcs2_sigaction *nisa, *oisa, tmpisa;
struct sigaction *nbsa, *obsa, tmpbsa;
@ -220,7 +219,7 @@ ibcs2_sigaction(p, uap, retval)
SCARG(&sa, nsa) = nbsa;
SCARG(&sa, osa) = obsa;
if ((error = sigaction(p, &sa, retval)) != 0)
if ((error = sigaction(p, &sa)) != 0)
return error;
if (oisa != NULL) {
@ -235,10 +234,9 @@ ibcs2_sigaction(p, uap, retval)
}
int
ibcs2_sigsys(p, uap, retval)
ibcs2_sigsys(p, uap)
register struct proc *p;
struct ibcs2_sigsys_args *uap;
int *retval;
{
struct sigaction sa;
int signum = ibcs2_to_bsd_sig[IBCS2_SIGNO(SCARG(uap, sig))];
@ -248,7 +246,7 @@ ibcs2_sigsys(p, uap, retval)
if (signum <= 0 || signum >= IBCS2_NSIG) {
if (IBCS2_SIGCALL(SCARG(uap, sig)) == IBCS2_SIGNAL_MASK ||
IBCS2_SIGCALL(SCARG(uap, sig)) == IBCS2_SIGSET_MASK)
*retval = (int)IBCS2_SIG_ERR;
p->p_retval[0] = (int)IBCS2_SIG_ERR;
return EINVAL;
}
@ -271,7 +269,7 @@ ibcs2_sigsys(p, uap, retval)
SCARG(&sa, how) = SIG_BLOCK;
SCARG(&sa, mask) = sigmask(signum);
return sigprocmask(p, &sa, retval);
return sigprocmask(p, &sa);
}
case IBCS2_SIGNAL_MASK:
@ -301,26 +299,26 @@ ibcs2_sigsys(p, uap, retval)
if (signum != SIGALRM)
sa.sa_flags |= SA_RESTART;
#endif
*retval = (int)IBCS2_SIG_ERR; /* init error return */
p->p_retval[0] = (int)IBCS2_SIG_ERR; /* init error return */
/* perform native sigaction() */
if ((error = copyout(&sa, nbsa, sizeof(sa))) != 0)
return error;
if ((error = sigaction(p, &sa_args, retval)) != 0) {
if ((error = sigaction(p, &sa_args)) != 0) {
DPRINTF(("signal: sigaction failed: %d\n",
error));
return error;
}
if ((error = copyin(obsa, &sa, sizeof(sa))) != 0)
return error;
*retval = (int)sa.sa_handler;
p->p_retval[0] = (int)sa.sa_handler;
/* special sigset() check */
if(IBCS2_SIGCALL(SCARG(uap, sig)) == IBCS2_SIGSET_MASK)
/* check to make sure signal is not blocked */
if(sigismember(&p->p_sigmask, signum)) {
/* return SIG_HOLD and unblock signal*/
*retval = (int)IBCS2_SIG_HOLD;
p->p_retval[0] = (int)IBCS2_SIG_HOLD;
p->p_sigmask &= ~sigmask(signum);
}
@ -333,7 +331,7 @@ ibcs2_sigsys(p, uap, retval)
SCARG(&sa, how) = SIG_UNBLOCK;
SCARG(&sa, mask) = sigmask(signum);
return sigprocmask(p, &sa, retval);
return sigprocmask(p, &sa);
}
case IBCS2_SIGIGNORE_MASK:
@ -351,7 +349,7 @@ ibcs2_sigsys(p, uap, retval)
sa.sa_flags = 0;
if ((error = copyout(&sa, bsa, sizeof(sa))) != 0)
return error;
if ((error = sigaction(p, &sa_args, retval)) != 0) {
if ((error = sigaction(p, &sa_args)) != 0) {
DPRINTF(("sigignore: sigaction failed\n"));
return error;
}
@ -363,7 +361,7 @@ ibcs2_sigsys(p, uap, retval)
struct sigsuspend_args sa;
SCARG(&sa, mask) = p->p_sigmask &~ sigmask(signum);
return sigsuspend(p, &sa, retval);
return sigsuspend(p, &sa);
}
default:
@ -372,10 +370,9 @@ ibcs2_sigsys(p, uap, retval)
}
int
ibcs2_sigprocmask(p, uap, retval)
ibcs2_sigprocmask(p, uap)
register struct proc *p;
struct ibcs2_sigprocmask_args *uap;
int *retval;
{
ibcs2_sigset_t iss;
sigset_t bss;
@ -423,10 +420,9 @@ ibcs2_sigprocmask(p, uap, retval)
}
int
ibcs2_sigpending(p, uap, retval)
ibcs2_sigpending(p, uap)
register struct proc *p;
struct ibcs2_sigpending_args *uap;
int *retval;
{
sigset_t bss;
ibcs2_sigset_t iss;
@ -438,10 +434,9 @@ ibcs2_sigpending(p, uap, retval)
}
int
ibcs2_sigsuspend(p, uap, retval)
ibcs2_sigsuspend(p, uap)
register struct proc *p;
struct ibcs2_sigsuspend_args *uap;
int *retval;
{
ibcs2_sigset_t sss;
sigset_t bss;
@ -454,30 +449,28 @@ ibcs2_sigsuspend(p, uap, retval)
ibcs2_to_bsd_sigset(&sss, &bss);
SCARG(&sa, mask) = bss;
return sigsuspend(p, &sa, retval);
return sigsuspend(p, &sa);
}
int
ibcs2_pause(p, uap, retval)
ibcs2_pause(p, uap)
register struct proc *p;
struct ibcs2_pause_args *uap;
int *retval;
{
struct sigsuspend_args bsa;
SCARG(&bsa, mask) = p->p_sigmask;
return sigsuspend(p, &bsa, retval);
return sigsuspend(p, &bsa);
}
int
ibcs2_kill(p, uap, retval)
ibcs2_kill(p, uap)
register struct proc *p;
struct ibcs2_kill_args *uap;
int *retval;
{
struct kill_args ka;
SCARG(&ka, pid) = SCARG(uap, pid);
SCARG(&ka, signum) = ibcs2_to_bsd_sig[SCARG(uap, signo)];
return kill(p, &ka, retval);
return kill(p, &ka);
}

View File

@ -45,19 +45,18 @@ struct setipdomainname_args {
/* Local prototypes */
static int ibcs2_getipdomainname __P((struct proc *,
struct getipdomainname_args *, int *));
struct getipdomainname_args *));
static int ibcs2_setipdomainname __P((struct proc *,
struct setipdomainname_args *, int *));
struct setipdomainname_args *));
/*
* iBCS2 socksys calls.
*/
int
ibcs2_socksys(p, uap, retval)
ibcs2_socksys(p, uap)
register struct proc *p;
register struct ibcs2_socksys_args *uap;
int *retval;
{
int error;
int realargs[7]; /* 1 for command, 6 for recvfrom */
@ -78,55 +77,55 @@ ibcs2_socksys(p, uap, retval)
passargs = (void *)(realargs + 1);
switch (realargs[0]) {
case SOCKSYS_ACCEPT:
return accept(p, passargs, retval);
return accept(p, passargs);
case SOCKSYS_BIND:
return bind(p, passargs, retval);
return bind(p, passargs);
case SOCKSYS_CONNECT:
return connect(p, passargs, retval);
return connect(p, passargs);
case SOCKSYS_GETPEERNAME:
return getpeername(p, passargs, retval);
return getpeername(p, passargs);
case SOCKSYS_GETSOCKNAME:
return getsockname(p, passargs, retval);
return getsockname(p, passargs);
case SOCKSYS_GETSOCKOPT:
return getsockopt(p, passargs, retval);
return getsockopt(p, passargs);
case SOCKSYS_LISTEN:
return listen(p, passargs, retval);
return listen(p, passargs);
case SOCKSYS_RECV:
realargs[5] = realargs[6] = 0;
/* FALLTHROUGH */
case SOCKSYS_RECVFROM:
return recvfrom(p, passargs, retval);
return recvfrom(p, passargs);
case SOCKSYS_SEND:
realargs[5] = realargs[6] = 0;
/* FALLTHROUGH */
case SOCKSYS_SENDTO:
return sendto(p, passargs, retval);
return sendto(p, passargs);
case SOCKSYS_SETSOCKOPT:
return setsockopt(p, passargs, retval);
return setsockopt(p, passargs);
case SOCKSYS_SHUTDOWN:
return shutdown(p, passargs, retval);
return shutdown(p, passargs);
case SOCKSYS_SOCKET:
return socket(p, passargs, retval);
return socket(p, passargs);
case SOCKSYS_SELECT:
return select(p, passargs, retval);
return select(p, passargs);
case SOCKSYS_GETIPDOMAIN:
return ibcs2_getipdomainname(p, passargs, retval);
return ibcs2_getipdomainname(p, passargs);
case SOCKSYS_SETIPDOMAIN:
return ibcs2_setipdomainname(p, passargs, retval);
return ibcs2_setipdomainname(p, passargs);
case SOCKSYS_ADJTIME:
return adjtime(p, passargs, retval);
return adjtime(p, passargs);
case SOCKSYS_SETREUID:
return setreuid(p, passargs, retval);
return setreuid(p, passargs);
case SOCKSYS_SETREGID:
return setregid(p, passargs, retval);
return setregid(p, passargs);
case SOCKSYS_GETTIME:
return gettimeofday(p, passargs, retval);
return gettimeofday(p, passargs);
case SOCKSYS_SETTIME:
return settimeofday(p, passargs, retval);
return settimeofday(p, passargs);
case SOCKSYS_GETITIMER:
return getitimer(p, passargs, retval);
return getitimer(p, passargs);
case SOCKSYS_SETITIMER:
return setitimer(p, passargs, retval);
return setitimer(p, passargs);
default:
printf("socksys unknown %08x %08x %08x %08x %08x %08x %08x\n",
@ -139,10 +138,9 @@ ibcs2_socksys(p, uap, retval)
/* ARGSUSED */
static int
ibcs2_getipdomainname(p, uap, retval)
ibcs2_getipdomainname(p, uap)
struct proc *p;
struct getipdomainname_args *uap;
int *retval;
{
char hname[MAXHOSTNAMELEN], *dptr;
int len;
@ -164,10 +162,9 @@ ibcs2_getipdomainname(p, uap, retval)
/* ARGSUSED */
static int
ibcs2_setipdomainname(p, uap, retval)
ibcs2_setipdomainname(p, uap)
struct proc *p;
struct setipdomainname_args *uap;
int *retval;
{
char hname[MAXHOSTNAMELEN], *ptr;
int error, sctl[2], hlen;

View File

@ -121,6 +121,6 @@ struct ibcs2_socksys_args {
caddr_t argsp;
};
int ibcs2_socksys __P((struct proc *, struct ibcs2_socksys_args *, int *));
int ibcs2_socksys __P((struct proc *, struct ibcs2_socksys_args *));
#endif /* !_I386_IBCS2_IBCS2_SOCKSYS_H_ */

View File

@ -92,10 +92,9 @@ cvt_statfs(sp, buf, len)
}
int
ibcs2_statfs(p, uap, retval)
ibcs2_statfs(p, uap)
struct proc *p;
struct ibcs2_statfs_args *uap;
int *retval;
{
register struct mount *mp;
register struct statfs *sp;
@ -117,10 +116,9 @@ ibcs2_statfs(p, uap, retval)
}
int
ibcs2_fstatfs(p, uap, retval)
ibcs2_fstatfs(p, uap)
struct proc *p;
struct ibcs2_fstatfs_args *uap;
int *retval;
{
struct file *fp;
struct mount *mp;
@ -138,10 +136,9 @@ ibcs2_fstatfs(p, uap, retval)
}
int
ibcs2_stat(p, uap, retval)
ibcs2_stat(p, uap)
struct proc *p;
struct ibcs2_stat_args *uap;
int *retval;
{
struct stat st;
struct ibcs2_stat ibcs2_st;
@ -153,7 +150,7 @@ ibcs2_stat(p, uap, retval)
SCARG(&cup, path) = SCARG(uap, path);
SCARG(&cup, ub) = stackgap_alloc(&sg, sizeof(st));
if (error = stat(p, &cup, retval))
if (error = stat(p, &cup))
return error;
if (error = copyin(SCARG(&cup, ub), &st, sizeof(st)))
@ -164,10 +161,9 @@ ibcs2_stat(p, uap, retval)
}
int
ibcs2_lstat(p, uap, retval)
ibcs2_lstat(p, uap)
struct proc *p;
struct ibcs2_lstat_args *uap;
int *retval;
{
struct stat st;
struct ibcs2_stat ibcs2_st;
@ -179,7 +175,7 @@ ibcs2_lstat(p, uap, retval)
SCARG(&cup, path) = SCARG(uap, path);
SCARG(&cup, ub) = stackgap_alloc(&sg, sizeof(st));
if (error = lstat(p, &cup, retval))
if (error = lstat(p, &cup))
return error;
if (error = copyin(SCARG(&cup, ub), &st, sizeof(st)))
@ -190,10 +186,9 @@ ibcs2_lstat(p, uap, retval)
}
int
ibcs2_fstat(p, uap, retval)
ibcs2_fstat(p, uap)
struct proc *p;
struct ibcs2_fstat_args *uap;
int *retval;
{
struct stat st;
struct ibcs2_stat ibcs2_st;
@ -204,7 +199,7 @@ ibcs2_fstat(p, uap, retval)
SCARG(&cup, fd) = SCARG(uap, fd);
SCARG(&cup, sb) = stackgap_alloc(&sg, sizeof(st));
if (error = fstat(p, &cup, retval))
if (error = fstat(p, &cup))
return error;
if (error = copyin(SCARG(&cup, sb), &st, sizeof(st)))
@ -215,10 +210,9 @@ ibcs2_fstat(p, uap, retval)
}
int
ibcs2_utssys(p, uap, retval)
ibcs2_utssys(p, uap)
struct proc *p;
struct ibcs2_utssys_args *uap;
int *retval;
{
switch (SCARG(uap, flag)) {
case 0: /* uname(2) */

View File

@ -51,7 +51,7 @@
extern int hw_float;
int
ibcs2_sysi86(struct proc *p, struct ibcs2_sysi86_args *args, int *retval)
ibcs2_sysi86(struct proc *p, struct ibcs2_sysi86_args *args)
{
switch (SCARG(args, cmd)) {
case SI86_FPHW: { /* Floating Point information */
@ -82,7 +82,7 @@ ibcs2_sysi86(struct proc *p, struct ibcs2_sysi86_args *args, int *retval)
}
case SI86_MEM: /* size of physical memory */
*retval = ctob(physmem);
p->p_retval[0] = ctob(physmem);
return 0;
default:

View File

@ -92,7 +92,7 @@ int ibcs2_emul_find __P((struct proc *, caddr_t *, const char *, char *,
ibcs2_emul_find(p, sgp, ibcs2_emul_path, path, &(path), 1)
#ifdef SPX_HACK
int spx_open __P((struct proc *p, void *uap, int *retval));
int spx_open __P((struct proc *p, void *uap));
#endif
#endif /* !_IBCS2_UTIL_H_ */

View File

@ -27,7 +27,7 @@
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
* $Id: ibcs2_xenix.c,v 1.12 1997/06/22 19:04:03 sef Exp $
* $Id: ibcs2_xenix.c,v 1.13 1997/07/20 09:39:50 bde Exp $
*/
#include <sys/param.h>
@ -52,7 +52,7 @@
extern struct sysent xenix_sysent[];
int
ibcs2_xenix(struct proc *p, struct ibcs2_xenix_args *uap, int *retval)
ibcs2_xenix(struct proc *p, struct ibcs2_xenix_args *uap)
{
struct trapframe *tf = p->p_md.md_regs;
struct sysent *callp;
@ -62,16 +62,15 @@ ibcs2_xenix(struct proc *p, struct ibcs2_xenix_args *uap, int *retval)
callp = &xenix_sysent[code];
if(code < IBCS2_XENIX_MAXSYSCALL)
return((*callp->sy_call)(p, (void *)uap, retval));
return((*callp->sy_call)(p, (void *)uap));
else
return ENOSYS;
}
int
xenix_rdchk(p, uap, retval)
xenix_rdchk(p, uap)
struct proc *p;
struct xenix_rdchk_args *uap;
int *retval;
{
int error;
struct ioctl_args sa;
@ -81,17 +80,16 @@ xenix_rdchk(p, uap, retval)
SCARG(&sa, fd) = SCARG(uap, fd);
SCARG(&sa, com) = FIONREAD;
SCARG(&sa, data) = stackgap_alloc(&sg, sizeof(int));
if (error = ioctl(p, &sa, retval))
if (error = ioctl(p, &sa))
return error;
*retval = (*((int*)SCARG(&sa, data))) ? 1 : 0;
p->p_retval[0] = (*((int*)SCARG(&sa, data))) ? 1 : 0;
return 0;
}
int
xenix_chsize(p, uap, retval)
xenix_chsize(p, uap)
struct proc *p;
struct xenix_chsize_args *uap;
int *retval;
{
struct ftruncate_args sa;
@ -99,15 +97,14 @@ xenix_chsize(p, uap, retval)
SCARG(&sa, fd) = SCARG(uap, fd);
SCARG(&sa, pad) = 0;
SCARG(&sa, length) = SCARG(uap, size);
return ftruncate(p, &sa, retval);
return ftruncate(p, &sa);
}
int
xenix_ftime(p, uap, retval)
xenix_ftime(p, uap)
struct proc *p;
struct xenix_ftime_args *uap;
int *retval;
{
struct timeval tv;
struct ibcs2_timeb {
@ -129,7 +126,7 @@ xenix_ftime(p, uap, retval)
}
int
xenix_nap(struct proc *p, struct xenix_nap_args *uap, int *retval)
xenix_nap(struct proc *p, struct xenix_nap_args *uap)
{
long period;
@ -142,7 +139,7 @@ xenix_nap(struct proc *p, struct xenix_nap_args *uap, int *retval)
}
int
xenix_utsname(struct proc *p, struct xenix_utsname_args *uap, int *retval)
xenix_utsname(struct proc *p, struct xenix_utsname_args *uap)
{
struct ibcs2_sco_utsname {
char sysname[9];
@ -176,15 +173,15 @@ xenix_utsname(struct proc *p, struct xenix_utsname_args *uap, int *retval)
}
int
xenix_scoinfo(struct proc *p, struct xenix_scoinfo_args *uap, int *retval)
xenix_scoinfo(struct proc *p, struct xenix_scoinfo_args *uap)
{
/* scoinfo (not documented) */
*retval = 0;
p->p_retval[0] = 0;
return 0;
}
int
xenix_eaccess(struct proc *p, struct xenix_eaccess_args *uap, int *retval)
xenix_eaccess(struct proc *p, struct xenix_eaccess_args *uap)
{
struct ucred *cred = p->p_ucred;
struct vnode *vp;

View File

@ -72,27 +72,22 @@ struct ibcs2_rename_args {
struct xenix_utsname_args {
long addr;
};
int xenix_rdchk __P((struct proc *, struct xenix_rdchk_args *, int []));
int xenix_chsize __P((struct proc *, struct xenix_chsize_args *, int []));
int xenix_ftime __P((struct proc *, struct xenix_ftime_args *, int []));
int xenix_nap __P((struct proc *, struct xenix_nap_args *, int []));
int xenix_scoinfo __P((struct proc *, struct xenix_scoinfo_args *, int []));
int xenix_eaccess __P((struct proc *, struct xenix_eaccess_args *, int []));
int ibcs2_sigaction __P((struct proc *, struct ibcs2_sigaction_args *, int []));
int ibcs2_sigprocmask __P((struct proc *, struct ibcs2_sigprocmask_args *, int []));
int ibcs2_sigpending __P((struct proc *, struct ibcs2_sigpending_args *, int []));
int ibcs2_sigsuspend __P((struct proc *, struct ibcs2_sigsuspend_args *, int []));
int ibcs2_getgroups __P((struct proc *, struct ibcs2_getgroups_args *, int []));
int ibcs2_setgroups __P((struct proc *, struct ibcs2_setgroups_args *, int []));
int ibcs2_sysconf __P((struct proc *, struct ibcs2_sysconf_args *, int []));
int ibcs2_pathconf __P((struct proc *, struct ibcs2_pathconf_args *, int []));
int ibcs2_fpathconf __P((struct proc *, struct ibcs2_fpathconf_args *, int []));
int ibcs2_rename __P((struct proc *, struct ibcs2_rename_args *, int []));
int xenix_utsname __P((struct proc *, struct xenix_utsname_args *, int []));
#ifdef COMPAT_43
#endif /* COMPAT_43 */
int xenix_rdchk __P((struct proc *, struct xenix_rdchk_args *));
int xenix_chsize __P((struct proc *, struct xenix_chsize_args *));
int xenix_ftime __P((struct proc *, struct xenix_ftime_args *));
int xenix_nap __P((struct proc *, struct xenix_nap_args *));
int xenix_scoinfo __P((struct proc *, struct xenix_scoinfo_args *));
int xenix_eaccess __P((struct proc *, struct xenix_eaccess_args *));
int ibcs2_sigaction __P((struct proc *, struct ibcs2_sigaction_args *));
int ibcs2_sigprocmask __P((struct proc *, struct ibcs2_sigprocmask_args *));
int ibcs2_sigpending __P((struct proc *, struct ibcs2_sigpending_args *));
int ibcs2_sigsuspend __P((struct proc *, struct ibcs2_sigsuspend_args *));
int ibcs2_getgroups __P((struct proc *, struct ibcs2_getgroups_args *));
int ibcs2_setgroups __P((struct proc *, struct ibcs2_setgroups_args *));
int ibcs2_sysconf __P((struct proc *, struct ibcs2_sysconf_args *));
int ibcs2_pathconf __P((struct proc *, struct ibcs2_pathconf_args *));
int ibcs2_fpathconf __P((struct proc *, struct ibcs2_fpathconf_args *));
int ibcs2_rename __P((struct proc *, struct ibcs2_rename_args *));
int xenix_utsname __P((struct proc *, struct xenix_utsname_args *));
#endif /* !_IBCS2_XENIX_H_ */

View File

@ -25,7 +25,7 @@
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
* $Id: linux_dummy.c,v 1.6 1997/07/20 16:05:53 bde Exp $
* $Id: linux_dummy.c,v 1.7 1997/10/29 08:17:09 kato Exp $
*/
#include <sys/param.h>
@ -36,140 +36,140 @@
#include <i386/linux/linux_proto.h>
int
linux_setup(struct proc *p, struct linux_setup_args *args, int *retval)
linux_setup(struct proc *p, struct linux_setup_args *args)
{
printf("Linux-emul(%d): setup() not supported\n", p->p_pid);
return ENOSYS;
}
int
linux_break(struct proc *p, struct linux_break_args *args, int *retval)
linux_break(struct proc *p, struct linux_break_args *args)
{
printf("Linux-emul(%d): break() not supported\n", p->p_pid);
return ENOSYS;
}
int
linux_stat(struct proc *p, struct linux_stat_args *args, int *retval)
linux_stat(struct proc *p, struct linux_stat_args *args)
{
printf("Linux-emul(%d): stat() not supported\n", p->p_pid);
return ENOSYS;
}
int
linux_fstat(struct proc *p, struct linux_fstat_args *args, int *retval)
linux_fstat(struct proc *p, struct linux_fstat_args *args)
{
printf("Linux-emul(%d): fstat() not supported\n", p->p_pid);
return ENOSYS;
}
int
linux_mount(struct proc *p, struct linux_mount_args *args, int *retval)
linux_mount(struct proc *p, struct linux_mount_args *args)
{
printf("Linux-emul(%d): mount() not supported\n", p->p_pid);
return ENOSYS;
}
int
linux_umount(struct proc *p, struct linux_umount_args *args, int *retval)
linux_umount(struct proc *p, struct linux_umount_args *args)
{
printf("Linux-emul(%d): umount() not supported\n", p->p_pid);
return ENOSYS;
}
int
linux_stime(struct proc *p, struct linux_stime_args *args, int *retval)
linux_stime(struct proc *p, struct linux_stime_args *args)
{
printf("Linux-emul(%d): stime() not supported\n", p->p_pid);
return ENOSYS;
}
int
linux_ptrace(struct proc *p, struct linux_ptrace_args *args, int *retval)
linux_ptrace(struct proc *p, struct linux_ptrace_args *args)
{
printf("Linux-emul(%d): ptrace() not supported\n", p->p_pid);
return ENOSYS;
}
int
linux_stty(struct proc *p, struct linux_stty_args *args, int *retval)
linux_stty(struct proc *p, struct linux_stty_args *args)
{
printf("Linux-emul(%d): stty() not supported\n", p->p_pid);
return ENOSYS;
}
int
linux_gtty(struct proc *p, struct linux_gtty_args *args, int *retval)
linux_gtty(struct proc *p, struct linux_gtty_args *args)
{
printf("Linux-emul(%d): gtty() not supported\n", p->p_pid);
return ENOSYS;
}
int
linux_ftime(struct proc *p, struct linux_ftime_args *args, int *retval)
linux_ftime(struct proc *p, struct linux_ftime_args *args)
{
printf("Linux-emul(%d): ftime() not supported\n", p->p_pid);
return ENOSYS;
}
int
linux_prof(struct proc *p, struct linux_prof_args *args, int *retval)
linux_prof(struct proc *p, struct linux_prof_args *args)
{
printf("Linux-emul(%d): prof() not supported\n", p->p_pid);
return ENOSYS;
}
int
linux_phys(struct proc *p, struct linux_phys_args *args, int *retval)
linux_phys(struct proc *p, struct linux_phys_args *args)
{
printf("Linux-emul(%d): phys() not supported\n", p->p_pid);
return ENOSYS;
}
int
linux_lock(struct proc *p, struct linux_lock_args *args, int *retval)
linux_lock(struct proc *p, struct linux_lock_args *args)
{
printf("Linux-emul(%d): lock() not supported\n", p->p_pid);
return ENOSYS;
}
int
linux_mpx(struct proc *p, struct linux_mpx_args *args, int *retval)
linux_mpx(struct proc *p, struct linux_mpx_args *args)
{
printf("Linux-emul(%d): mpx() not supported\n", p->p_pid);
return ENOSYS;
}
int
linux_ulimit(struct proc *p, struct linux_ulimit_args *args, int *retval)
linux_ulimit(struct proc *p, struct linux_ulimit_args *args)
{
printf("Linux-emul(%d): ulimit() not supported\n", p->p_pid);
return ENOSYS;
}
int
linux_olduname(struct proc *p, struct linux_olduname_args *args, int *retval)
linux_olduname(struct proc *p, struct linux_olduname_args *args)
{
printf("Linux-emul(%d): olduname() not supported\n", p->p_pid);
return ENOSYS;
}
int
linux_ustat(struct proc *p, struct linux_ustat_args *args, int *retval)
linux_ustat(struct proc *p, struct linux_ustat_args *args)
{
printf("Linux-emul(%d): ustat() not supported\n", p->p_pid);
return ENOSYS;
}
int
linux_ioperm(struct proc *p, struct linux_ioperm_args *args, int *retval)
linux_ioperm(struct proc *p, struct linux_ioperm_args *args)
{
printf("Linux-emul(%d): ioperm() not supported\n", p->p_pid);
return 0; /* EINVAL SOS XXX */
}
int
linux_ksyslog(struct proc *p, struct linux_ksyslog_args *args, int *retval)
linux_ksyslog(struct proc *p, struct linux_ksyslog_args *args)
{
printf("Linux-emul(%d): ksyslog(%x) not supported\n",
p->p_pid, args->what);
@ -177,105 +177,105 @@ linux_ksyslog(struct proc *p, struct linux_ksyslog_args *args, int *retval)
}
int
linux_vhangup(struct proc *p, struct linux_vhangup_args *args, int *retval)
linux_vhangup(struct proc *p, struct linux_vhangup_args *args)
{
printf("Linux-emul(%d): vhangup() not supported\n", p->p_pid);
return ENOSYS;
}
int
linux_idle(struct proc *p, struct linux_idle_args *args, int *retval)
linux_idle(struct proc *p, struct linux_idle_args *args)
{
printf("Linux-emul(%d): idle() not supported\n", p->p_pid);
return ENOSYS;
}
int
linux_vm86(struct proc *p, struct linux_vm86_args *args, int *retval)
linux_vm86(struct proc *p, struct linux_vm86_args *args)
{
printf("Linux-emul(%d): vm86() not supported\n", p->p_pid);
return ENOSYS;
}
int
linux_swapoff(struct proc *p, struct linux_swapoff_args *args, int *retval)
linux_swapoff(struct proc *p, struct linux_swapoff_args *args)
{
printf("Linux-emul(%d): swapoff() not supported\n", p->p_pid);
return ENOSYS;
}
int
linux_sysinfo(struct proc *p, struct linux_sysinfo_args *args, int *retval)
linux_sysinfo(struct proc *p, struct linux_sysinfo_args *args)
{
printf("Linux-emul(%d): sysinfo() not supported\n", p->p_pid);
return ENOSYS;
}
int
linux_clone(struct proc *p, struct linux_clone_args *args, int *retval)
linux_clone(struct proc *p, struct linux_clone_args *args)
{
printf("Linux-emul(%d): clone() not supported\n", p->p_pid);
return ENOSYS;
}
int
linux_uname(struct proc *p, struct linux_uname_args *args, int *retval)
linux_uname(struct proc *p, struct linux_uname_args *args)
{
printf("Linux-emul(%d): uname() not supported\n", p->p_pid);
return ENOSYS;
}
int
linux_modify_ldt(struct proc *p, struct linux_modify_ldt_args *args, int *retval)
linux_modify_ldt(struct proc *p, struct linux_modify_ldt_args *args)
{
printf("Linux-emul(%d): modify_ldt() not supported\n", p->p_pid);
return ENOSYS;
}
int
linux_adjtimex(struct proc *p, struct linux_adjtimex_args *args, int *retval)
linux_adjtimex(struct proc *p, struct linux_adjtimex_args *args)
{
printf("Linux-emul(%d): adjtimex() not supported\n", p->p_pid);
return ENOSYS;
}
int
linux_create_module(struct proc *p, struct linux_create_module_args *args, int *retval)
linux_create_module(struct proc *p, struct linux_create_module_args *args)
{
printf("Linux-emul(%d): create_module() not supported\n", p->p_pid);
return ENOSYS;
}
int
linux_init_module(struct proc *p, struct linux_init_module_args *args, int *retval)
linux_init_module(struct proc *p, struct linux_init_module_args *args)
{
printf("Linux-emul(%d): init_module() not supported\n", p->p_pid);
return ENOSYS;
}
int
linux_delete_module(struct proc *p, struct linux_delete_module_args *args, int *retval)
linux_delete_module(struct proc *p, struct linux_delete_module_args *args)
{
printf("Linux-emul(%d): delete_module() not supported\n", p->p_pid);
return ENOSYS;
}
int
linux_get_kernel_syms(struct proc *p, struct linux_get_kernel_syms_args *args, int *retval)
linux_get_kernel_syms(struct proc *p, struct linux_get_kernel_syms_args *args)
{
printf("Linux-emul(%d): get_kernel_syms() not supported\n", p->p_pid);
return ENOSYS;
}
int
linux_quotactl(struct proc *p, struct linux_quotactl_args *args, int *retval)
linux_quotactl(struct proc *p, struct linux_quotactl_args *args)
{
printf("Linux-emul(%d): quotactl() not supported\n", p->p_pid);
return ENOSYS;
}
int
linux_bdflush(struct proc *p, struct linux_bdflush_args *args, int *retval)
linux_bdflush(struct proc *p, struct linux_bdflush_args *args)
{
printf("Linux-emul(%d): bdflush() not supported\n", p->p_pid);
return ENOSYS;

View File

@ -25,7 +25,7 @@
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
* $Id: linux_file.c,v 1.13 1997/04/05 14:50:56 dfr Exp $
* $Id: linux_file.c,v 1.14 1997/04/06 10:10:50 dfr Exp $
*/
#include <sys/param.h>
@ -46,7 +46,7 @@
#include <i386/linux/linux_util.h>
int
linux_creat(struct proc *p, struct linux_creat_args *args, int *retval)
linux_creat(struct proc *p, struct linux_creat_args *args)
{
struct open_args /* {
char *path;
@ -65,11 +65,11 @@ linux_creat(struct proc *p, struct linux_creat_args *args, int *retval)
bsd_open_args.path = args->path;
bsd_open_args.mode = args->mode;
bsd_open_args.flags = O_WRONLY | O_CREAT | O_TRUNC;
return open(p, &bsd_open_args, retval);
return open(p, &bsd_open_args);
}
int
linux_open(struct proc *p, struct linux_open_args *args, int *retval)
linux_open(struct proc *p, struct linux_open_args *args)
{
struct open_args /* {
char *path;
@ -118,11 +118,11 @@ linux_open(struct proc *p, struct linux_open_args *args, int *retval)
bsd_open_args.path = args->path;
bsd_open_args.mode = args->mode;
error = open(p, &bsd_open_args, retval);
error = open(p, &bsd_open_args);
if (!error && !(bsd_open_args.flags & O_NOCTTY) &&
SESS_LEADER(p) && !(p->p_flag & P_CONTROLT)) {
struct filedesc *fdp = p->p_fd;
struct file *fp = fdp->fd_ofiles[*retval];
struct file *fp = fdp->fd_ofiles[p->p_retval[0]];
if (fp->f_type == DTYPE_VNODE)
(fp->f_ops->fo_ioctl)(fp, TIOCSCTTY, (caddr_t) 0, p);
@ -183,7 +183,7 @@ bsd_to_linux_flock(struct flock *bsd_flock, struct linux_flock *linux_flock)
}
int
linux_fcntl(struct proc *p, struct linux_fcntl_args *args, int *retval)
linux_fcntl(struct proc *p, struct linux_fcntl_args *args)
{
int error, result;
struct fcntl_args /* {
@ -216,26 +216,27 @@ linux_fcntl(struct proc *p, struct linux_fcntl_args *args, int *retval)
switch (args->cmd) {
case LINUX_F_DUPFD:
fcntl_args.cmd = F_DUPFD;
return fcntl(p, &fcntl_args, retval);
return fcntl(p, &fcntl_args);
case LINUX_F_GETFD:
fcntl_args.cmd = F_GETFD;
return fcntl(p, &fcntl_args, retval);
return fcntl(p, &fcntl_args);
case LINUX_F_SETFD:
fcntl_args.cmd = F_SETFD;
return fcntl(p, &fcntl_args, retval);
return fcntl(p, &fcntl_args);
case LINUX_F_GETFL:
fcntl_args.cmd = F_GETFL;
error = fcntl(p, &fcntl_args, &result);
*retval = 0;
if (result & O_RDONLY) *retval |= LINUX_O_RDONLY;
if (result & O_WRONLY) *retval |= LINUX_O_WRONLY;
if (result & O_RDWR) *retval |= LINUX_O_RDWR;
if (result & O_NDELAY) *retval |= LINUX_O_NONBLOCK;
if (result & O_APPEND) *retval |= LINUX_O_APPEND;
if (result & O_FSYNC) *retval |= LINUX_O_SYNC;
error = fcntl(p, &fcntl_args);
result = p->p_retval[0];
p->p_retval[0] = 0;
if (result & O_RDONLY) p->p_retval[0] |= LINUX_O_RDONLY;
if (result & O_WRONLY) p->p_retval[0] |= LINUX_O_WRONLY;
if (result & O_RDWR) p->p_retval[0] |= LINUX_O_RDWR;
if (result & O_NDELAY) p->p_retval[0] |= LINUX_O_NONBLOCK;
if (result & O_APPEND) p->p_retval[0] |= LINUX_O_APPEND;
if (result & O_FSYNC) p->p_retval[0] |= LINUX_O_SYNC;
return error;
case LINUX_F_SETFL:
@ -243,7 +244,7 @@ linux_fcntl(struct proc *p, struct linux_fcntl_args *args, int *retval)
if (args->arg & LINUX_O_APPEND) fcntl_args.arg |= O_APPEND;
if (args->arg & LINUX_O_SYNC) fcntl_args.arg |= O_FSYNC;
fcntl_args.cmd = F_SETFL;
return fcntl(p, &fcntl_args, retval);
return fcntl(p, &fcntl_args);
case LINUX_F_GETLK:
if ((error = copyin((caddr_t)args->arg, (caddr_t)&linux_flock,
@ -252,7 +253,7 @@ linux_fcntl(struct proc *p, struct linux_fcntl_args *args, int *retval)
linux_to_bsd_flock(&linux_flock, bsd_flock);
fcntl_args.cmd = F_GETLK;
fcntl_args.arg = (int)bsd_flock;
if (error = fcntl(p, &fcntl_args, retval))
if (error = fcntl(p, &fcntl_args))
return error;
bsd_to_linux_flock(bsd_flock, &linux_flock);
return copyout((caddr_t)&linux_flock, (caddr_t)args->arg,
@ -265,7 +266,7 @@ linux_fcntl(struct proc *p, struct linux_fcntl_args *args, int *retval)
linux_to_bsd_flock(&linux_flock, bsd_flock);
fcntl_args.cmd = F_SETLK;
fcntl_args.arg = (int)bsd_flock;
return fcntl(p, &fcntl_args, retval);
return fcntl(p, &fcntl_args);
case LINUX_F_SETLKW:
if ((error = copyin((caddr_t)args->arg, (caddr_t)&linux_flock,
@ -274,7 +275,7 @@ linux_fcntl(struct proc *p, struct linux_fcntl_args *args, int *retval)
linux_to_bsd_flock(&linux_flock, bsd_flock);
fcntl_args.cmd = F_SETLKW;
fcntl_args.arg = (int)bsd_flock;
return fcntl(p, &fcntl_args, retval);
return fcntl(p, &fcntl_args);
case LINUX_F_SETOWN:
case LINUX_F_GETOWN:
@ -290,7 +291,7 @@ linux_fcntl(struct proc *p, struct linux_fcntl_args *args, int *retval)
return EBADF;
if (fp->f_type == DTYPE_SOCKET) {
fcntl_args.cmd = args->cmd == LINUX_F_SETOWN ? F_SETOWN : F_GETOWN;
return fcntl(p, &fcntl_args, retval);
return fcntl(p, &fcntl_args);
}
vp = (struct vnode *)fp->f_data;
if (vp->v_type != VCHR)
@ -302,7 +303,7 @@ linux_fcntl(struct proc *p, struct linux_fcntl_args *args, int *retval)
if (!d_tty || (!(tp = (*d_tty)(va.va_rdev))))
return EINVAL;
if (args->cmd == LINUX_F_GETOWN) {
retval[0] = tp->t_pgrp ? tp->t_pgrp->pg_id : NO_PID;
p->p_retval[0] = tp->t_pgrp ? tp->t_pgrp->pg_id : NO_PID;
return 0;
}
if ((long)args->arg <= 0) {
@ -323,7 +324,7 @@ linux_fcntl(struct proc *p, struct linux_fcntl_args *args, int *retval)
}
int
linux_lseek(struct proc *p, struct linux_lseek_args *args, int *retval)
linux_lseek(struct proc *p, struct linux_lseek_args *args)
{
struct lseek_args /* {
@ -341,12 +342,12 @@ linux_lseek(struct proc *p, struct linux_lseek_args *args, int *retval)
tmp_args.fd = args->fdes;
tmp_args.offset = (off_t)args->off;
tmp_args.whence = args->whence;
error = lseek(p, &tmp_args, retval);
error = lseek(p, &tmp_args);
return error;
}
int
linux_llseek(struct proc *p, struct linux_llseek_args *args, int *retval)
linux_llseek(struct proc *p, struct linux_llseek_args *args)
{
struct lseek_args bsd_args;
int error;
@ -362,13 +363,13 @@ linux_llseek(struct proc *p, struct linux_llseek_args *args, int *retval)
bsd_args.offset = off;
bsd_args.whence = args->whence;
if ((error = lseek(p, &bsd_args, retval)))
if ((error = lseek(p, &bsd_args)))
return error;
if ((error = copyout(retval, (caddr_t)args->res, sizeof (off_t))))
if ((error = copyout(p->p_retval, (caddr_t)args->res, sizeof (off_t))))
return error;
retval[0] = 0;
p->p_retval[0] = 0;
return 0;
}
@ -384,18 +385,18 @@ struct linux_dirent {
ALIGN((((char *)&(de)->dname - (char *)de) + (namlen) + 1))
int
linux_readdir(struct proc *p, struct linux_readdir_args *args, int *retval)
linux_readdir(struct proc *p, struct linux_readdir_args *args)
{
struct linux_getdents_args lda;
lda.fd = args->fd;
lda.dent = args->dent;
lda.count = 1;
return linux_getdents(p, &lda, retval);
return linux_getdents(p, &lda);
}
int
linux_getdents(struct proc *p, struct linux_getdents_args *args, int *retval)
linux_getdents(struct proc *p, struct linux_getdents_args *args)
{
register struct dirent *bdp;
struct vnode *vp;
@ -556,7 +557,7 @@ linux_getdents(struct proc *p, struct linux_getdents_args *args, int *retval)
nbytes = resid + linuxreclen;
eof:
*retval = nbytes - resid;
p->p_retval[0] = nbytes - resid;
out:
if (cookies)
free(cookies, M_TEMP);
@ -570,7 +571,7 @@ linux_getdents(struct proc *p, struct linux_getdents_args *args, int *retval)
*/
int
linux_access(struct proc *p, struct linux_access_args *args, int *retval)
linux_access(struct proc *p, struct linux_access_args *args)
{
struct access_args bsd;
caddr_t sg;
@ -585,11 +586,11 @@ linux_access(struct proc *p, struct linux_access_args *args, int *retval)
bsd.path = args->path;
bsd.flags = args->flags;
return access(p, &bsd, retval);
return access(p, &bsd);
}
int
linux_unlink(struct proc *p, struct linux_unlink_args *args, int *retval)
linux_unlink(struct proc *p, struct linux_unlink_args *args)
{
struct unlink_args bsd;
caddr_t sg;
@ -603,11 +604,11 @@ linux_unlink(struct proc *p, struct linux_unlink_args *args, int *retval)
#endif
bsd.path = args->path;
return unlink(p, &bsd, retval);
return unlink(p, &bsd);
}
int
linux_chdir(struct proc *p, struct linux_chdir_args *args, int *retval)
linux_chdir(struct proc *p, struct linux_chdir_args *args)
{
struct chdir_args bsd;
caddr_t sg;
@ -621,11 +622,11 @@ linux_chdir(struct proc *p, struct linux_chdir_args *args, int *retval)
#endif
bsd.path = args->path;
return chdir(p, &bsd, retval);
return chdir(p, &bsd);
}
int
linux_chmod(struct proc *p, struct linux_chmod_args *args, int *retval)
linux_chmod(struct proc *p, struct linux_chmod_args *args)
{
struct chmod_args bsd;
caddr_t sg;
@ -640,11 +641,11 @@ linux_chmod(struct proc *p, struct linux_chmod_args *args, int *retval)
bsd.path = args->path;
bsd.mode = args->mode;
return chmod(p, &bsd, retval);
return chmod(p, &bsd);
}
int
linux_chown(struct proc *p, struct linux_chown_args *args, int *retval)
linux_chown(struct proc *p, struct linux_chown_args *args)
{
struct chown_args bsd;
caddr_t sg;
@ -661,11 +662,11 @@ linux_chown(struct proc *p, struct linux_chown_args *args, int *retval)
bsd.uid = args->uid;
bsd.gid = args->gid;
return chown(p, &bsd, retval);
return chown(p, &bsd);
}
int
linux_mkdir(struct proc *p, struct linux_mkdir_args *args, int *retval)
linux_mkdir(struct proc *p, struct linux_mkdir_args *args)
{
struct mkdir_args bsd;
caddr_t sg;
@ -680,11 +681,11 @@ linux_mkdir(struct proc *p, struct linux_mkdir_args *args, int *retval)
bsd.path = args->path;
bsd.mode = args->mode;
return mkdir(p, &bsd, retval);
return mkdir(p, &bsd);
}
int
linux_rmdir(struct proc *p, struct linux_rmdir_args *args, int *retval)
linux_rmdir(struct proc *p, struct linux_rmdir_args *args)
{
struct rmdir_args bsd;
caddr_t sg;
@ -698,11 +699,11 @@ linux_rmdir(struct proc *p, struct linux_rmdir_args *args, int *retval)
#endif
bsd.path = args->path;
return rmdir(p, &bsd, retval);
return rmdir(p, &bsd);
}
int
linux_rename(struct proc *p, struct linux_rename_args *args, int *retval)
linux_rename(struct proc *p, struct linux_rename_args *args)
{
struct rename_args bsd;
caddr_t sg;
@ -718,11 +719,11 @@ linux_rename(struct proc *p, struct linux_rename_args *args, int *retval)
bsd.from = args->from;
bsd.to = args->to;
return rename(p, &bsd, retval);
return rename(p, &bsd);
}
int
linux_symlink(struct proc *p, struct linux_symlink_args *args, int *retval)
linux_symlink(struct proc *p, struct linux_symlink_args *args)
{
struct symlink_args bsd;
caddr_t sg;
@ -738,11 +739,11 @@ linux_symlink(struct proc *p, struct linux_symlink_args *args, int *retval)
bsd.path = args->path;
bsd.link = args->to;
return symlink(p, &bsd, retval);
return symlink(p, &bsd);
}
int
linux_execve(struct proc *p, struct linux_execve_args *args, int *retval)
linux_execve(struct proc *p, struct linux_execve_args *args)
{
struct execve_args bsd;
caddr_t sg;
@ -758,11 +759,11 @@ linux_execve(struct proc *p, struct linux_execve_args *args, int *retval)
bsd.argv = args->argp;
bsd.envv = args->envp;
return execve(p, &bsd, retval);
return execve(p, &bsd);
}
int
linux_readlink(struct proc *p, struct linux_readlink_args *args, int *retval)
linux_readlink(struct proc *p, struct linux_readlink_args *args)
{
struct readlink_args bsd;
caddr_t sg;
@ -778,11 +779,11 @@ linux_readlink(struct proc *p, struct linux_readlink_args *args, int *retval)
bsd.buf = args->buf;
bsd.count = args->count;
return readlink(p, &bsd, retval);
return readlink(p, &bsd);
}
int
linux_truncate(struct proc *p, struct linux_truncate_args *args, int *retval)
linux_truncate(struct proc *p, struct linux_truncate_args *args)
{
struct otruncate_args bsd;
caddr_t sg;
@ -796,6 +797,6 @@ linux_truncate(struct proc *p, struct linux_truncate_args *args, int *retval)
#endif
bsd.path = args->path;
return otruncate(p, &bsd, retval);
return otruncate(p, &bsd);
}

View File

@ -25,7 +25,7 @@
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
* $Id: linux_ioctl.c,v 1.19 1997/06/02 10:43:41 dfr Exp $
* $Id: linux_ioctl.c,v 1.20 1997/07/20 16:05:59 bde Exp $
*/
#include <sys/param.h>
@ -447,7 +447,7 @@ linux_tiocsserial(struct file *fp, struct linux_serial_struct *lss)
}
int
linux_ioctl(struct proc *p, struct linux_ioctl_args *args, int *retval)
linux_ioctl(struct proc *p, struct linux_ioctl_args *args)
{
struct termios bsd_termios;
struct linux_termios linux_termios;
@ -513,79 +513,79 @@ linux_ioctl(struct proc *p, struct linux_ioctl_args *args, int *retval)
case LINUX_TIOCGPGRP:
args->cmd = TIOCGPGRP;
return ioctl(p, (struct ioctl_args *)args, retval);
return ioctl(p, (struct ioctl_args *)args);
case LINUX_TIOCSPGRP:
args->cmd = TIOCSPGRP;
return ioctl(p, (struct ioctl_args *)args, retval);
return ioctl(p, (struct ioctl_args *)args);
case LINUX_TIOCGWINSZ:
args->cmd = TIOCGWINSZ;
return ioctl(p, (struct ioctl_args *)args, retval);
return ioctl(p, (struct ioctl_args *)args);
case LINUX_TIOCSWINSZ:
args->cmd = TIOCSWINSZ;
return ioctl(p, (struct ioctl_args *)args, retval);
return ioctl(p, (struct ioctl_args *)args);
case LINUX_FIONREAD:
args->cmd = FIONREAD;
return ioctl(p, (struct ioctl_args *)args, retval);
return ioctl(p, (struct ioctl_args *)args);
case LINUX_FIONBIO:
args->cmd = FIONBIO;
return ioctl(p, (struct ioctl_args *)args, retval);
return ioctl(p, (struct ioctl_args *)args);
case LINUX_FIOASYNC:
args->cmd = FIOASYNC;
return ioctl(p, (struct ioctl_args *)args, retval);
return ioctl(p, (struct ioctl_args *)args);
case LINUX_FIONCLEX:
args->cmd = FIONCLEX;
return ioctl(p, (struct ioctl_args *)args, retval);
return ioctl(p, (struct ioctl_args *)args);
case LINUX_FIOCLEX:
args->cmd = FIOCLEX;
return ioctl(p, (struct ioctl_args *)args, retval);
return ioctl(p, (struct ioctl_args *)args);
case LINUX_TIOCEXCL:
args->cmd = TIOCEXCL;
return ioctl(p, (struct ioctl_args *)args, retval);
return ioctl(p, (struct ioctl_args *)args);
case LINUX_TIOCNXCL:
args->cmd = TIOCNXCL;
return ioctl(p, (struct ioctl_args *)args, retval);
return ioctl(p, (struct ioctl_args *)args);
case LINUX_TIOCCONS:
args->cmd = TIOCCONS;
return ioctl(p, (struct ioctl_args *)args, retval);
return ioctl(p, (struct ioctl_args *)args);
case LINUX_TIOCNOTTY:
args->cmd = TIOCNOTTY;
return ioctl(p, (struct ioctl_args *)args, retval);
return ioctl(p, (struct ioctl_args *)args);
case LINUX_SIOCGIFCONF:
args->cmd = OSIOCGIFCONF;
return ioctl(p, (struct ioctl_args *)args, retval);
return ioctl(p, (struct ioctl_args *)args);
case LINUX_SIOCGIFFLAGS:
args->cmd = SIOCGIFFLAGS;
return ioctl(p, (struct ioctl_args *)args, retval);
return ioctl(p, (struct ioctl_args *)args);
case LINUX_SIOCGIFADDR:
args->cmd = OSIOCGIFADDR;
return ioctl(p, (struct ioctl_args *)args, retval);
return ioctl(p, (struct ioctl_args *)args);
case LINUX_SIOCGIFDSTADDR:
args->cmd = OSIOCGIFDSTADDR;
return ioctl(p, (struct ioctl_args *)args, retval);
return ioctl(p, (struct ioctl_args *)args);
case LINUX_SIOCGIFBRDADDR:
args->cmd = OSIOCGIFBRDADDR;
return ioctl(p, (struct ioctl_args *)args, retval);
return ioctl(p, (struct ioctl_args *)args);
case LINUX_SIOCGIFNETMASK:
args->cmd = OSIOCGIFNETMASK;
return ioctl(p, (struct ioctl_args *)args, retval);
return ioctl(p, (struct ioctl_args *)args);
/* get hardware address */
case LINUX_SIOCGIFHWADDR:
@ -621,11 +621,11 @@ linux_ioctl(struct proc *p, struct linux_ioctl_args *args, int *retval)
case LINUX_SIOCADDMULTI:
args->cmd = SIOCADDMULTI;
return ioctl(p, (struct ioctl_args *)args, retval);
return ioctl(p, (struct ioctl_args *)args);
case LINUX_SIOCDELMULTI:
args->cmd = SIOCDELMULTI;
return ioctl(p, (struct ioctl_args *)args, retval);
return ioctl(p, (struct ioctl_args *)args);
case LINUX_TIOCSETD:
switch (args->arg) {
@ -664,136 +664,136 @@ linux_ioctl(struct proc *p, struct linux_ioctl_args *args, int *retval)
case LINUX_SNDCTL_DSP_RESET:
args->cmd = SNDCTL_DSP_RESET;
return ioctl(p, (struct ioctl_args *)args, retval);
return ioctl(p, (struct ioctl_args *)args);
case LINUX_SNDCTL_DSP_SYNC:
args->cmd = SNDCTL_DSP_SYNC;
return ioctl(p, (struct ioctl_args *)args, retval);
return ioctl(p, (struct ioctl_args *)args);
case LINUX_SNDCTL_DSP_SPEED:
args->cmd = SNDCTL_DSP_SPEED;
return ioctl(p, (struct ioctl_args *)args, retval);
return ioctl(p, (struct ioctl_args *)args);
case LINUX_SNDCTL_DSP_STEREO:
args->cmd = SNDCTL_DSP_STEREO;
return ioctl(p, (struct ioctl_args *)args, retval);
return ioctl(p, (struct ioctl_args *)args);
case LINUX_SNDCTL_DSP_GETBLKSIZE:
/* LINUX_SNDCTL_DSP_SETBLKSIZE */
args->cmd = SNDCTL_DSP_GETBLKSIZE;
return ioctl(p, (struct ioctl_args *)args, retval);
return ioctl(p, (struct ioctl_args *)args);
case LINUX_SNDCTL_DSP_SETFMT:
args->cmd = SNDCTL_DSP_SETFMT;
return ioctl(p, (struct ioctl_args *)args, retval);
return ioctl(p, (struct ioctl_args *)args);
case LINUX_SOUND_PCM_WRITE_CHANNELS:
args->cmd = SOUND_PCM_WRITE_CHANNELS;
return ioctl(p, (struct ioctl_args *)args, retval);
return ioctl(p, (struct ioctl_args *)args);
case LINUX_SOUND_PCM_WRITE_FILTER:
args->cmd = SOUND_PCM_WRITE_FILTER;
return ioctl(p, (struct ioctl_args *)args, retval);
return ioctl(p, (struct ioctl_args *)args);
case LINUX_SNDCTL_DSP_POST:
args->cmd = SNDCTL_DSP_POST;
return ioctl(p, (struct ioctl_args *)args, retval);
return ioctl(p, (struct ioctl_args *)args);
case LINUX_SNDCTL_DSP_SUBDIVIDE:
args->cmd = SNDCTL_DSP_SUBDIVIDE;
return ioctl(p, (struct ioctl_args *)args, retval);
return ioctl(p, (struct ioctl_args *)args);
case LINUX_SNDCTL_DSP_SETFRAGMENT:
args->cmd = SNDCTL_DSP_SETFRAGMENT;
return ioctl(p, (struct ioctl_args *)args, retval);
return ioctl(p, (struct ioctl_args *)args);
case LINUX_SNDCTL_DSP_GETFMTS:
args->cmd = SNDCTL_DSP_GETFMTS;
return ioctl(p, (struct ioctl_args *)args, retval);
return ioctl(p, (struct ioctl_args *)args);
case LINUX_SNDCTL_DSP_GETOSPACE:
args->cmd = SNDCTL_DSP_GETOSPACE;
return ioctl(p, (struct ioctl_args *)args, retval);
return ioctl(p, (struct ioctl_args *)args);
case LINUX_SNDCTL_DSP_GETISPACE:
args->cmd = SNDCTL_DSP_GETISPACE;
return ioctl(p, (struct ioctl_args *)args, retval);
return ioctl(p, (struct ioctl_args *)args);
case LINUX_SNDCTL_DSP_NONBLOCK:
args->cmd = SNDCTL_DSP_NONBLOCK;
return ioctl(p, (struct ioctl_args *)args, retval);
return ioctl(p, (struct ioctl_args *)args);
case LINUX_SOUND_MIXER_WRITE_VOLUME:
args->cmd = SOUND_MIXER_WRITE_VOLUME;
return ioctl(p, (struct ioctl_args *)args, retval);
return ioctl(p, (struct ioctl_args *)args);
case LINUX_SOUND_MIXER_WRITE_BASS:
args->cmd = SOUND_MIXER_WRITE_BASS;
return ioctl(p, (struct ioctl_args *)args, retval);
return ioctl(p, (struct ioctl_args *)args);
case LINUX_SOUND_MIXER_WRITE_TREBLE:
args->cmd = SOUND_MIXER_WRITE_TREBLE;
return ioctl(p, (struct ioctl_args *)args, retval);
return ioctl(p, (struct ioctl_args *)args);
case LINUX_SOUND_MIXER_WRITE_SYNTH:
args->cmd = SOUND_MIXER_WRITE_SYNTH;
return ioctl(p, (struct ioctl_args *)args, retval);
return ioctl(p, (struct ioctl_args *)args);
case LINUX_SOUND_MIXER_WRITE_PCM:
args->cmd = SOUND_MIXER_WRITE_PCM;
return ioctl(p, (struct ioctl_args *)args, retval);
return ioctl(p, (struct ioctl_args *)args);
case LINUX_SOUND_MIXER_WRITE_SPEAKER:
args->cmd = SOUND_MIXER_WRITE_SPEAKER;
return ioctl(p, (struct ioctl_args *)args, retval);
return ioctl(p, (struct ioctl_args *)args);
case LINUX_SOUND_MIXER_WRITE_LINE:
args->cmd = SOUND_MIXER_WRITE_LINE;
return ioctl(p, (struct ioctl_args *)args, retval);
return ioctl(p, (struct ioctl_args *)args);
case LINUX_SOUND_MIXER_WRITE_MIC:
args->cmd = SOUND_MIXER_WRITE_MIC;
return ioctl(p, (struct ioctl_args *)args, retval);
return ioctl(p, (struct ioctl_args *)args);
case LINUX_SOUND_MIXER_WRITE_CD:
args->cmd = SOUND_MIXER_WRITE_CD;
return ioctl(p, (struct ioctl_args *)args, retval);
return ioctl(p, (struct ioctl_args *)args);
case LINUX_SOUND_MIXER_WRITE_IMIX:
args->cmd = SOUND_MIXER_WRITE_IMIX;
return ioctl(p, (struct ioctl_args *)args, retval);
return ioctl(p, (struct ioctl_args *)args);
case LINUX_SOUND_MIXER_WRITE_ALTPCM:
args->cmd = SOUND_MIXER_WRITE_ALTPCM;
return ioctl(p, (struct ioctl_args *)args, retval);
return ioctl(p, (struct ioctl_args *)args);
case LINUX_SOUND_MIXER_WRITE_RECLEV:
args->cmd = SOUND_MIXER_WRITE_RECLEV;
return ioctl(p, (struct ioctl_args *)args, retval);
return ioctl(p, (struct ioctl_args *)args);
case LINUX_SOUND_MIXER_WRITE_IGAIN:
args->cmd = SOUND_MIXER_WRITE_IGAIN;
return ioctl(p, (struct ioctl_args *)args, retval);
return ioctl(p, (struct ioctl_args *)args);
case LINUX_SOUND_MIXER_WRITE_OGAIN:
args->cmd = SOUND_MIXER_WRITE_OGAIN;
return ioctl(p, (struct ioctl_args *)args, retval);
return ioctl(p, (struct ioctl_args *)args);
case LINUX_SOUND_MIXER_WRITE_LINE1:
args->cmd = SOUND_MIXER_WRITE_LINE1;
return ioctl(p, (struct ioctl_args *)args, retval);
return ioctl(p, (struct ioctl_args *)args);
case LINUX_SOUND_MIXER_WRITE_LINE2:
args->cmd = SOUND_MIXER_WRITE_LINE2;
return ioctl(p, (struct ioctl_args *)args, retval);
return ioctl(p, (struct ioctl_args *)args);
case LINUX_SOUND_MIXER_WRITE_LINE3:
args->cmd = SOUND_MIXER_WRITE_LINE3;
return ioctl(p, (struct ioctl_args *)args, retval);
return ioctl(p, (struct ioctl_args *)args);
case LINUX_SOUND_MIXER_READ_DEVMASK:
args->cmd = SOUND_MIXER_READ_DEVMASK;
return ioctl(p, (struct ioctl_args *)args, retval);
return ioctl(p, (struct ioctl_args *)args);
case LINUX_TIOCGSERIAL:
linux_tiocgserial(fp, (struct linux_serial_struct *)args->arg);
@ -818,7 +818,7 @@ linux_ioctl(struct proc *p, struct linux_ioctl_args *args, int *retval)
default:
return EINVAL;
}
return ioctl(p, (struct ioctl_args *)args, retval);
return ioctl(p, (struct ioctl_args *)args);
}
uprintf("LINUX: 'ioctl' fd=%d, typ=0x%x(%c), num=0x%x not implemented\n",

View File

@ -25,7 +25,7 @@
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
* $Id: linux_ipc.c,v 1.11 1997/08/10 18:15:20 sos Exp $
* $Id: linux_ipc.c,v 1.12 1997/10/28 10:50:02 kato Exp $
*/
@ -40,16 +40,16 @@
#include <i386/linux/linux_proto.h>
#include <i386/linux/linux_util.h>
static int linux_semop __P((struct proc *, struct linux_ipc_args *, int *));
static int linux_semget __P((struct proc *, struct linux_ipc_args *, int *));
static int linux_semctl __P((struct proc *, struct linux_ipc_args *, int *));
static int linux_msgsnd __P((struct proc *, struct linux_ipc_args *, int *));
static int linux_msgrcv __P((struct proc *, struct linux_ipc_args *, int *));
static int linux_msgctl __P((struct proc *, struct linux_ipc_args *, int *));
static int linux_shmat __P((struct proc *, struct linux_ipc_args *, int *));
static int linux_shmdt __P((struct proc *, struct linux_ipc_args *, int *));
static int linux_shmget __P((struct proc *, struct linux_ipc_args *, int *));
static int linux_shmctl __P((struct proc *, struct linux_ipc_args *, int *));
static int linux_semop __P((struct proc *, struct linux_ipc_args *));
static int linux_semget __P((struct proc *, struct linux_ipc_args *));
static int linux_semctl __P((struct proc *, struct linux_ipc_args *));
static int linux_msgsnd __P((struct proc *, struct linux_ipc_args *));
static int linux_msgrcv __P((struct proc *, struct linux_ipc_args *));
static int linux_msgctl __P((struct proc *, struct linux_ipc_args *));
static int linux_shmat __P((struct proc *, struct linux_ipc_args *));
static int linux_shmdt __P((struct proc *, struct linux_ipc_args *));
static int linux_shmget __P((struct proc *, struct linux_ipc_args *));
static int linux_shmctl __P((struct proc *, struct linux_ipc_args *));
struct linux_ipc_perm {
linux_key_t key;
@ -160,7 +160,7 @@ bsd_to_linux_shmid_ds(struct shmid_ds *bsp, struct linux_shmid_ds *lsp)
}
static int
linux_semop(struct proc *p, struct linux_ipc_args *args, int *retval)
linux_semop(struct proc *p, struct linux_ipc_args *args)
{
struct semop_args /* {
int semid;
@ -171,11 +171,11 @@ linux_semop(struct proc *p, struct linux_ipc_args *args, int *retval)
bsd_args.semid = args->arg1;
bsd_args.sops = (struct sembuf *)args->ptr;
bsd_args.nsops = args->arg2;
return semop(p, &bsd_args, retval);
return semop(p, &bsd_args);
}
static int
linux_semget(struct proc *p, struct linux_ipc_args *args, int *retval)
linux_semget(struct proc *p, struct linux_ipc_args *args)
{
struct semget_args /* {
key_t key;
@ -186,11 +186,11 @@ linux_semget(struct proc *p, struct linux_ipc_args *args, int *retval)
bsd_args.key = args->arg1;
bsd_args.nsems = args->arg2;
bsd_args.semflg = args->arg3;
return semget(p, &bsd_args, retval);
return semget(p, &bsd_args);
}
static int
linux_semctl(struct proc *p, struct linux_ipc_args *args, int *retval)
linux_semctl(struct proc *p, struct linux_ipc_args *args)
{
struct linux_semid_ds linux_semid;
struct semid_ds bsd_semid;
@ -246,7 +246,7 @@ linux_semctl(struct proc *p, struct linux_ipc_args *args, int *retval)
if (error)
return error;
bsd_args.arg = (union semun *)unptr;
return __semctl(p, &bsd_args, retval);
return __semctl(p, &bsd_args);
case LINUX_IPC_STAT:
bsd_args.cmd = IPC_STAT;
unptr = stackgap_alloc(&sg, sizeof(union semun *));
@ -255,7 +255,7 @@ linux_semctl(struct proc *p, struct linux_ipc_args *args, int *retval)
if (error)
return error;
bsd_args.arg = (union semun *)unptr;
error = __semctl(p, &bsd_args, retval);
error = __semctl(p, &bsd_args);
if (error)
return error;
error = copyin(dsp, (caddr_t)&bsd_semid, sizeof(bsd_semid));
@ -274,11 +274,11 @@ linux_semctl(struct proc *p, struct linux_ipc_args *args, int *retval)
uprintf("LINUX: 'ipc' typ=%d not implemented\n", args->what);
return EINVAL;
}
return __semctl(p, &bsd_args, retval);
return __semctl(p, &bsd_args);
}
static int
linux_msgsnd(struct proc *p, struct linux_ipc_args *args, int *retval)
linux_msgsnd(struct proc *p, struct linux_ipc_args *args)
{
struct msgsnd_args /* {
int msqid;
@ -291,11 +291,11 @@ linux_msgsnd(struct proc *p, struct linux_ipc_args *args, int *retval)
bsd_args.msgp = args->ptr;
bsd_args.msgsz = args->arg2;
bsd_args.msgflg = args->arg3;
return msgsnd(p, &bsd_args, retval);
return msgsnd(p, &bsd_args);
}
static int
linux_msgrcv(struct proc *p, struct linux_ipc_args *args, int *retval)
linux_msgrcv(struct proc *p, struct linux_ipc_args *args)
{
struct msgrcv_args /* {
int msqid;
@ -310,11 +310,11 @@ linux_msgrcv(struct proc *p, struct linux_ipc_args *args, int *retval)
bsd_args.msgsz = args->arg2;
bsd_args.msgtyp = 0;
bsd_args.msgflg = args->arg3;
return msgrcv(p, &bsd_args, retval);
return msgrcv(p, &bsd_args);
}
static int
linux_msgget(struct proc *p, struct linux_ipc_args *args, int *retval)
linux_msgget(struct proc *p, struct linux_ipc_args *args)
{
struct msgget_args /* {
key_t key;
@ -323,11 +323,11 @@ linux_msgget(struct proc *p, struct linux_ipc_args *args, int *retval)
bsd_args.key = args->arg1;
bsd_args.msgflg = args->arg2;
return msgget(p, &bsd_args, retval);
return msgget(p, &bsd_args);
}
static int
linux_msgctl(struct proc *p, struct linux_ipc_args *args, int *retval)
linux_msgctl(struct proc *p, struct linux_ipc_args *args)
{
struct msgctl_args /* {
int msqid;
@ -338,11 +338,11 @@ linux_msgctl(struct proc *p, struct linux_ipc_args *args, int *retval)
bsd_args.msqid = args->arg1;
bsd_args.cmd = args->arg2;
bsd_args.buf = (struct msqid_ds *)args->ptr;
return msgctl(p, &bsd_args, retval);
return msgctl(p, &bsd_args);
}
static int
linux_shmat(struct proc *p, struct linux_ipc_args *args, int *retval)
linux_shmat(struct proc *p, struct linux_ipc_args *args)
{
struct shmat_args /* {
int shmid;
@ -354,27 +354,27 @@ linux_shmat(struct proc *p, struct linux_ipc_args *args, int *retval)
bsd_args.shmid = args->arg1;
bsd_args.shmaddr = args->ptr;
bsd_args.shmflg = args->arg2;
if ((error = shmat(p, &bsd_args, retval)))
if ((error = shmat(p, &bsd_args)))
return error;
if ((error = copyout(retval, (caddr_t)args->arg3, sizeof(int))))
if ((error = copyout(p->p_retval, (caddr_t)args->arg3, sizeof(int))))
return error;
retval[0] = 0;
p->p_retval[0] = 0;
return 0;
}
static int
linux_shmdt(struct proc *p, struct linux_ipc_args *args, int *retval)
linux_shmdt(struct proc *p, struct linux_ipc_args *args)
{
struct shmdt_args /* {
void *shmaddr;
} */ bsd_args;
bsd_args.shmaddr = args->ptr;
return shmdt(p, &bsd_args, retval);
return shmdt(p, &bsd_args);
}
static int
linux_shmget(struct proc *p, struct linux_ipc_args *args, int *retval)
linux_shmget(struct proc *p, struct linux_ipc_args *args)
{
struct shmget_args /* {
key_t key;
@ -385,11 +385,11 @@ linux_shmget(struct proc *p, struct linux_ipc_args *args, int *retval)
bsd_args.key = args->arg1;
bsd_args.size = args->arg2;
bsd_args.shmflg = args->arg3;
return shmget(p, &bsd_args, retval);
return shmget(p, &bsd_args);
}
static int
linux_shmctl(struct proc *p, struct linux_ipc_args *args, int *retval)
linux_shmctl(struct proc *p, struct linux_ipc_args *args)
{
struct shmid_ds bsd_shmid;
struct linux_shmid_ds linux_shmid;
@ -406,7 +406,7 @@ linux_shmctl(struct proc *p, struct linux_ipc_args *args, int *retval)
bsd_args.shmid = args->arg1;
bsd_args.cmd = IPC_STAT;
bsd_args.buf = (struct shmid_ds*)stackgap_alloc(&sg, sizeof(struct shmid_ds));
if ((error = shmctl(p, &bsd_args, retval)))
if ((error = shmctl(p, &bsd_args)))
return error;
if ((error = copyin((caddr_t)bsd_args.buf, (caddr_t)&bsd_shmid,
sizeof(struct shmid_ds))))
@ -425,7 +425,7 @@ linux_shmctl(struct proc *p, struct linux_ipc_args *args, int *retval)
return error;
bsd_args.shmid = args->arg1;
bsd_args.cmd = IPC_SET;
return shmctl(p, &bsd_args, retval);
return shmctl(p, &bsd_args);
case LINUX_IPC_RMID:
bsd_args.shmid = args->arg1;
@ -438,7 +438,7 @@ linux_shmctl(struct proc *p, struct linux_ipc_args *args, int *retval)
if ((error = copyout((caddr_t)&bsd_shmid, (caddr_t)bsd_args.buf,
sizeof(struct shmid_ds))))
return error;
return shmctl(p, &bsd_args, retval);
return shmctl(p, &bsd_args);
case LINUX_IPC_INFO:
case LINUX_SHM_STAT:
@ -452,31 +452,31 @@ linux_shmctl(struct proc *p, struct linux_ipc_args *args, int *retval)
}
int
linux_ipc(struct proc *p, struct linux_ipc_args *args, int *retval)
linux_ipc(struct proc *p, struct linux_ipc_args *args)
{
switch (args->what) {
case LINUX_SEMOP:
return linux_semop(p, args, retval);
return linux_semop(p, args);
case LINUX_SEMGET:
return linux_semget(p, args, retval);
return linux_semget(p, args);
case LINUX_SEMCTL:
return linux_semctl(p, args, retval);
return linux_semctl(p, args);
case LINUX_MSGSND:
return linux_msgsnd(p, args, retval);
return linux_msgsnd(p, args);
case LINUX_MSGRCV:
return linux_msgrcv(p, args, retval);
return linux_msgrcv(p, args);
case LINUX_MSGGET:
return linux_msgget(p, args, retval);
return linux_msgget(p, args);
case LINUX_MSGCTL:
return linux_msgctl(p, args, retval);
return linux_msgctl(p, args);
case LINUX_SHMAT:
return linux_shmat(p, args, retval);
return linux_shmat(p, args);
case LINUX_SHMDT:
return linux_shmdt(p, args, retval);
return linux_shmdt(p, args);
case LINUX_SHMGET:
return linux_shmget(p, args, retval);
return linux_shmget(p, args);
case LINUX_SHMCTL:
return linux_shmctl(p, args, retval);
return linux_shmctl(p, args);
default:
uprintf("LINUX: 'ipc' typ=%d not implemented\n", args->what);
return ENOSYS;

View File

@ -25,7 +25,7 @@
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
* $Id: linux_misc.c,v 1.31 1997/10/29 08:17:12 kato Exp $
* $Id: linux_misc.c,v 1.32 1997/10/30 10:53:30 kato Exp $
*/
#include <sys/param.h>
@ -60,7 +60,7 @@
#include <i386/linux/linux_util.h>
int
linux_alarm(struct proc *p, struct linux_alarm_args *args, int *retval)
linux_alarm(struct proc *p, struct linux_alarm_args *args)
{
struct itimerval it, old_it;
struct timeval tv;
@ -96,12 +96,12 @@ linux_alarm(struct proc *p, struct linux_alarm_args *args, int *retval)
splx(s);
if (old_it.it_value.tv_usec)
old_it.it_value.tv_sec++;
*retval = old_it.it_value.tv_sec;
p->p_retval[0] = old_it.it_value.tv_sec;
return 0;
}
int
linux_brk(struct proc *p, struct linux_brk_args *args, int *retval)
linux_brk(struct proc *p, struct linux_brk_args *args)
{
#if 0
struct vmspace *vm = p->p_vmspace;
@ -116,7 +116,7 @@ linux_brk(struct proc *p, struct linux_brk_args *args, int *retval)
old = round_page((vm_offset_t)vm->vm_daddr) + ctob(vm->vm_dsize);
new = round_page((vm_offset_t)args->dsend);
*retval = old;
p->p_retval[0] = old;
if ((new-old) > 0) {
if (swap_pager_full)
return ENOMEM;
@ -125,7 +125,7 @@ linux_brk(struct proc *p, struct linux_brk_args *args, int *retval)
if (error)
return error;
vm->vm_dsize += btoc((new-old));
*retval = (int)(vm->vm_daddr + ctob(vm->vm_dsize));
p->p_retval[0] = (int)(vm->vm_daddr + ctob(vm->vm_dsize));
}
return 0;
#else
@ -141,17 +141,17 @@ linux_brk(struct proc *p, struct linux_brk_args *args, int *retval)
old = (vm_offset_t)vm->vm_daddr + ctob(vm->vm_dsize);
new = (vm_offset_t)args->dsend;
tmp.nsize = (char *) new;
if (((caddr_t)new > vm->vm_daddr) && !obreak(p, &tmp, retval))
retval[0] = (int)new;
if (((caddr_t)new > vm->vm_daddr) && !obreak(p, &tmp))
p->p_retval[0] = (int)new;
else
retval[0] = (int)old;
p->p_retval[0] = (int)old;
return 0;
#endif
}
int
linux_uselib(struct proc *p, struct linux_uselib_args *args, int *retval)
linux_uselib(struct proc *p, struct linux_uselib_args *args)
{
struct nameidata ni;
struct vnode *vp;
@ -408,7 +408,7 @@ struct linux_select_argv {
};
int
linux_select(struct proc *p, struct linux_select_args *args, int *retval)
linux_select(struct proc *p, struct linux_select_args *args)
{
struct linux_select_argv linux_args;
struct linux_newselect_args newsel;
@ -428,11 +428,11 @@ linux_select(struct proc *p, struct linux_select_args *args, int *retval)
newsel.exceptfds = linux_args.exceptfds;
newsel.timeout = linux_args.timeout;
return linux_newselect(p, &newsel, retval);
return linux_newselect(p, &newsel);
}
int
linux_newselect(struct proc *p, struct linux_newselect_args *args, int *retval)
linux_newselect(struct proc *p, struct linux_newselect_args *args)
{
struct select_args bsa;
struct timeval tv0, tv1, utv, *tvp;
@ -484,7 +484,7 @@ linux_newselect(struct proc *p, struct linux_newselect_args *args, int *retval)
microtime(&tv0);
}
error = select(p, &bsa, retval);
error = select(p, &bsa);
#ifdef DEBUG
printf("Linux-emul(%d): real select returns %d\n",
p->p_pid, error);
@ -501,7 +501,7 @@ linux_newselect(struct proc *p, struct linux_newselect_args *args, int *retval)
}
if (args->timeout) {
if (*retval) {
if (p->p_retval[0]) {
/*
* Compute how much time was left of the timeout,
* by subtracting the current time and the time
@ -532,7 +532,7 @@ linux_newselect(struct proc *p, struct linux_newselect_args *args, int *retval)
}
int
linux_getpgid(struct proc *p, struct linux_getpgid_args *args, int *retval)
linux_getpgid(struct proc *p, struct linux_getpgid_args *args)
{
struct proc *curproc;
@ -545,22 +545,22 @@ linux_getpgid(struct proc *p, struct linux_getpgid_args *args, int *retval)
}
else
curproc = p;
*retval = curproc->p_pgid;
p->p_retval[0] = curproc->p_pgid;
return 0;
}
int
linux_fork(struct proc *p, struct linux_fork_args *args, int *retval)
linux_fork(struct proc *p, struct linux_fork_args *args)
{
int error;
#ifdef DEBUG
printf("Linux-emul(%d): fork()\n", p->p_pid);
#endif
if (error = fork(p, (struct fork_args *)args, retval))
if (error = fork(p, (struct fork_args *)args))
return error;
if (retval[1] == 1)
retval[0] = 0;
if (p->p_retval[1] == 1)
p->p_retval[0] = 0;
return 0;
}
@ -575,7 +575,7 @@ struct linux_mmap_argv {
};
int
linux_mmap(struct proc *p, struct linux_mmap_args *args, int *retval)
linux_mmap(struct proc *p, struct linux_mmap_args *args)
{
struct mmap_args /* {
caddr_t addr;
@ -612,11 +612,11 @@ linux_mmap(struct proc *p, struct linux_mmap_args *args, int *retval)
bsd_args.fd = linux_args.fd;
bsd_args.pos = linux_args.pos;
bsd_args.pad = 0;
return mmap(p, &bsd_args, retval);
return mmap(p, &bsd_args);
}
int
linux_msync(struct proc *p, struct linux_msync_args *args, int *retval)
linux_msync(struct proc *p, struct linux_msync_args *args)
{
struct msync_args bsd_args;
@ -624,27 +624,27 @@ linux_msync(struct proc *p, struct linux_msync_args *args, int *retval)
bsd_args.len = args->len;
bsd_args.flags = 0; /* XXX ignore */
return msync(p, &bsd_args, retval);
return msync(p, &bsd_args);
}
int
linux_pipe(struct proc *p, struct linux_pipe_args *args, int *retval)
linux_pipe(struct proc *p, struct linux_pipe_args *args)
{
int error;
#ifdef DEBUG
printf("Linux-emul(%d): pipe(*)\n", p->p_pid);
#endif
if (error = pipe(p, 0, retval))
if (error = pipe(p, 0))
return error;
if (error = copyout(retval, args->pipefds, 2*sizeof(int)))
if (error = copyout(p->p_retval, args->pipefds, 2*sizeof(int)))
return error;
*retval = 0;
p->p_retval[0] = 0;
return 0;
}
int
linux_time(struct proc *p, struct linux_time_args *args, int *retval)
linux_time(struct proc *p, struct linux_time_args *args)
{
struct timeval tv;
linux_time_t tm;
@ -657,7 +657,7 @@ linux_time(struct proc *p, struct linux_time_args *args, int *retval)
tm = tv.tv_sec;
if (args->tm && (error = copyout(&tm, args->tm, sizeof(linux_time_t))))
return error;
*retval = tm;
p->p_retval[0] = tm;
return 0;
}
@ -672,7 +672,7 @@ struct linux_times_argv {
#define CONVTCK(r) (r.tv_sec * CLK_TCK + r.tv_usec / (1000000 / CLK_TCK))
int
linux_times(struct proc *p, struct linux_times_args *args, int *retval)
linux_times(struct proc *p, struct linux_times_args *args)
{
struct timeval tv;
struct linux_times_argv tms;
@ -696,7 +696,7 @@ linux_times(struct proc *p, struct linux_times_args *args, int *retval)
microtime(&tv);
timevalsub(&tv, &boottime);
*retval = (int)CONVTCK(tv);
p->p_retval[0] = (int)CONVTCK(tv);
return 0;
}
@ -711,7 +711,7 @@ struct linux_newuname_t {
};
int
linux_newuname(struct proc *p, struct linux_newuname_args *args, int *retval)
linux_newuname(struct proc *p, struct linux_newuname_args *args)
{
struct linux_newuname_t linux_newuname;
@ -735,7 +735,7 @@ struct linux_utimbuf {
};
int
linux_utime(struct proc *p, struct linux_utime_args *args, int *retval)
linux_utime(struct proc *p, struct linux_utime_args *args)
{
struct utimes_args /* {
char *path;
@ -768,11 +768,11 @@ linux_utime(struct proc *p, struct linux_utime_args *args, int *retval)
bsdutimes.tptr = NULL;
bsdutimes.path = args->fname;
return utimes(p, &bsdutimes, retval);
return utimes(p, &bsdutimes);
}
int
linux_waitpid(struct proc *p, struct linux_waitpid_args *args, int *retval)
linux_waitpid(struct proc *p, struct linux_waitpid_args *args)
{
struct wait_args /* {
int pid;
@ -791,7 +791,7 @@ linux_waitpid(struct proc *p, struct linux_waitpid_args *args, int *retval)
tmp.options = args->options;
tmp.rusage = NULL;
if (error = wait4(p, &tmp, retval))
if (error = wait4(p, &tmp))
return error;
if (args->status) {
if (error = copyin(args->status, &tmpstat, sizeof(int)))
@ -808,7 +808,7 @@ linux_waitpid(struct proc *p, struct linux_waitpid_args *args, int *retval)
}
int
linux_wait4(struct proc *p, struct linux_wait4_args *args, int *retval)
linux_wait4(struct proc *p, struct linux_wait4_args *args)
{
struct wait_args /* {
int pid;
@ -827,7 +827,7 @@ linux_wait4(struct proc *p, struct linux_wait4_args *args, int *retval)
tmp.options = args->options;
tmp.rusage = args->rusage;
if (error = wait4(p, &tmp, retval))
if (error = wait4(p, &tmp))
return error;
p->p_siglist &= ~sigmask(SIGCHLD);
@ -847,7 +847,7 @@ linux_wait4(struct proc *p, struct linux_wait4_args *args, int *retval)
}
int
linux_mknod(struct proc *p, struct linux_mknod_args *args, int *retval)
linux_mknod(struct proc *p, struct linux_mknod_args *args)
{
caddr_t sg;
struct mknod_args bsd_mknod;
@ -865,12 +865,12 @@ linux_mknod(struct proc *p, struct linux_mknod_args *args, int *retval)
if (args->mode & S_IFIFO) {
bsd_mkfifo.path = args->path;
bsd_mkfifo.mode = args->mode;
return mkfifo(p, &bsd_mkfifo, retval);
return mkfifo(p, &bsd_mkfifo);
} else {
bsd_mknod.path = args->path;
bsd_mknod.mode = args->mode;
bsd_mknod.dev = args->dev;
return mknod(p, &bsd_mknod, retval);
return mknod(p, &bsd_mknod);
}
}
@ -878,8 +878,7 @@ linux_mknod(struct proc *p, struct linux_mknod_args *args, int *retval)
* UGH! This is just about the dumbest idea I've ever heard!!
*/
int
linux_personality(struct proc *p, struct linux_personality_args *args,
int *retval)
linux_personality(struct proc *p, struct linux_personality_args *args)
{
#ifdef DEBUG
printf("Linux-emul(%d): personality(%d)\n",
@ -889,7 +888,7 @@ linux_personality(struct proc *p, struct linux_personality_args *args,
return EINVAL;
/* Yes Jim, it's still a Linux... */
retval[0] = 0;
p->p_retval[0] = 0;
return 0;
}
@ -897,7 +896,7 @@ linux_personality(struct proc *p, struct linux_personality_args *args,
* Wrappers for get/setitimer for debugging..
*/
int
linux_setitimer(struct proc *p, struct linux_setitimer_args *args, int *retval)
linux_setitimer(struct proc *p, struct linux_setitimer_args *args)
{
struct setitimer_args bsa;
struct itimerval foo;
@ -919,11 +918,11 @@ linux_setitimer(struct proc *p, struct linux_setitimer_args *args, int *retval)
printf("setitimer: interval: sec: %d, usec: %d\n", foo.it_interval.tv_sec, foo.it_interval.tv_usec);
#endif
}
return setitimer(p, &bsa, retval);
return setitimer(p, &bsa);
}
int
linux_getitimer(struct proc *p, struct linux_getitimer_args *args, int *retval)
linux_getitimer(struct proc *p, struct linux_getitimer_args *args)
{
struct getitimer_args bsa;
#ifdef DEBUG
@ -932,11 +931,11 @@ linux_getitimer(struct proc *p, struct linux_getitimer_args *args, int *retval)
#endif
bsa.which = args->which;
bsa.itv = args->itv;
return getitimer(p, &bsa, retval);
return getitimer(p, &bsa);
}
int
linux_iopl(struct proc *p, struct linux_iopl_args *args, int *retval)
linux_iopl(struct proc *p, struct linux_iopl_args *args)
{
int error;
@ -950,13 +949,13 @@ linux_iopl(struct proc *p, struct linux_iopl_args *args, int *retval)
}
int
linux_nice(struct proc *p, struct linux_nice_args *args, int *retval)
linux_nice(struct proc *p, struct linux_nice_args *args)
{
struct setpriority_args bsd_args;
bsd_args.which = PRIO_PROCESS;
bsd_args.who = 0; /* current process */
bsd_args.prio = args->inc;
return setpriority(p, &bsd_args, retval);
return setpriority(p, &bsd_args);
}

View File

@ -362,100 +362,100 @@ struct linux_msync_args {
int len;
int fl;
};
int linux_setup __P((struct proc *, struct linux_setup_args *, int []));
int linux_fork __P((struct proc *, struct linux_fork_args *, int []));
int linux_open __P((struct proc *, struct linux_open_args *, int []));
int linux_waitpid __P((struct proc *, struct linux_waitpid_args *, int []));
int linux_creat __P((struct proc *, struct linux_creat_args *, int []));
int linux_unlink __P((struct proc *, struct linux_unlink_args *, int []));
int linux_execve __P((struct proc *, struct linux_execve_args *, int []));
int linux_chdir __P((struct proc *, struct linux_chdir_args *, int []));
int linux_time __P((struct proc *, struct linux_time_args *, int []));
int linux_mknod __P((struct proc *, struct linux_mknod_args *, int []));
int linux_chmod __P((struct proc *, struct linux_chmod_args *, int []));
int linux_chown __P((struct proc *, struct linux_chown_args *, int []));
int linux_break __P((struct proc *, struct linux_break_args *, int []));
int linux_stat __P((struct proc *, struct linux_stat_args *, int []));
int linux_lseek __P((struct proc *, struct linux_lseek_args *, int []));
int linux_mount __P((struct proc *, struct linux_mount_args *, int []));
int linux_umount __P((struct proc *, struct linux_umount_args *, int []));
int linux_stime __P((struct proc *, struct linux_stime_args *, int []));
int linux_ptrace __P((struct proc *, struct linux_ptrace_args *, int []));
int linux_alarm __P((struct proc *, struct linux_alarm_args *, int []));
int linux_fstat __P((struct proc *, struct linux_fstat_args *, int []));
int linux_pause __P((struct proc *, struct linux_pause_args *, int []));
int linux_utime __P((struct proc *, struct linux_utime_args *, int []));
int linux_stty __P((struct proc *, struct linux_stty_args *, int []));
int linux_gtty __P((struct proc *, struct linux_gtty_args *, int []));
int linux_access __P((struct proc *, struct linux_access_args *, int []));
int linux_nice __P((struct proc *, struct linux_nice_args *, int []));
int linux_ftime __P((struct proc *, struct linux_ftime_args *, int []));
int linux_kill __P((struct proc *, struct linux_kill_args *, int []));
int linux_rename __P((struct proc *, struct linux_rename_args *, int []));
int linux_mkdir __P((struct proc *, struct linux_mkdir_args *, int []));
int linux_rmdir __P((struct proc *, struct linux_rmdir_args *, int []));
int linux_pipe __P((struct proc *, struct linux_pipe_args *, int []));
int linux_times __P((struct proc *, struct linux_times_args *, int []));
int linux_prof __P((struct proc *, struct linux_prof_args *, int []));
int linux_brk __P((struct proc *, struct linux_brk_args *, int []));
int linux_signal __P((struct proc *, struct linux_signal_args *, int []));
int linux_phys __P((struct proc *, struct linux_phys_args *, int []));
int linux_lock __P((struct proc *, struct linux_lock_args *, int []));
int linux_ioctl __P((struct proc *, struct linux_ioctl_args *, int []));
int linux_fcntl __P((struct proc *, struct linux_fcntl_args *, int []));
int linux_mpx __P((struct proc *, struct linux_mpx_args *, int []));
int linux_ulimit __P((struct proc *, struct linux_ulimit_args *, int []));
int linux_olduname __P((struct proc *, struct linux_olduname_args *, int []));
int linux_ustat __P((struct proc *, struct linux_ustat_args *, int []));
int linux_sigaction __P((struct proc *, struct linux_sigaction_args *, int []));
int linux_siggetmask __P((struct proc *, struct linux_siggetmask_args *, int []));
int linux_sigsetmask __P((struct proc *, struct linux_sigsetmask_args *, int []));
int linux_sigsuspend __P((struct proc *, struct linux_sigsuspend_args *, int []));
int linux_sigpending __P((struct proc *, struct linux_sigpending_args *, int []));
int linux_select __P((struct proc *, struct linux_select_args *, int []));
int linux_symlink __P((struct proc *, struct linux_symlink_args *, int []));
int linux_readlink __P((struct proc *, struct linux_readlink_args *, int []));
int linux_uselib __P((struct proc *, struct linux_uselib_args *, int []));
int linux_readdir __P((struct proc *, struct linux_readdir_args *, int []));
int linux_mmap __P((struct proc *, struct linux_mmap_args *, int []));
int linux_truncate __P((struct proc *, struct linux_truncate_args *, int []));
int linux_statfs __P((struct proc *, struct linux_statfs_args *, int []));
int linux_fstatfs __P((struct proc *, struct linux_fstatfs_args *, int []));
int linux_ioperm __P((struct proc *, struct linux_ioperm_args *, int []));
int linux_socketcall __P((struct proc *, struct linux_socketcall_args *, int []));
int linux_ksyslog __P((struct proc *, struct linux_ksyslog_args *, int []));
int linux_setitimer __P((struct proc *, struct linux_setitimer_args *, int []));
int linux_getitimer __P((struct proc *, struct linux_getitimer_args *, int []));
int linux_newstat __P((struct proc *, struct linux_newstat_args *, int []));
int linux_newlstat __P((struct proc *, struct linux_newlstat_args *, int []));
int linux_newfstat __P((struct proc *, struct linux_newfstat_args *, int []));
int linux_uname __P((struct proc *, struct linux_uname_args *, int []));
int linux_iopl __P((struct proc *, struct linux_iopl_args *, int []));
int linux_vhangup __P((struct proc *, struct linux_vhangup_args *, int []));
int linux_idle __P((struct proc *, struct linux_idle_args *, int []));
int linux_vm86 __P((struct proc *, struct linux_vm86_args *, int []));
int linux_wait4 __P((struct proc *, struct linux_wait4_args *, int []));
int linux_swapoff __P((struct proc *, struct linux_swapoff_args *, int []));
int linux_sysinfo __P((struct proc *, struct linux_sysinfo_args *, int []));
int linux_ipc __P((struct proc *, struct linux_ipc_args *, int []));
int linux_sigreturn __P((struct proc *, struct linux_sigreturn_args *, int []));
int linux_clone __P((struct proc *, struct linux_clone_args *, int []));
int linux_newuname __P((struct proc *, struct linux_newuname_args *, int []));
int linux_modify_ldt __P((struct proc *, struct linux_modify_ldt_args *, int []));
int linux_adjtimex __P((struct proc *, struct linux_adjtimex_args *, int []));
int linux_sigprocmask __P((struct proc *, struct linux_sigprocmask_args *, int []));
int linux_create_module __P((struct proc *, struct linux_create_module_args *, int []));
int linux_init_module __P((struct proc *, struct linux_init_module_args *, int []));
int linux_delete_module __P((struct proc *, struct linux_delete_module_args *, int []));
int linux_get_kernel_syms __P((struct proc *, struct linux_get_kernel_syms_args *, int []));
int linux_quotactl __P((struct proc *, struct linux_quotactl_args *, int []));
int linux_getpgid __P((struct proc *, struct linux_getpgid_args *, int []));
int linux_bdflush __P((struct proc *, struct linux_bdflush_args *, int []));
int linux_personality __P((struct proc *, struct linux_personality_args *, int []));
int linux_llseek __P((struct proc *, struct linux_llseek_args *, int []));
int linux_getdents __P((struct proc *, struct linux_getdents_args *, int []));
int linux_newselect __P((struct proc *, struct linux_newselect_args *, int []));
int linux_msync __P((struct proc *, struct linux_msync_args *, int []));
int linux_setup __P((struct proc *, struct linux_setup_args *));
int linux_fork __P((struct proc *, struct linux_fork_args *));
int linux_open __P((struct proc *, struct linux_open_args *));
int linux_waitpid __P((struct proc *, struct linux_waitpid_args *));
int linux_creat __P((struct proc *, struct linux_creat_args *));
int linux_unlink __P((struct proc *, struct linux_unlink_args *));
int linux_execve __P((struct proc *, struct linux_execve_args *));
int linux_chdir __P((struct proc *, struct linux_chdir_args *));
int linux_time __P((struct proc *, struct linux_time_args *));
int linux_mknod __P((struct proc *, struct linux_mknod_args *));
int linux_chmod __P((struct proc *, struct linux_chmod_args *));
int linux_chown __P((struct proc *, struct linux_chown_args *));
int linux_break __P((struct proc *, struct linux_break_args *));
int linux_stat __P((struct proc *, struct linux_stat_args *));
int linux_lseek __P((struct proc *, struct linux_lseek_args *));
int linux_mount __P((struct proc *, struct linux_mount_args *));
int linux_umount __P((struct proc *, struct linux_umount_args *));
int linux_stime __P((struct proc *, struct linux_stime_args *));
int linux_ptrace __P((struct proc *, struct linux_ptrace_args *));
int linux_alarm __P((struct proc *, struct linux_alarm_args *));
int linux_fstat __P((struct proc *, struct linux_fstat_args *));
int linux_pause __P((struct proc *, struct linux_pause_args *));
int linux_utime __P((struct proc *, struct linux_utime_args *));
int linux_stty __P((struct proc *, struct linux_stty_args *));
int linux_gtty __P((struct proc *, struct linux_gtty_args *));
int linux_access __P((struct proc *, struct linux_access_args *));
int linux_nice __P((struct proc *, struct linux_nice_args *));
int linux_ftime __P((struct proc *, struct linux_ftime_args *));
int linux_kill __P((struct proc *, struct linux_kill_args *));
int linux_rename __P((struct proc *, struct linux_rename_args *));
int linux_mkdir __P((struct proc *, struct linux_mkdir_args *));
int linux_rmdir __P((struct proc *, struct linux_rmdir_args *));
int linux_pipe __P((struct proc *, struct linux_pipe_args *));
int linux_times __P((struct proc *, struct linux_times_args *));
int linux_prof __P((struct proc *, struct linux_prof_args *));
int linux_brk __P((struct proc *, struct linux_brk_args *));
int linux_signal __P((struct proc *, struct linux_signal_args *));
int linux_phys __P((struct proc *, struct linux_phys_args *));
int linux_lock __P((struct proc *, struct linux_lock_args *));
int linux_ioctl __P((struct proc *, struct linux_ioctl_args *));
int linux_fcntl __P((struct proc *, struct linux_fcntl_args *));
int linux_mpx __P((struct proc *, struct linux_mpx_args *));
int linux_ulimit __P((struct proc *, struct linux_ulimit_args *));
int linux_olduname __P((struct proc *, struct linux_olduname_args *));
int linux_ustat __P((struct proc *, struct linux_ustat_args *));
int linux_sigaction __P((struct proc *, struct linux_sigaction_args *));
int linux_siggetmask __P((struct proc *, struct linux_siggetmask_args *));
int linux_sigsetmask __P((struct proc *, struct linux_sigsetmask_args *));
int linux_sigsuspend __P((struct proc *, struct linux_sigsuspend_args *));
int linux_sigpending __P((struct proc *, struct linux_sigpending_args *));
int linux_select __P((struct proc *, struct linux_select_args *));
int linux_symlink __P((struct proc *, struct linux_symlink_args *));
int linux_readlink __P((struct proc *, struct linux_readlink_args *));
int linux_uselib __P((struct proc *, struct linux_uselib_args *));
int linux_readdir __P((struct proc *, struct linux_readdir_args *));
int linux_mmap __P((struct proc *, struct linux_mmap_args *));
int linux_truncate __P((struct proc *, struct linux_truncate_args *));
int linux_statfs __P((struct proc *, struct linux_statfs_args *));
int linux_fstatfs __P((struct proc *, struct linux_fstatfs_args *));
int linux_ioperm __P((struct proc *, struct linux_ioperm_args *));
int linux_socketcall __P((struct proc *, struct linux_socketcall_args *));
int linux_ksyslog __P((struct proc *, struct linux_ksyslog_args *));
int linux_setitimer __P((struct proc *, struct linux_setitimer_args *));
int linux_getitimer __P((struct proc *, struct linux_getitimer_args *));
int linux_newstat __P((struct proc *, struct linux_newstat_args *));
int linux_newlstat __P((struct proc *, struct linux_newlstat_args *));
int linux_newfstat __P((struct proc *, struct linux_newfstat_args *));
int linux_uname __P((struct proc *, struct linux_uname_args *));
int linux_iopl __P((struct proc *, struct linux_iopl_args *));
int linux_vhangup __P((struct proc *, struct linux_vhangup_args *));
int linux_idle __P((struct proc *, struct linux_idle_args *));
int linux_vm86 __P((struct proc *, struct linux_vm86_args *));
int linux_wait4 __P((struct proc *, struct linux_wait4_args *));
int linux_swapoff __P((struct proc *, struct linux_swapoff_args *));
int linux_sysinfo __P((struct proc *, struct linux_sysinfo_args *));
int linux_ipc __P((struct proc *, struct linux_ipc_args *));
int linux_sigreturn __P((struct proc *, struct linux_sigreturn_args *));
int linux_clone __P((struct proc *, struct linux_clone_args *));
int linux_newuname __P((struct proc *, struct linux_newuname_args *));
int linux_modify_ldt __P((struct proc *, struct linux_modify_ldt_args *));
int linux_adjtimex __P((struct proc *, struct linux_adjtimex_args *));
int linux_sigprocmask __P((struct proc *, struct linux_sigprocmask_args *));
int linux_create_module __P((struct proc *, struct linux_create_module_args *));
int linux_init_module __P((struct proc *, struct linux_init_module_args *));
int linux_delete_module __P((struct proc *, struct linux_delete_module_args *));
int linux_get_kernel_syms __P((struct proc *, struct linux_get_kernel_syms_args *));
int linux_quotactl __P((struct proc *, struct linux_quotactl_args *));
int linux_getpgid __P((struct proc *, struct linux_getpgid_args *));
int linux_bdflush __P((struct proc *, struct linux_bdflush_args *));
int linux_personality __P((struct proc *, struct linux_personality_args *));
int linux_llseek __P((struct proc *, struct linux_llseek_args *));
int linux_getdents __P((struct proc *, struct linux_getdents_args *));
int linux_newselect __P((struct proc *, struct linux_newselect_args *));
int linux_msync __P((struct proc *, struct linux_msync_args *));
#ifdef COMPAT_43

View File

@ -25,7 +25,7 @@
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
* $Id: linux_signal.c,v 1.8 1997/02/22 09:38:24 peter Exp $
* $Id: linux_signal.c,v 1.9 1997/07/20 16:06:03 bde Exp $
*/
#include <sys/param.h>
@ -104,7 +104,7 @@ bsd_to_linux_sigaction(struct sigaction *bsa, linux_sigaction_t *lsa)
}
int
linux_sigaction(struct proc *p, struct linux_sigaction_args *args, int *retval)
linux_sigaction(struct proc *p, struct linux_sigaction_args *args)
{
linux_sigaction_t linux_sa;
struct sigaction *nsa = NULL, *osa = NULL, bsd_sa;
@ -131,7 +131,7 @@ linux_sigaction(struct proc *p, struct linux_sigaction_args *args, int *retval)
sa.signum = linux_to_bsd_signal[args->sig];
sa.nsa = nsa;
sa.osa = osa;
if ((error = sigaction(p, &sa, retval)))
if ((error = sigaction(p, &sa)))
return error;
if (args->osa) {
@ -145,7 +145,7 @@ linux_sigaction(struct proc *p, struct linux_sigaction_args *args, int *retval)
}
int
linux_signal(struct proc *p, struct linux_signal_args *args, int *retval)
linux_signal(struct proc *p, struct linux_signal_args *args)
{
caddr_t sg;
struct sigaction_args sa_args;
@ -169,21 +169,20 @@ linux_signal(struct proc *p, struct linux_signal_args *args, int *retval)
sa_args.signum = linux_to_bsd_signal[args->sig];
sa_args.osa = osa;
sa_args.nsa = nsa;
if ((error = sigaction(p, &sa_args, retval)))
if ((error = sigaction(p, &sa_args)))
return error;
if ((error = copyin(osa, &tmpsa, sizeof *osa)))
return error;
*retval = (int)tmpsa.sa_handler;
p->p_retval[0] = (int)tmpsa.sa_handler;
return 0;
}
int
linux_sigprocmask(struct proc *p, struct linux_sigprocmask_args *args,
int *retval)
linux_sigprocmask(struct proc *p, struct linux_sigprocmask_args *args)
{
int error, s;
sigset_t mask;
@ -193,7 +192,7 @@ linux_sigprocmask(struct proc *p, struct linux_sigprocmask_args *args,
printf("Linux-emul(%d): sigprocmask(%d, *, *)\n", p->p_pid, args->how);
#endif
*retval = 0;
p->p_retval[0] = 0;
if (args->omask != NULL) {
omask = bsd_to_linux_sigset(p->p_sigmask);
@ -226,17 +225,17 @@ linux_sigprocmask(struct proc *p, struct linux_sigprocmask_args *args,
}
int
linux_siggetmask(struct proc *p, struct linux_siggetmask_args *args, int *retval)
linux_siggetmask(struct proc *p, struct linux_siggetmask_args *args)
{
#ifdef DEBUG
printf("Linux-emul(%d): siggetmask()\n", p->p_pid);
#endif
*retval = bsd_to_linux_sigset(p->p_sigmask);
p->p_retval[0] = bsd_to_linux_sigset(p->p_sigmask);
return 0;
}
int
linux_sigsetmask(struct proc *p, struct linux_sigsetmask_args *args,int *retval)
linux_sigsetmask(struct proc *p, struct linux_sigsetmask_args *args)
{
int s;
sigset_t mask;
@ -244,7 +243,7 @@ linux_sigsetmask(struct proc *p, struct linux_sigsetmask_args *args,int *retval)
#ifdef DEBUG
printf("Linux-emul(%d): sigsetmask(%08x)\n", p->p_pid, args->mask);
#endif
*retval = bsd_to_linux_sigset(p->p_sigmask);
p->p_retval[0] = bsd_to_linux_sigset(p->p_sigmask);
mask = linux_to_bsd_sigset(args->mask);
s = splhigh();
@ -254,7 +253,7 @@ linux_sigsetmask(struct proc *p, struct linux_sigsetmask_args *args,int *retval)
}
int
linux_sigpending(struct proc *p, struct linux_sigpending_args *args,int *retval)
linux_sigpending(struct proc *p, struct linux_sigpending_args *args)
{
linux_sigset_t linux_sig;
@ -271,7 +270,7 @@ linux_sigpending(struct proc *p, struct linux_sigpending_args *args,int *retval)
* enables the signal to happen with a different register set.
*/
int
linux_sigsuspend(struct proc *p, struct linux_sigsuspend_args *args,int *retval)
linux_sigsuspend(struct proc *p, struct linux_sigsuspend_args *args)
{
struct sigsuspend_args tmp;
@ -279,11 +278,11 @@ linux_sigsuspend(struct proc *p, struct linux_sigsuspend_args *args,int *retval)
printf("Linux-emul(%d): sigsuspend(%08x)\n", p->p_pid, args->mask);
#endif
tmp.mask = linux_to_bsd_sigset(args->mask);
return sigsuspend(p, &tmp , retval);
return sigsuspend(p, &tmp);
}
int
linux_pause(struct proc *p, struct linux_pause_args *args,int *retval)
linux_pause(struct proc *p, struct linux_pause_args *args)
{
struct sigsuspend_args tmp;
@ -291,11 +290,11 @@ linux_pause(struct proc *p, struct linux_pause_args *args,int *retval)
printf("Linux-emul(%d): pause()\n", p->p_pid);
#endif
tmp.mask = p->p_sigmask;
return sigsuspend(p, &tmp , retval);
return sigsuspend(p, &tmp);
}
int
linux_kill(struct proc *p, struct linux_kill_args *args, int *retval)
linux_kill(struct proc *p, struct linux_kill_args *args)
{
struct kill_args /* {
int pid;
@ -308,5 +307,5 @@ linux_kill(struct proc *p, struct linux_kill_args *args, int *retval)
#endif
tmp.pid = args->pid;
tmp.signum = linux_to_bsd_signal[args->signum];
return kill(p, &tmp, retval);
return kill(p, &tmp);
}

View File

@ -25,7 +25,7 @@
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
* $Id: linux_socket.c,v 1.7 1997/02/22 09:38:25 peter Exp $
* $Id: linux_socket.c,v 1.8 1997/07/20 16:06:04 bde Exp $
*/
/* XXX we use functions that might not exist. */
@ -138,7 +138,7 @@ struct linux_socket_args {
};
static int
linux_socket(struct proc *p, struct linux_socket_args *args, int *retval)
linux_socket(struct proc *p, struct linux_socket_args *args)
{
struct linux_socket_args linux_args;
struct socket_args /* {
@ -155,7 +155,7 @@ linux_socket(struct proc *p, struct linux_socket_args *args, int *retval)
bsd_args.domain = linux_to_bsd_domain(linux_args.domain);
if (bsd_args.domain == -1)
return EINVAL;
return socket(p, &bsd_args, retval);
return socket(p, &bsd_args);
}
struct linux_bind_args {
@ -165,7 +165,7 @@ struct linux_bind_args {
};
static int
linux_bind(struct proc *p, struct linux_bind_args *args, int *retval)
linux_bind(struct proc *p, struct linux_bind_args *args)
{
struct linux_bind_args linux_args;
struct bind_args /* {
@ -180,7 +180,7 @@ linux_bind(struct proc *p, struct linux_bind_args *args, int *retval)
bsd_args.s = linux_args.s;
bsd_args.name = (caddr_t)linux_args.name;
bsd_args.namelen = linux_args.namelen;
return bind(p, &bsd_args, retval);
return bind(p, &bsd_args);
}
struct linux_connect_args {
@ -190,7 +190,7 @@ struct linux_connect_args {
};
static int
linux_connect(struct proc *p, struct linux_connect_args *args, int *retval)
linux_connect(struct proc *p, struct linux_connect_args *args)
{
struct linux_connect_args linux_args;
struct connect_args /* {
@ -205,7 +205,7 @@ linux_connect(struct proc *p, struct linux_connect_args *args, int *retval)
bsd_args.s = linux_args.s;
bsd_args.name = (caddr_t)linux_args.name;
bsd_args.namelen = linux_args.namelen;
return connect(p, &bsd_args, retval);
return connect(p, &bsd_args);
}
struct linux_listen_args {
@ -214,7 +214,7 @@ struct linux_listen_args {
};
static int
linux_listen(struct proc *p, struct linux_listen_args *args, int *retval)
linux_listen(struct proc *p, struct linux_listen_args *args)
{
struct linux_listen_args linux_args;
struct listen_args /* {
@ -227,7 +227,7 @@ linux_listen(struct proc *p, struct linux_listen_args *args, int *retval)
return error;
bsd_args.s = linux_args.s;
bsd_args.backlog = linux_args.backlog;
return listen(p, &bsd_args, retval);
return listen(p, &bsd_args);
}
struct linux_accept_args {
@ -237,7 +237,7 @@ struct linux_accept_args {
};
static int
linux_accept(struct proc *p, struct linux_accept_args *args, int *retval)
linux_accept(struct proc *p, struct linux_accept_args *args)
{
struct linux_accept_args linux_args;
struct accept_args /* {
@ -252,7 +252,7 @@ linux_accept(struct proc *p, struct linux_accept_args *args, int *retval)
bsd_args.s = linux_args.s;
bsd_args.name = (caddr_t)linux_args.addr;
bsd_args.anamelen = linux_args.namelen;
return oaccept(p, &bsd_args, retval);
return oaccept(p, &bsd_args);
}
struct linux_getsockname_args {
@ -262,7 +262,7 @@ struct linux_getsockname_args {
};
static int
linux_getsockname(struct proc *p, struct linux_getsockname_args *args, int *retval)
linux_getsockname(struct proc *p, struct linux_getsockname_args *args)
{
struct linux_getsockname_args linux_args;
struct getsockname_args /* {
@ -277,7 +277,7 @@ linux_getsockname(struct proc *p, struct linux_getsockname_args *args, int *retv
bsd_args.fdes = linux_args.s;
bsd_args.asa = (caddr_t) linux_args.addr;
bsd_args.alen = linux_args.namelen;
return ogetsockname(p, &bsd_args, retval);
return ogetsockname(p, &bsd_args);
}
struct linux_getpeername_args {
@ -287,7 +287,7 @@ struct linux_getpeername_args {
};
static int
linux_getpeername(struct proc *p, struct linux_getpeername_args *args, int *retval)
linux_getpeername(struct proc *p, struct linux_getpeername_args *args)
{
struct linux_getpeername_args linux_args;
struct ogetpeername_args /* {
@ -302,7 +302,7 @@ linux_getpeername(struct proc *p, struct linux_getpeername_args *args, int *retv
bsd_args.fdes = linux_args.s;
bsd_args.asa = (caddr_t) linux_args.addr;
bsd_args.alen = linux_args.namelen;
return ogetpeername(p, &bsd_args, retval);
return ogetpeername(p, &bsd_args);
}
struct linux_socketpair_args {
@ -313,7 +313,7 @@ struct linux_socketpair_args {
};
static int
linux_socketpair(struct proc *p, struct linux_socketpair_args *args, int *retval)
linux_socketpair(struct proc *p, struct linux_socketpair_args *args)
{
struct linux_socketpair_args linux_args;
struct socketpair_args /* {
@ -332,7 +332,7 @@ linux_socketpair(struct proc *p, struct linux_socketpair_args *args, int *retval
bsd_args.type = linux_args.type;
bsd_args.protocol = linux_args.protocol;
bsd_args.rsv = linux_args.rsv;
return socketpair(p, &bsd_args, retval);
return socketpair(p, &bsd_args);
}
struct linux_send_args {
@ -343,7 +343,7 @@ struct linux_send_args {
};
static int
linux_send(struct proc *p, struct linux_send_args *args, int *retval)
linux_send(struct proc *p, struct linux_send_args *args)
{
struct linux_send_args linux_args;
struct osend_args /* {
@ -360,7 +360,7 @@ linux_send(struct proc *p, struct linux_send_args *args, int *retval)
bsd_args.buf = linux_args.msg;
bsd_args.len = linux_args.len;
bsd_args.flags = linux_args.flags;
return osend(p, &bsd_args, retval);
return osend(p, &bsd_args);
}
struct linux_recv_args {
@ -371,7 +371,7 @@ struct linux_recv_args {
};
static int
linux_recv(struct proc *p, struct linux_recv_args *args, int *retval)
linux_recv(struct proc *p, struct linux_recv_args *args)
{
struct linux_recv_args linux_args;
struct orecv_args /* {
@ -388,7 +388,7 @@ linux_recv(struct proc *p, struct linux_recv_args *args, int *retval)
bsd_args.buf = linux_args.msg;
bsd_args.len = linux_args.len;
bsd_args.flags = linux_args.flags;
return orecv(p, &bsd_args, retval);
return orecv(p, &bsd_args);
}
struct linux_sendto_args {
@ -401,7 +401,7 @@ struct linux_sendto_args {
};
static int
linux_sendto(struct proc *p, struct linux_sendto_args *args, int *retval)
linux_sendto(struct proc *p, struct linux_sendto_args *args)
{
struct linux_sendto_args linux_args;
struct sendto_args /* {
@ -422,7 +422,7 @@ linux_sendto(struct proc *p, struct linux_sendto_args *args, int *retval)
bsd_args.flags = linux_args.flags;
bsd_args.to = linux_args.to;
bsd_args.tolen = linux_args.tolen;
return sendto(p, &bsd_args, retval);
return sendto(p, &bsd_args);
}
struct linux_recvfrom_args {
@ -435,7 +435,7 @@ struct linux_recvfrom_args {
};
static int
linux_recvfrom(struct proc *p, struct linux_recvfrom_args *args, int *retval)
linux_recvfrom(struct proc *p, struct linux_recvfrom_args *args)
{
struct linux_recvfrom_args linux_args;
struct recvfrom_args /* {
@ -456,7 +456,7 @@ linux_recvfrom(struct proc *p, struct linux_recvfrom_args *args, int *retval)
bsd_args.flags = linux_args.flags;
bsd_args.from = linux_args.from;
bsd_args.fromlenaddr = linux_args.fromlen;
return orecvfrom(p, &bsd_args, retval);
return orecvfrom(p, &bsd_args);
}
struct linux_shutdown_args {
@ -465,7 +465,7 @@ struct linux_shutdown_args {
};
static int
linux_shutdown(struct proc *p, struct linux_shutdown_args *args, int *retval)
linux_shutdown(struct proc *p, struct linux_shutdown_args *args)
{
struct linux_shutdown_args linux_args;
struct shutdown_args /* {
@ -478,7 +478,7 @@ linux_shutdown(struct proc *p, struct linux_shutdown_args *args, int *retval)
return error;
bsd_args.s = linux_args.s;
bsd_args.how = linux_args.how;
return shutdown(p, &bsd_args, retval);
return shutdown(p, &bsd_args);
}
struct linux_setsockopt_args {
@ -490,7 +490,7 @@ struct linux_setsockopt_args {
};
static int
linux_setsockopt(struct proc *p, struct linux_setsockopt_args *args, int *retval)
linux_setsockopt(struct proc *p, struct linux_setsockopt_args *args)
{
struct linux_setsockopt_args linux_args;
struct setsockopt_args /* {
@ -521,7 +521,7 @@ linux_setsockopt(struct proc *p, struct linux_setsockopt_args *args, int *retval
bsd_args.name = name;
bsd_args.val = linux_args.optval;
bsd_args.valsize = linux_args.optlen;
return setsockopt(p, &bsd_args, retval);
return setsockopt(p, &bsd_args);
}
struct linux_getsockopt_args {
@ -533,7 +533,7 @@ struct linux_getsockopt_args {
};
static int
linux_getsockopt(struct proc *p, struct linux_getsockopt_args *args, int *retval)
linux_getsockopt(struct proc *p, struct linux_getsockopt_args *args)
{
struct linux_getsockopt_args linux_args;
struct getsockopt_args /* {
@ -563,43 +563,43 @@ linux_getsockopt(struct proc *p, struct linux_getsockopt_args *args, int *retval
return EINVAL;
bsd_args.val = linux_args.optval;
bsd_args.avalsize = linux_args.optlen;
return getsockopt(p, &bsd_args, retval);
return getsockopt(p, &bsd_args);
}
int
linux_socketcall(struct proc *p, struct linux_socketcall_args *args,int *retval)
linux_socketcall(struct proc *p, struct linux_socketcall_args *args)
{
switch (args->what) {
case LINUX_SOCKET:
return linux_socket(p, args->args, retval);
return linux_socket(p, args->args);
case LINUX_BIND:
return linux_bind(p, args->args, retval);
return linux_bind(p, args->args);
case LINUX_CONNECT:
return linux_connect(p, args->args, retval);
return linux_connect(p, args->args);
case LINUX_LISTEN:
return linux_listen(p, args->args, retval);
return linux_listen(p, args->args);
case LINUX_ACCEPT:
return linux_accept(p, args->args, retval);
return linux_accept(p, args->args);
case LINUX_GETSOCKNAME:
return linux_getsockname(p, args->args, retval);
return linux_getsockname(p, args->args);
case LINUX_GETPEERNAME:
return linux_getpeername(p, args->args, retval);
return linux_getpeername(p, args->args);
case LINUX_SOCKETPAIR:
return linux_socketpair(p, args->args, retval);
return linux_socketpair(p, args->args);
case LINUX_SEND:
return linux_send(p, args->args, retval);
return linux_send(p, args->args);
case LINUX_RECV:
return linux_recv(p, args->args, retval);
return linux_recv(p, args->args);
case LINUX_SENDTO:
return linux_sendto(p, args->args, retval);
return linux_sendto(p, args->args);
case LINUX_RECVFROM:
return linux_recvfrom(p, args->args, retval);
return linux_recvfrom(p, args->args);
case LINUX_SHUTDOWN:
return linux_shutdown(p, args->args, retval);
return linux_shutdown(p, args->args);
case LINUX_SETSOCKOPT:
return linux_setsockopt(p, args->args, retval);
return linux_setsockopt(p, args->args);
case LINUX_GETSOCKOPT:
return linux_getsockopt(p, args->args, retval);
return linux_getsockopt(p, args->args);
default:
uprintf("LINUX: 'socket' typ=%d not implemented\n", args->what);
return ENOSYS;

View File

@ -25,7 +25,7 @@
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
* $Id$
* $Id: linux_stats.c,v 1.8 1997/02/22 09:38:25 peter Exp $
*/
#include <sys/param.h>
@ -91,7 +91,7 @@ newstat_copyout(struct stat *buf, void *ubuf)
}
int
linux_newstat(struct proc *p, struct linux_newstat_args *args, int *retval)
linux_newstat(struct proc *p, struct linux_newstat_args *args)
{
struct stat buf;
struct nameidata nd;
@ -119,10 +119,9 @@ linux_newstat(struct proc *p, struct linux_newstat_args *args, int *retval)
* Get file status; this version does not follow links.
*/
int
linux_newlstat(p, uap, retval)
linux_newlstat(p, uap)
struct proc *p;
struct linux_newlstat_args *uap;
int *retval;
{
int error;
struct vnode *vp, *dvp;
@ -178,7 +177,7 @@ linux_newlstat(p, uap, retval)
}
int
linux_newfstat(struct proc *p, struct linux_newfstat_args *args, int *retval)
linux_newfstat(struct proc *p, struct linux_newfstat_args *args)
{
struct filedesc *fdp = p->p_fd;
struct file *fp;
@ -224,7 +223,7 @@ struct linux_statfs_buf {
};
int
linux_statfs(struct proc *p, struct linux_statfs_args *args, int *retval)
linux_statfs(struct proc *p, struct linux_statfs_args *args)
{
struct mount *mp;
struct nameidata *ndp;
@ -265,7 +264,7 @@ linux_statfs(struct proc *p, struct linux_statfs_args *args, int *retval)
}
int
linux_fstatfs(struct proc *p, struct linux_fstatfs_args *args, int *retval)
linux_fstatfs(struct proc *p, struct linux_fstatfs_args *args)
{
struct file *fp;
struct mount *mp;

View File

@ -25,7 +25,7 @@
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
* $Id: linux_sysvec.c,v 1.18 1997/08/25 23:41:39 bde Exp $
* $Id: linux_sysvec.c,v 1.19 1997/09/01 02:12:39 bde Exp $
*/
/* XXX we use functions that might not exist. */
@ -268,10 +268,9 @@ linux_sendsig(sig_t catcher, int sig, int mask, u_long code)
* a machine fault.
*/
int
linux_sigreturn(p, args, retval)
linux_sigreturn(p, args)
struct proc *p;
struct linux_sigreturn_args *args;
int *retval;
{
struct linux_sigcontext *scp, context;
register struct trapframe *regs;

View File

@ -39,7 +39,7 @@
* SUCH DAMAGE.
*
* @(#)init_main.c 8.9 (Berkeley) 1/21/94
* $Id: init_main.c,v 1.71 1997/09/02 20:05:35 bde Exp $
* $Id: init_main.c,v 1.72 1997/09/21 22:00:03 gibbs Exp $
*/
#include "opt_devfs.h"
@ -150,7 +150,6 @@ main(framep)
register struct sysinit **sipp; /* system initialization*/
register struct sysinit **xipp; /* interior loop of sort*/
register struct sysinit *save; /* bubble*/
int rval[2]; /* SI_TYPE_KTHREAD support*/
/*
* Copy the locore.s frame pointer for proc0, this is forked into
@ -207,9 +206,10 @@ main(framep)
case SI_TYPE_KTHREAD:
/* kernel thread*/
if (fork(&proc0, NULL, rval))
if (fork(&proc0, NULL))
panic("fork kernel process");
cpu_set_fork_handler(pfind(rval[0]), (*sipp)->func, (*sipp)->udata);
cpu_set_fork_handler(pfind(proc0.p_retval[0]),
(*sipp)->func, (*sipp)->udata);
break;
default:
@ -663,7 +663,7 @@ start_init(p)
* Otherwise return to main() which returns to btext
* which completes the system startup.
*/
if ((error = execve(p, &args, &retval[0])) == 0)
if ((error = execve(p, &args)) == 0)
return;
if (error != ENOENT)
printf("exec %s: error %d\n", path, error);

View File

@ -37,7 +37,7 @@
* SUCH DAMAGE.
*
* @(#)kern_acct.c 8.1 (Berkeley) 6/14/93
* $Id: kern_acct.c,v 1.16 1997/09/02 20:05:36 bde Exp $
* $Id: kern_acct.c,v 1.17 1997/09/21 22:00:04 gibbs Exp $
*/
#include <sys/param.h>
@ -108,12 +108,11 @@ SYSCTL_INT(_kern, OID_AUTO, acct_chkfreq, CTLFLAG_RW,
* previous implementation done by Mark Tinguely.
*/
int
acct(a1, uap, a3)
acct(a1, uap)
struct proc *a1;
struct acct_args /* {
syscallarg(char *) path;
} */ *uap;
int *a3;
{
struct proc *p = curproc; /* XXX */
struct nameidata nd;

View File

@ -36,7 +36,7 @@
* SUCH DAMAGE.
*
* @(#)kern_descrip.c 8.6 (Berkeley) 4/19/94
* $Id: kern_descrip.c,v 1.41 1997/10/11 18:31:22 phk Exp $
* $Id: kern_descrip.c,v 1.42 1997/10/12 20:23:45 phk Exp $
*/
#include <sys/param.h>
@ -97,13 +97,13 @@ struct getdtablesize_args {
#endif
/* ARGSUSED */
int
getdtablesize(p, uap, retval)
getdtablesize(p, uap)
struct proc *p;
struct getdtablesize_args *uap;
int *retval;
{
*retval = min((int)p->p_rlimit[RLIMIT_NOFILE].rlim_cur, maxfilesperproc);
p->p_retval[0] =
min((int)p->p_rlimit[RLIMIT_NOFILE].rlim_cur, maxfilesperproc);
return (0);
}
@ -118,10 +118,9 @@ struct dup2_args {
#endif
/* ARGSUSED */
int
dup2(p, uap, retval)
dup2(p, uap)
struct proc *p;
struct dup2_args *uap;
int *retval;
{
register struct filedesc *fdp = p->p_fd;
register u_int old = uap->from, new = uap->to;
@ -133,7 +132,7 @@ dup2(p, uap, retval)
new >= maxfilesperproc)
return (EBADF);
if (old == new) {
*retval = new;
p->p_retval[0] = new;
return (0);
}
if (new >= fdp->fd_nfiles) {
@ -149,7 +148,7 @@ dup2(p, uap, retval)
*/
(void) closef(fdp->fd_ofiles[new], p);
}
return (finishdup(fdp, (int)old, (int)new, retval));
return (finishdup(fdp, (int)old, (int)new, p->p_retval));
}
/*
@ -162,10 +161,9 @@ struct dup_args {
#endif
/* ARGSUSED */
int
dup(p, uap, retval)
dup(p, uap)
struct proc *p;
struct dup_args *uap;
int *retval;
{
register struct filedesc *fdp;
u_int old;
@ -185,7 +183,7 @@ dup(p, uap, retval)
return (EBADF);
if ((error = fdalloc(p, 0, &new)))
return (error);
return (finishdup(fdp, (int)old, new, retval));
return (finishdup(fdp, (int)old, new, p->p_retval));
}
/*
@ -200,10 +198,9 @@ struct fcntl_args {
#endif
/* ARGSUSED */
int
fcntl(p, uap, retval)
fcntl(p, uap)
struct proc *p;
register struct fcntl_args *uap;
int *retval;
{
register struct filedesc *fdp = p->p_fd;
register struct file *fp;
@ -226,10 +223,10 @@ fcntl(p, uap, retval)
return (EINVAL);
if ((error = fdalloc(p, newmin, &i)))
return (error);
return (finishdup(fdp, uap->fd, i, retval));
return (finishdup(fdp, uap->fd, i, p->p_retval));
case F_GETFD:
*retval = *pop & 1;
p->p_retval[0] = *pop & 1;
return (0);
case F_SETFD:
@ -237,7 +234,7 @@ fcntl(p, uap, retval)
return (0);
case F_GETFL:
*retval = OFLAGS(fp->f_flag);
p->p_retval[0] = OFLAGS(fp->f_flag);
return (0);
case F_SETFL:
@ -258,12 +255,12 @@ fcntl(p, uap, retval)
case F_GETOWN:
if (fp->f_type == DTYPE_SOCKET) {
*retval = ((struct socket *)fp->f_data)->so_pgid;
p->p_retval[0] = ((struct socket *)fp->f_data)->so_pgid;
return (0);
}
error = (*fp->f_ops->fo_ioctl)
(fp, TIOCGPGRP, (caddr_t)retval, p);
*retval = -*retval;
(fp, TIOCGPGRP, (caddr_t)p->p_retval, p);
p->p_retval[0] = - p->p_retval[0];
return (error);
case F_SETOWN:
@ -371,10 +368,9 @@ struct close_args {
#endif
/* ARGSUSED */
int
close(p, uap, retval)
close(p, uap)
struct proc *p;
struct close_args *uap;
int *retval;
{
register struct filedesc *fdp = p->p_fd;
register struct file *fp;
@ -408,10 +404,9 @@ struct ofstat_args {
#endif
/* ARGSUSED */
int
ofstat(p, uap, retval)
ofstat(p, uap)
struct proc *p;
register struct ofstat_args *uap;
int *retval;
{
register struct filedesc *fdp = p->p_fd;
register struct file *fp;
@ -459,10 +454,9 @@ struct fstat_args {
#endif
/* ARGSUSED */
int
fstat(p, uap, retval)
fstat(p, uap)
struct proc *p;
register struct fstat_args *uap;
int *retval;
{
register struct filedesc *fdp = p->p_fd;
register struct file *fp;
@ -507,10 +501,9 @@ struct fpathconf_args {
#endif
/* ARGSUSED */
int
fpathconf(p, uap, retval)
fpathconf(p, uap)
struct proc *p;
register struct fpathconf_args *uap;
int *retval;
{
struct filedesc *fdp = p->p_fd;
struct file *fp;
@ -525,13 +518,13 @@ fpathconf(p, uap, retval)
case DTYPE_SOCKET:
if (uap->name != _PC_PIPE_BUF)
return (EINVAL);
*retval = PIPE_BUF;
p->p_retval[0] = PIPE_BUF;
return (0);
case DTYPE_FIFO:
case DTYPE_VNODE:
vp = (struct vnode *)fp->f_data;
return (VOP_PATHCONF(vp, uap->name, retval));
return (VOP_PATHCONF(vp, uap->name, p->p_retval));
default:
panic("fpathconf");
@ -913,10 +906,9 @@ struct flock_args {
#endif
/* ARGSUSED */
int
flock(p, uap, retval)
flock(p, uap)
struct proc *p;
register struct flock_args *uap;
int *retval;
{
register struct filedesc *fdp = p->p_fd;
register struct file *fp;

View File

@ -23,7 +23,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
* $Id: kern_exec.c,v 1.66 1997/09/21 04:22:50 dyson Exp $
* $Id: kern_exec.c,v 1.67 1997/10/15 18:28:34 guido Exp $
*/
#include <sys/param.h>
@ -93,10 +93,9 @@ struct execve_args {
* execve() system call.
*/
int
execve(p, uap, retval)
execve(p, uap)
struct proc *p;
register struct execve_args *uap;
int *retval;
{
struct nameidata nd, *ndp;
int *stack_base;

View File

@ -36,7 +36,7 @@
* SUCH DAMAGE.
*
* @(#)kern_exit.c 8.7 (Berkeley) 2/12/94
* $Id: kern_exit.c,v 1.57 1997/10/11 18:31:22 phk Exp $
* $Id: kern_exit.c,v 1.58 1997/10/12 20:23:47 phk Exp $
*/
#include "opt_ktrace.h"
@ -89,12 +89,11 @@ static ele_p exit_list;
* Death of process.
*/
void
exit(p, uap, retval)
exit(p, uap)
struct proc *p;
struct rexit_args /* {
int rval;
} */ *uap;
int *retval;
{
exit1(p, W_EXITCODE(uap->rval, 0));
@ -134,7 +133,7 @@ exit1(p, rv)
* The interface for kill is better
* than the internal signal
*/
kill(p, &killArgs, &rv);
kill(p, &killArgs);
nq = q;
q = q->p_peers;
/*
@ -356,12 +355,11 @@ exit1(p, rv)
#endif
int
owait(p, uap, retval)
owait(p, uap)
struct proc *p;
register struct owait_args /* {
int dummy;
} */ *uap;
int *retval;
{
struct wait_args w;
@ -379,18 +377,17 @@ owait(p, uap, retval)
#endif
w.pid = WAIT_ANY;
w.status = NULL;
return (wait1(p, &w, retval, 1));
return (wait1(p, &w, p->p_retval, 1));
}
#endif /* COMPAT_43 */
int
wait4(p, uap, retval)
wait4(p, uap)
struct proc *p;
struct wait_args *uap;
int *retval;
{
return (wait1(p, uap, retval, 0));
return (wait1(p, uap, p->p_retval, 0));
}
static int

View File

@ -36,7 +36,7 @@
* SUCH DAMAGE.
*
* @(#)kern_fork.c 8.6 (Berkeley) 4/8/94
* $Id: kern_fork.c,v 1.46 1997/08/22 15:10:00 peter Exp $
* $Id: kern_fork.c,v 1.47 1997/08/26 00:13:06 bde Exp $
*/
#include "opt_ktrace.h"
@ -91,33 +91,30 @@ struct fork_args {
/* ARGSUSED */
int
fork(p, uap, retval)
fork(p, uap)
struct proc *p;
struct fork_args *uap;
int retval[];
{
return (fork1(p, (RFFDG|RFPROC), retval));
return (fork1(p, (RFFDG|RFPROC), p->p_retval));
}
/* ARGSUSED */
int
vfork(p, uap, retval)
vfork(p, uap)
struct proc *p;
struct vfork_args *uap;
int retval[];
{
return (fork1(p, (RFFDG|RFPROC|RFPPWAIT|(fast_vfork ? RFMEM : 0)),
retval));
p->p_retval));
}
/* ARGSUSED */
int
rfork(p, uap, retval)
rfork(p, uap)
struct proc *p;
struct rfork_args *uap;
int retval[];
{
return (fork1(p, uap->flags, retval));
return (fork1(p, uap->flags, p->p_retval));
}

View File

@ -31,7 +31,7 @@
* SUCH DAMAGE.
*
* @(#)kern_ktrace.c 8.2 (Berkeley) 9/23/93
* $Id: kern_ktrace.c,v 1.19 1997/10/11 18:31:22 phk Exp $
* $Id: kern_ktrace.c,v 1.20 1997/10/12 20:23:48 phk Exp $
*/
#include "opt_ktrace.h"
@ -245,10 +245,9 @@ struct ktrace_args {
#endif
/* ARGSUSED */
int
ktrace(curp, uap, retval)
ktrace(curp, uap)
struct proc *curp;
register struct ktrace_args *uap;
int *retval;
{
#ifdef KTRACE
register struct vnode *vp = NULL;
@ -353,10 +352,9 @@ ktrace(curp, uap, retval)
*/
/* ARGSUSED */
int
utrace(curp, uap, retval)
utrace(curp, uap)
struct proc *curp;
register struct utrace_args *uap;
int *retval;
{
#ifdef KTRACE
struct ktr_header *kth;

View File

@ -23,7 +23,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
* $Id: kern_linker.c,v 1.1 1997/05/07 16:05:30 dfr Exp $
* $Id: kern_linker.c,v 1.2 1997/08/02 14:31:28 bde Exp $
*/
#include <sys/param.h>
@ -78,7 +78,6 @@ linker_file_sysinit(linker_file_t lf)
struct sysinit** sipp;
struct sysinit** xipp;
struct sysinit* save;
int rval[2]; /* SI_TYPE_KTHREAD support*/
linker_current_file = lf;
@ -129,9 +128,10 @@ linker_file_sysinit(linker_file_t lf)
case SI_TYPE_KTHREAD:
/* kernel thread*/
if (fork(&proc0, NULL, rval))
if (fork(&proc0, NULL))
panic("fork kernel process");
cpu_set_fork_handler(pfind(rval[0]), (*sipp)->func, (*sipp)->udata);
cpu_set_fork_handler(pfind(proc0.p_retval[0]),
(*sipp)->func, (*sipp)->udata);
break;
default:
@ -383,13 +383,13 @@ linker_file_lookup_symbol(linker_file_t file, const char* name, int deps)
*/
int
kldload(struct proc* p, struct kldload_args* uap, int* retval)
kldload(struct proc* p, struct kldload_args* uap)
{
char* filename = NULL;
linker_file_t lf;
int error = 0;
*retval = -1;
p->p_retval[0] = -1;
if (securelevel > 0)
return EPERM;
@ -405,7 +405,7 @@ kldload(struct proc* p, struct kldload_args* uap, int* retval)
goto out;
lf->userrefs++;
*retval = lf->id;
p->p_retval[0] = lf->id;
out:
if (filename)
@ -414,7 +414,7 @@ kldload(struct proc* p, struct kldload_args* uap, int* retval)
}
int
kldunload(struct proc* p, struct kldunload_args* uap, int* retval)
kldunload(struct proc* p, struct kldunload_args* uap)
{
linker_file_t lf;
int error = 0;
@ -443,13 +443,13 @@ kldunload(struct proc* p, struct kldunload_args* uap, int* retval)
}
int
kldfind(struct proc* p, struct kldfind_args* uap, int* retval)
kldfind(struct proc* p, struct kldfind_args* uap)
{
char* filename = NULL;
linker_file_t lf;
int error = 0;
*retval = -1;
p->p_retval[0] = -1;
filename = malloc(MAXPATHLEN, M_TEMP, M_WAITOK);
if (error = copyinstr(SCARG(uap, file), filename, MAXPATHLEN, NULL))
@ -457,7 +457,7 @@ kldfind(struct proc* p, struct kldfind_args* uap, int* retval)
lf = linker_find_file_by_name(filename);
if (lf)
*retval = lf->id;
p->p_retval[0] = lf->id;
else
error = ENOENT;
@ -468,25 +468,25 @@ kldfind(struct proc* p, struct kldfind_args* uap, int* retval)
}
int
kldnext(struct proc* p, struct kldnext_args* uap, int* retval)
kldnext(struct proc* p, struct kldnext_args* uap)
{
linker_file_t lf;
int error = 0;
if (SCARG(uap, fileid) == 0) {
if (TAILQ_FIRST(&files))
*retval = TAILQ_FIRST(&files)->id;
p->p_retval[0] = TAILQ_FIRST(&files)->id;
else
*retval = 0;
p->p_retval[0] = 0;
return 0;
}
lf = linker_find_file_by_id(SCARG(uap, fileid));
if (lf) {
if (TAILQ_NEXT(lf, link))
*retval = TAILQ_NEXT(lf, link)->id;
p->p_retval[0] = TAILQ_NEXT(lf, link)->id;
else
*retval = 0;
p->p_retval[0] = 0;
} else
error = ENOENT;
@ -494,7 +494,7 @@ kldnext(struct proc* p, struct kldnext_args* uap, int* retval)
}
int
kldstat(struct proc* p, struct kldstat_args* uap, int* retval)
kldstat(struct proc* p, struct kldstat_args* uap)
{
linker_file_t lf;
int error = 0;
@ -534,14 +534,14 @@ kldstat(struct proc* p, struct kldstat_args* uap, int* retval)
if (error = copyout(&lf->size, &stat->size, sizeof(size_t)))
goto out;
*retval = 0;
p->p_retval[0] = 0;
out:
return error;
}
int
kldfirstmod(struct proc* p, struct kldfirstmod_args* uap, int* retval)
kldfirstmod(struct proc* p, struct kldfirstmod_args* uap)
{
linker_file_t lf;
int error = 0;
@ -549,9 +549,9 @@ kldfirstmod(struct proc* p, struct kldfirstmod_args* uap, int* retval)
lf = linker_find_file_by_id(SCARG(uap, fileid));
if (lf) {
if (TAILQ_FIRST(&lf->modules))
*retval = module_getid(TAILQ_FIRST(&lf->modules));
p->p_retval[0] = module_getid(TAILQ_FIRST(&lf->modules));
else
*retval = 0;
p->p_retval[0] = 0;
} else
error = ENOENT;

View File

@ -30,7 +30,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
* $Id: kern_lkm.c,v 1.43 1997/10/11 13:11:32 phk Exp $
* $Id: kern_lkm.c,v 1.44 1997/10/28 15:58:15 bde Exp $
*/
#include <sys/param.h>
@ -483,13 +483,12 @@ lkmcioctl(dev, cmd, data, flag, p)
* Place holder for system call slots reserved for loadable modules.
*/
int
lkmnosys(p, args, retval)
lkmnosys(p, args)
struct proc *p;
struct nosys_args *args;
int *retval;
{
return(nosys(p, args, retval));
return(nosys(p, args));
}
int

View File

@ -23,7 +23,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
* $Id: kern_module.c,v 1.3 1997/10/24 05:29:07 jmg Exp $
* $Id: kern_module.c,v 1.4 1997/10/28 15:58:21 bde Exp $
*/
#include <sys/param.h>
@ -34,6 +34,7 @@
#include <sys/sysent.h>
#include <sys/module.h>
#include <sys/linker.h>
#include <sys/proc.h>
#define M_MODULE M_TEMP /* XXX */
@ -195,15 +196,15 @@ module_getfnext(module_t mod)
* Syscalls.
*/
int
modnext(struct proc* p, struct modnext_args* uap, int* retval)
modnext(struct proc* p, struct modnext_args* uap)
{
module_t mod;
*retval = -1;
p->p_retval[0] = -1;
if (SCARG(uap, modid) == 0) {
mod = TAILQ_FIRST(&modules);
if (mod) {
*retval = mod->id;
p->p_retval[0] = mod->id;
return 0;
} else
return ENOENT;
@ -214,32 +215,32 @@ modnext(struct proc* p, struct modnext_args* uap, int* retval)
return ENOENT;
if (TAILQ_NEXT(mod, link))
*retval = TAILQ_NEXT(mod, link)->id;
p->p_retval[0] = TAILQ_NEXT(mod, link)->id;
else
*retval = 0;
p->p_retval[0] = 0;
return 0;
}
int
modfnext(struct proc* p, struct modfnext_args* uap, int* retval)
modfnext(struct proc* p, struct modfnext_args* uap)
{
module_t mod;
*retval = -1;
p->p_retval[0] = -1;
mod = module_lookupbyid(SCARG(uap, modid));
if (!mod)
return ENOENT;
if (TAILQ_NEXT(mod, flink))
*retval = TAILQ_NEXT(mod, flink)->id;
p->p_retval[0] = TAILQ_NEXT(mod, flink)->id;
else
*retval = 0;
p->p_retval[0] = 0;
return 0;
}
int
modstat(struct proc* p, struct modstat_args* uap, int* retval)
modstat(struct proc* p, struct modstat_args* uap)
{
module_t mod;
int error = 0;
@ -274,14 +275,14 @@ modstat(struct proc* p, struct modstat_args* uap, int* retval)
if (error = copyout(&mod->id, &stat->id, sizeof(int)))
goto out;
*retval = 0;
p->p_retval[0] = 0;
out:
return error;
}
int
modfind(struct proc* p, struct modfind_args* uap, int* retval)
modfind(struct proc* p, struct modfind_args* uap)
{
int error = 0;
char name[MAXMODNAME];
@ -294,7 +295,7 @@ modfind(struct proc* p, struct modfind_args* uap, int* retval)
if (!mod)
error = ENOENT;
else
*retval = mod->id;
p->p_retval[0] = mod->id;
out:
return error;

View File

@ -173,7 +173,7 @@ struct ntp_adjtime_args {
#endif
int
ntp_adjtime(struct proc *p, struct ntp_adjtime_args *uap, int *retval)
ntp_adjtime(struct proc *p, struct ntp_adjtime_args *uap)
{
struct timex ntv;
int modes;
@ -250,18 +250,18 @@ ntp_adjtime(struct proc *p, struct ntp_adjtime_args *uap, int *retval)
* Status word error decode. See comments in
* ntp_gettime() routine.
*/
retval[0] = time_state;
p->p_retval[0] = time_state;
if (time_status & (STA_UNSYNC | STA_CLOCKERR))
retval[0] = TIME_ERROR;
p->p_retval[0] = TIME_ERROR;
if (time_status & (STA_PPSFREQ | STA_PPSTIME) &&
!(time_status & STA_PPSSIGNAL))
retval[0] = TIME_ERROR;
p->p_retval[0] = TIME_ERROR;
if (time_status & STA_PPSTIME &&
time_status & STA_PPSJITTER)
retval[0] = TIME_ERROR;
p->p_retval[0] = TIME_ERROR;
if (time_status & STA_PPSFREQ &&
time_status & (STA_PPSWANDER | STA_PPSERROR))
retval[0] = TIME_ERROR;
p->p_retval[0] = TIME_ERROR;
}
return error;
}

View File

@ -36,7 +36,7 @@
* SUCH DAMAGE.
*
* @(#)kern_prot.c 8.6 (Berkeley) 1/21/94
* $Id: kern_prot.c,v 1.35 1997/10/12 20:23:54 phk Exp $
* $Id: kern_prot.c,v 1.36 1997/10/17 23:52:56 davidg Exp $
*/
/*
@ -61,15 +61,14 @@ struct getpid_args {
/* ARGSUSED */
int
getpid(p, uap, retval)
getpid(p, uap)
struct proc *p;
struct getpid_args *uap;
int *retval;
{
*retval = p->p_pid;
p->p_retval[0] = p->p_pid;
#if defined(COMPAT_43) || defined(COMPAT_SUNOS)
retval[1] = p->p_pptr->p_pid;
p->p_retval[1] = p->p_pptr->p_pid;
#endif
return (0);
}
@ -81,13 +80,12 @@ struct getppid_args {
#endif
/* ARGSUSED */
int
getppid(p, uap, retval)
getppid(p, uap)
struct proc *p;
struct getppid_args *uap;
int *retval;
{
*retval = p->p_pptr->p_pid;
p->p_retval[0] = p->p_pptr->p_pid;
return (0);
}
@ -99,13 +97,12 @@ struct getpgrp_args {
#endif
int
getpgrp(p, uap, retval)
getpgrp(p, uap)
struct proc *p;
struct getpgrp_args *uap;
int *retval;
{
*retval = p->p_pgrp->pg_id;
p->p_retval[0] = p->p_pgrp->pg_id;
return (0);
}
@ -117,10 +114,9 @@ struct getpgid_args {
#endif
int
getpgid(p, uap, retval)
getpgid(p, uap)
struct proc *p;
struct getpgid_args *uap;
int *retval;
{
if (uap->pid == 0)
goto found;
@ -128,7 +124,7 @@ getpgid(p, uap, retval)
if ((p == pfind(uap->pid)) == 0)
return ESRCH;
found:
*retval = p->p_pgrp->pg_id;
p->p_retval[0] = p->p_pgrp->pg_id;
return 0;
}
@ -142,10 +138,9 @@ struct getsid_args {
#endif
int
getsid(p, uap, retval)
getsid(p, uap)
struct proc *p;
struct getsid_args *uap;
int *retval;
{
if (uap->pid == 0)
goto found;
@ -153,7 +148,7 @@ getsid(p, uap, retval)
if ((p == pfind(uap->pid)) == 0)
return ESRCH;
found:
*retval = p->p_pgrp->pg_session->s_leader->p_pid;
p->p_retval[0] = p->p_pgrp->pg_session->s_leader->p_pid;
return 0;
}
@ -166,15 +161,14 @@ struct getuid_args {
/* ARGSUSED */
int
getuid(p, uap, retval)
getuid(p, uap)
struct proc *p;
struct getuid_args *uap;
int *retval;
{
*retval = p->p_cred->p_ruid;
p->p_retval[0] = p->p_cred->p_ruid;
#if defined(COMPAT_43) || defined(COMPAT_SUNOS)
retval[1] = p->p_ucred->cr_uid;
p->p_retval[1] = p->p_ucred->cr_uid;
#endif
return (0);
}
@ -187,13 +181,12 @@ struct geteuid_args {
/* ARGSUSED */
int
geteuid(p, uap, retval)
geteuid(p, uap)
struct proc *p;
struct geteuid_args *uap;
int *retval;
{
*retval = p->p_ucred->cr_uid;
p->p_retval[0] = p->p_ucred->cr_uid;
return (0);
}
@ -205,15 +198,14 @@ struct getgid_args {
/* ARGSUSED */
int
getgid(p, uap, retval)
getgid(p, uap)
struct proc *p;
struct getgid_args *uap;
int *retval;
{
*retval = p->p_cred->p_rgid;
p->p_retval[0] = p->p_cred->p_rgid;
#if defined(COMPAT_43) || defined(COMPAT_SUNOS)
retval[1] = p->p_ucred->cr_groups[0];
p->p_retval[1] = p->p_ucred->cr_groups[0];
#endif
return (0);
}
@ -231,13 +223,12 @@ struct getegid_args {
/* ARGSUSED */
int
getegid(p, uap, retval)
getegid(p, uap)
struct proc *p;
struct getegid_args *uap;
int *retval;
{
*retval = p->p_ucred->cr_groups[0];
p->p_retval[0] = p->p_ucred->cr_groups[0];
return (0);
}
@ -248,17 +239,16 @@ struct getgroups_args {
};
#endif
int
getgroups(p, uap, retval)
getgroups(p, uap)
struct proc *p;
register struct getgroups_args *uap;
int *retval;
{
register struct pcred *pc = p->p_cred;
register u_int ngrp;
int error;
if ((ngrp = uap->gidsetsize) == 0) {
*retval = pc->pc_ucred->cr_ngroups;
p->p_retval[0] = pc->pc_ucred->cr_ngroups;
return (0);
}
if (ngrp < pc->pc_ucred->cr_ngroups)
@ -267,7 +257,7 @@ getgroups(p, uap, retval)
if ((error = copyout((caddr_t)pc->pc_ucred->cr_groups,
(caddr_t)uap->gidset, ngrp * sizeof(gid_t))))
return (error);
*retval = ngrp;
p->p_retval[0] = ngrp;
return (0);
}
@ -279,17 +269,16 @@ struct setsid_args {
/* ARGSUSED */
int
setsid(p, uap, retval)
setsid(p, uap)
register struct proc *p;
struct setsid_args *uap;
int *retval;
{
if (p->p_pgid == p->p_pid || pgfind(p->p_pid)) {
return (EPERM);
} else {
(void)enterpgrp(p, p->p_pid, 1);
*retval = p->p_pid;
p->p_retval[0] = p->p_pid;
return (0);
}
}
@ -315,10 +304,9 @@ struct setpgid_args {
#endif
/* ARGSUSED */
int
setpgid(curp, uap, retval)
setpgid(curp, uap)
struct proc *curp;
register struct setpgid_args *uap;
int *retval;
{
register struct proc *targp; /* target process */
register struct pgrp *pgrp; /* target pgrp */
@ -364,10 +352,9 @@ struct setuid_args {
#endif
/* ARGSUSED */
int
setuid(p, uap, retval)
setuid(p, uap)
struct proc *p;
struct setuid_args *uap;
int *retval;
{
register struct pcred *pc = p->p_cred;
register uid_t uid;
@ -459,10 +446,9 @@ struct seteuid_args {
#endif
/* ARGSUSED */
int
seteuid(p, uap, retval)
seteuid(p, uap)
struct proc *p;
struct seteuid_args *uap;
int *retval;
{
register struct pcred *pc = p->p_cred;
register uid_t euid;
@ -492,10 +478,9 @@ struct setgid_args {
#endif
/* ARGSUSED */
int
setgid(p, uap, retval)
setgid(p, uap)
struct proc *p;
struct setgid_args *uap;
int *retval;
{
register struct pcred *pc = p->p_cred;
register gid_t gid;
@ -573,10 +558,9 @@ struct setegid_args {
#endif
/* ARGSUSED */
int
setegid(p, uap, retval)
setegid(p, uap)
struct proc *p;
struct setegid_args *uap;
int *retval;
{
register struct pcred *pc = p->p_cred;
register gid_t egid;
@ -603,10 +587,9 @@ struct setgroups_args {
#endif
/* ARGSUSED */
int
setgroups(p, uap, retval)
setgroups(p, uap)
struct proc *p;
struct setgroups_args *uap;
int *retval;
{
register struct pcred *pc = p->p_cred;
register u_int ngrp;
@ -648,10 +631,9 @@ struct setreuid_args {
#endif
/* ARGSUSED */
int
setreuid(p, uap, retval)
setreuid(p, uap)
register struct proc *p;
struct setreuid_args *uap;
int *retval;
{
register struct pcred *pc = p->p_cred;
register uid_t ruid, euid;
@ -692,10 +674,9 @@ struct setregid_args {
#endif
/* ARGSUSED */
int
setregid(p, uap, retval)
setregid(p, uap)
register struct proc *p;
struct setregid_args *uap;
int *retval;
{
register struct pcred *pc = p->p_cred;
register gid_t rgid, egid;
@ -733,10 +714,9 @@ struct issetugid_args {
#endif
/* ARGSUSED */
int
issetugid(p, uap, retval)
issetugid(p, uap)
register struct proc *p;
struct issetugid_args *uap;
int *retval;
{
/*
* Note: OpenBSD sets a P_SUGIDEXEC flag set at execve() time,
@ -858,10 +838,9 @@ struct getlogin_args {
#endif
/* ARGSUSED */
int
getlogin(p, uap, retval)
getlogin(p, uap)
struct proc *p;
struct getlogin_args *uap;
int *retval;
{
if (uap->namelen > MAXLOGNAME)
@ -880,10 +859,9 @@ struct setlogin_args {
#endif
/* ARGSUSED */
int
setlogin(p, uap, retval)
setlogin(p, uap)
struct proc *p;
struct setlogin_args *uap;
int *retval;
{
int error;
char logintmp[MAXLOGNAME];

View File

@ -36,7 +36,7 @@
* SUCH DAMAGE.
*
* @(#)kern_resource.c 8.5 (Berkeley) 1/21/94
* $Id: kern_resource.c,v 1.25 1997/04/26 11:46:13 peter Exp $
* $Id: kern_resource.c,v 1.26 1997/08/26 00:20:11 bde Exp $
*/
#include "opt_rlimit.h"
@ -71,10 +71,9 @@ struct getpriority_args {
};
#endif
int
getpriority(curp, uap, retval)
getpriority(curp, uap)
struct proc *curp;
register struct getpriority_args *uap;
int *retval;
{
register struct proc *p;
register int low = PRIO_MAX + 1;
@ -120,7 +119,7 @@ getpriority(curp, uap, retval)
}
if (low == PRIO_MAX + 1)
return (ESRCH);
*retval = low;
p->p_retval[0] = low;
return (0);
}
@ -133,10 +132,9 @@ struct setpriority_args {
#endif
/* ARGSUSED */
int
setpriority(curp, uap, retval)
setpriority(curp, uap)
struct proc *curp;
register struct setpriority_args *uap;
int *retval;
{
register struct proc *p;
int found = 0, error = 0;
@ -224,10 +222,9 @@ struct rtprio_args {
/* ARGSUSED */
int
rtprio(curp, uap, retval)
rtprio(curp, uap)
struct proc *curp;
register struct rtprio_args *uap;
int *retval;
{
register struct proc *p;
register struct pcred *pcred = curp->p_cred;
@ -289,10 +286,9 @@ struct osetrlimit_args {
#endif
/* ARGSUSED */
int
osetrlimit(p, uap, retval)
osetrlimit(p, uap)
struct proc *p;
register struct osetrlimit_args *uap;
int *retval;
{
struct orlimit olim;
struct rlimit lim;
@ -314,10 +310,9 @@ struct ogetrlimit_args {
#endif
/* ARGSUSED */
int
ogetrlimit(p, uap, retval)
ogetrlimit(p, uap)
struct proc *p;
register struct ogetrlimit_args *uap;
int *retval;
{
struct orlimit olim;
@ -341,10 +336,9 @@ struct __setrlimit_args {
#endif
/* ARGSUSED */
int
setrlimit(p, uap, retval)
setrlimit(p, uap)
struct proc *p;
register struct __setrlimit_args *uap;
int *retval;
{
struct rlimit alim;
int error;
@ -455,10 +449,9 @@ struct __getrlimit_args {
#endif
/* ARGSUSED */
int
getrlimit(p, uap, retval)
getrlimit(p, uap)
struct proc *p;
register struct __getrlimit_args *uap;
int *retval;
{
if (uap->which >= RLIM_NLIMITS)
@ -539,10 +532,9 @@ struct getrusage_args {
#endif
/* ARGSUSED */
int
getrusage(p, uap, retval)
getrusage(p, uap)
register struct proc *p;
register struct getrusage_args *uap;
int *retval;
{
register struct rusage *rup;

View File

@ -36,7 +36,7 @@
* SUCH DAMAGE.
*
* @(#)kern_shutdown.c 8.3 (Berkeley) 1/21/94
* $Id: kern_shutdown.c,v 1.23 1997/09/02 20:05:41 bde Exp $
* $Id: kern_shutdown.c,v 1.24 1997/09/05 08:54:55 peter Exp $
*/
#include "opt_ddb.h"
@ -132,10 +132,9 @@ struct reboot_args {
* The system call that results in a reboot
*/
int
reboot(p, uap, retval)
reboot(p, uap)
struct proc *p;
struct reboot_args *uap;
int *retval;
{
int error;
@ -215,7 +214,7 @@ boot(howto)
waittime = 0;
printf("\nsyncing disks... ");
sync(&proc0, NULL, NULL);
sync(&proc0, NULL);
for (iter = 0; iter < 20; iter++) {
nbusy = 0;

View File

@ -36,7 +36,7 @@
* SUCH DAMAGE.
*
* @(#)kern_sig.c 8.7 (Berkeley) 4/18/94
* $Id: kern_sig.c,v 1.33 1997/09/02 20:05:41 bde Exp $
* $Id: kern_sig.c,v 1.34 1997/09/13 19:42:12 joerg Exp $
*/
#include "opt_ktrace.h"
@ -93,10 +93,9 @@ struct sigaction_args {
#endif
/* ARGSUSED */
int
sigaction(p, uap, retval)
sigaction(p, uap)
struct proc *p;
register struct sigaction_args *uap;
int *retval;
{
struct sigaction vec;
register struct sigaction *sa;
@ -284,14 +283,13 @@ struct sigprocmask_args {
};
#endif
int
sigprocmask(p, uap, retval)
sigprocmask(p, uap)
register struct proc *p;
struct sigprocmask_args *uap;
int *retval;
{
int error = 0;
*retval = p->p_sigmask;
p->p_retval[0] = p->p_sigmask;
(void) splhigh();
switch (uap->how) {
@ -322,13 +320,12 @@ struct sigpending_args {
#endif
/* ARGSUSED */
int
sigpending(p, uap, retval)
sigpending(p, uap)
struct proc *p;
struct sigpending_args *uap;
int *retval;
{
*retval = p->p_siglist;
p->p_retval[0] = p->p_siglist;
return (0);
}
@ -345,10 +342,9 @@ struct osigvec_args {
#endif
/* ARGSUSED */
int
osigvec(p, uap, retval)
osigvec(p, uap)
struct proc *p;
register struct osigvec_args *uap;
int *retval;
{
struct sigvec vec;
register struct sigacts *ps = p->p_sigacts;
@ -403,14 +399,13 @@ struct osigblock_args {
};
#endif
int
osigblock(p, uap, retval)
osigblock(p, uap)
register struct proc *p;
struct osigblock_args *uap;
int *retval;
{
(void) splhigh();
*retval = p->p_sigmask;
p->p_retval[0] = p->p_sigmask;
p->p_sigmask |= uap->mask &~ sigcantmask;
(void) spl0();
return (0);
@ -422,14 +417,13 @@ struct osigsetmask_args {
};
#endif
int
osigsetmask(p, uap, retval)
osigsetmask(p, uap)
struct proc *p;
struct osigsetmask_args *uap;
int *retval;
{
(void) splhigh();
*retval = p->p_sigmask;
p->p_retval[0] = p->p_sigmask;
p->p_sigmask = uap->mask &~ sigcantmask;
(void) spl0();
return (0);
@ -448,10 +442,9 @@ struct sigsuspend_args {
#endif
/* ARGSUSED */
int
sigsuspend(p, uap, retval)
sigsuspend(p, uap)
register struct proc *p;
struct sigsuspend_args *uap;
int *retval;
{
register struct sigacts *ps = p->p_sigacts;
@ -480,10 +473,9 @@ struct osigstack_args {
#endif
/* ARGSUSED */
int
osigstack(p, uap, retval)
osigstack(p, uap)
struct proc *p;
register struct osigstack_args *uap;
int *retval;
{
struct sigstack ss;
struct sigacts *psp;
@ -514,10 +506,9 @@ struct sigaltstack_args {
#endif
/* ARGSUSED */
int
sigaltstack(p, uap, retval)
sigaltstack(p, uap)
struct proc *p;
register struct sigaltstack_args *uap;
int *retval;
{
struct sigacts *psp;
struct sigaltstack ss;
@ -606,10 +597,9 @@ struct kill_args {
#endif
/* ARGSUSED */
int
kill(cp, uap, retval)
kill(cp, uap)
register struct proc *cp;
register struct kill_args *uap;
int *retval;
{
register struct proc *p;
register struct pcred *pc = cp->p_cred;
@ -646,10 +636,9 @@ struct okillpg_args {
#endif
/* ARGSUSED */
int
okillpg(p, uap, retval)
okillpg(p, uap)
struct proc *p;
register struct okillpg_args *uap;
int *retval;
{
if ((u_int)uap->signum >= NSIG)
@ -1302,10 +1291,9 @@ struct nosys_args {
#endif
/* ARGSUSED */
int
nosys(p, args, retval)
nosys(p, args)
struct proc *p;
struct nosys_args *args;
int *retval;
{
psignal(p, SIGSYS);

View File

@ -37,7 +37,7 @@
* SUCH DAMAGE.
*
* @(#)kern_sysctl.c 8.4 (Berkeley) 4/14/94
* $Id: kern_sysctl.c,v 1.71 1997/10/11 18:31:24 phk Exp $
* $Id: kern_sysctl.c,v 1.72 1997/10/12 20:23:56 phk Exp $
*/
#include <sys/param.h>
@ -769,7 +769,7 @@ struct sysctl_args {
#endif
int
__sysctl(struct proc *p, struct sysctl_args *uap, int *retval)
__sysctl(struct proc *p, struct sysctl_args *uap)
{
int error, i, j, name[CTL_MAXNAME];
@ -939,7 +939,7 @@ struct getkerninfo_args {
#endif
int
ogetkerninfo(struct proc *p, struct getkerninfo_args *uap, int *retval)
ogetkerninfo(struct proc *p, struct getkerninfo_args *uap)
{
int error, name[6];
u_int size;
@ -1070,7 +1070,7 @@ ogetkerninfo(struct proc *p, struct getkerninfo_args *uap, int *retval)
}
if (error)
return (error);
*retval = size;
p->p_retval[0] = size;
if (uap->size)
error = copyout((caddr_t)&size, (caddr_t)uap->size,
sizeof(size));

View File

@ -46,7 +46,7 @@
* in Germany will I accept domestic beer. This code may or may not work
* and I certainly make no claims as to its fitness for *any* purpose.
*
* $Id: kern_threads.c,v 1.2 1997/07/06 02:40:42 dyson Exp $
* $Id: kern_threads.c,v 1.3 1997/09/02 20:05:44 bde Exp $
*/
#include <sys/param.h>
@ -67,7 +67,7 @@
* returns time waiting in ticks.
*/
int
thr_sleep(struct proc *p, struct thr_sleep_args *uap, int *retval) {
thr_sleep(struct proc *p, struct thr_sleep_args *uap) {
int sleepstart;
struct timespec ts;
struct timeval atv, utv;
@ -104,7 +104,7 @@ thr_sleep(struct proc *p, struct thr_sleep_args *uap, int *retval) {
timo = 1;
}
retval[0] = 0;
p->p_retval[0] = 0;
if (p->p_wakeup == 0) {
sleepstart = ticks;
p->p_flag |= P_SINTR;
@ -112,25 +112,25 @@ thr_sleep(struct proc *p, struct thr_sleep_args *uap, int *retval) {
p->p_flag &= ~P_SINTR;
if (error == EWOULDBLOCK) {
p->p_wakeup = 0;
retval[0] = EAGAIN;
p->p_retval[0] = EAGAIN;
return 0;
}
if (uap->timeout == 0)
retval[0] = ticks - sleepstart;
p->p_retval[0] = ticks - sleepstart;
}
p->p_wakeup = 0;
return (0);
}
int
thr_wakeup(struct proc *p, struct thr_wakeup_args *uap, int *retval) {
thr_wakeup(struct proc *p, struct thr_wakeup_args *uap) {
struct proc *pSlave = p->p_leader;
while(pSlave && (pSlave->p_pid != uap->pid))
pSlave = pSlave->p_peers;
if(pSlave == 0) {
retval[0] = ESRCH;
p->p_retval[0] = ESRCH;
return(0);
}
@ -140,7 +140,7 @@ thr_wakeup(struct proc *p, struct thr_wakeup_args *uap, int *retval) {
return(0);
}
retval[0] = EAGAIN;
p->p_retval[0] = EAGAIN;
return 0;
}
@ -148,10 +148,10 @@ thr_wakeup(struct proc *p, struct thr_wakeup_args *uap, int *retval) {
* General purpose yield system call
*/
int
yield(struct proc *p, struct yield_args *uap, int *retval) {
yield(struct proc *p, struct yield_args *uap) {
int s;
retval[0] = 0;
p->p_retval[0] = 0;
s = splhigh();
p->p_priority = MAXPRI;

View File

@ -31,7 +31,7 @@
* SUCH DAMAGE.
*
* @(#)kern_time.c 8.1 (Berkeley) 6/10/93
* $Id: kern_time.c,v 1.37 1997/10/20 18:43:49 ache Exp $
* $Id: kern_time.c,v 1.38 1997/10/26 20:26:28 phk Exp $
*/
#include <sys/param.h>
@ -63,6 +63,7 @@ static int nanosleep1 __P((struct proc *p, struct timespec *rqt,
struct timespec *rmt));
static int settime __P((struct timeval *));
static void timevalfix __P((struct timeval *));
static void no_lease_updatetime __P((int));
static void
no_lease_updatetime(deltat)
@ -133,10 +134,9 @@ struct clock_gettime_args {
/* ARGSUSED */
int
clock_gettime(p, uap, retval)
clock_gettime(p, uap)
struct proc *p;
struct clock_gettime_args *uap;
register_t *retval;
{
struct timeval atv;
struct timespec ats;
@ -157,10 +157,9 @@ struct clock_settime_args {
/* ARGSUSED */
int
clock_settime(p, uap, retval)
clock_settime(p, uap)
struct proc *p;
struct clock_settime_args *uap;
register_t *retval;
{
struct timeval atv;
struct timespec ats;
@ -188,10 +187,9 @@ struct clock_getres_args {
#endif
int
clock_getres(p, uap, retval)
clock_getres(p, uap)
struct proc *p;
struct clock_getres_args *uap;
register_t *retval;
{
struct timespec ts;
int error;
@ -297,10 +295,9 @@ struct nanosleep_args {
/* ARGSUSED */
int
nanosleep(p, uap, retval)
nanosleep(p, uap)
struct proc *p;
struct nanosleep_args *uap;
register_t *retval;
{
struct timespec rmt, rqt;
int error, error2;
@ -330,10 +327,9 @@ struct signanosleep_args {
/* ARGSUSED */
int
signanosleep(p, uap, retval)
signanosleep(p, uap)
struct proc *p;
struct signanosleep_args *uap;
register_t *retval;
{
struct timespec rmt, rqt;
int error, error2;
@ -371,10 +367,9 @@ struct gettimeofday_args {
#endif
/* ARGSUSED */
int
gettimeofday(p, uap, retval)
gettimeofday(p, uap)
struct proc *p;
register struct gettimeofday_args *uap;
int *retval;
{
struct timeval atv;
int error = 0;
@ -399,10 +394,9 @@ struct settimeofday_args {
#endif
/* ARGSUSED */
int
settimeofday(p, uap, retval)
settimeofday(p, uap)
struct proc *p;
struct settimeofday_args *uap;
int *retval;
{
struct timeval atv;
struct timezone atz;
@ -440,10 +434,9 @@ struct adjtime_args {
#endif
/* ARGSUSED */
int
adjtime(p, uap, retval)
adjtime(p, uap)
struct proc *p;
register struct adjtime_args *uap;
int *retval;
{
struct timeval atv;
register long ndelta, ntickdelta, odelta;
@ -521,10 +514,9 @@ struct getitimer_args {
#endif
/* ARGSUSED */
int
getitimer(p, uap, retval)
getitimer(p, uap)
struct proc *p;
register struct getitimer_args *uap;
int *retval;
{
struct itimerval aitv;
int s;
@ -560,10 +552,9 @@ struct setitimer_args {
#endif
/* ARGSUSED */
int
setitimer(p, uap, retval)
setitimer(p, uap)
struct proc *p;
register struct setitimer_args *uap;
int *retval;
{
struct itimerval aitv;
register struct itimerval *itvp;
@ -576,7 +567,7 @@ setitimer(p, uap, retval)
sizeof(struct itimerval))))
return (error);
if ((uap->itv = uap->oitv) &&
(error = getitimer(p, (struct getitimer_args *)uap, retval)))
(error = getitimer(p, (struct getitimer_args *)uap)))
return (error);
if (itvp == 0)
return (0);

View File

@ -31,7 +31,7 @@
* SUCH DAMAGE.
*
* @(#)kern_xxx.c 8.2 (Berkeley) 11/14/93
* $Id$
* $Id: kern_xxx.c,v 1.25 1997/02/22 09:39:13 peter Exp $
*/
#include <sys/param.h>
@ -53,10 +53,9 @@ struct gethostname_args {
#endif
/* ARGSUSED */
int
ogethostname(p, uap, retval)
ogethostname(p, uap)
struct proc *p;
struct gethostname_args *uap;
int *retval;
{
int name[2];
@ -74,10 +73,9 @@ struct sethostname_args {
#endif
/* ARGSUSED */
int
osethostname(p, uap, retval)
osethostname(p, uap)
struct proc *p;
register struct sethostname_args *uap;
int *retval;
{
int name[2];
int error;
@ -97,13 +95,12 @@ struct ogethostid_args {
#endif
/* ARGSUSED */
int
ogethostid(p, uap, retval)
ogethostid(p, uap)
struct proc *p;
struct ogethostid_args *uap;
int *retval;
{
*(long *)retval = hostid;
*(long *)(p->p_retval) = hostid;
return (0);
}
#endif /* COMPAT_43 || COMPAT_SUNOS */
@ -116,10 +113,9 @@ struct osethostid_args {
#endif
/* ARGSUSED */
int
osethostid(p, uap, retval)
osethostid(p, uap)
struct proc *p;
struct osethostid_args *uap;
int *retval;
{
int error;
@ -130,10 +126,9 @@ osethostid(p, uap, retval)
}
int
oquota(p, uap, retval)
oquota(p, uap)
struct proc *p;
struct oquota_args *uap;
int *retval;
{
return (ENOSYS);
@ -148,10 +143,9 @@ struct uname_args {
/* ARGSUSED */
int
uname(p, uap, retval)
uname(p, uap)
struct proc *p;
struct uname_args *uap;
int *retval;
{
int name[2], len, rtval;
char *s, *us;
@ -220,10 +214,9 @@ struct getdomainname_args {
/* ARGSUSED */
int
getdomainname(p, uap, retval)
getdomainname(p, uap)
struct proc *p;
struct getdomainname_args *uap;
int *retval;
{
int domainnamelen = strlen(domainname) + 1;
if ((u_int)uap->len > domainnamelen + 1)
@ -240,10 +233,9 @@ struct setdomainname_args {
/* ARGSUSED */
int
setdomainname(p, uap, retval)
setdomainname(p, uap)
struct proc *p;
struct setdomainname_args *uap;
int *retval;
{
int error, domainnamelen;

View File

@ -31,7 +31,7 @@
* SUCH DAMAGE.
*
* @(#)subr_prof.c 8.3 (Berkeley) 9/23/93
* $Id: subr_prof.c,v 1.22 1997/10/12 20:24:00 phk Exp $
* $Id: subr_prof.c,v 1.23 1997/10/27 17:23:08 bde Exp $
*/
#include <sys/param.h>
@ -348,10 +348,9 @@ struct profil_args {
#endif
/* ARGSUSED */
int
profil(p, uap, retval)
profil(p, uap)
struct proc *p;
register struct profil_args *uap;
int *retval;
{
register struct uprof *upp;
int s;

View File

@ -35,7 +35,7 @@
* SUCH DAMAGE.
*
* from: @(#)trap.c 7.4 (Berkeley) 5/13/91
* $Id: trap.c,v 1.112 1997/10/10 09:44:09 peter Exp $
* $Id: trap.c,v 1.113 1997/10/10 12:42:48 peter Exp $
*/
/*
@ -904,7 +904,7 @@ syscall(frame)
struct proc *p = curproc;
u_quad_t sticks;
int error;
int args[8], rval[2];
int args[8];
u_int code;
sticks = p->p_sticks;
@ -956,10 +956,10 @@ syscall(frame)
if (KTRPOINT(p, KTR_SYSCALL))
ktrsyscall(p->p_tracep, code, callp->sy_narg, args);
#endif
rval[0] = 0;
rval[1] = frame.tf_edx;
p->p_retval[0] = 0;
p->p_retval[1] = frame.tf_edx;
error = (*callp->sy_call)(p, args, rval);
error = (*callp->sy_call)(p, args);
switch (error) {
@ -969,8 +969,8 @@ syscall(frame)
* if this is a child returning from fork syscall.
*/
p = curproc;
frame.tf_eax = rval[0];
frame.tf_edx = rval[1];
frame.tf_eax = p->p_retval[0];
frame.tf_edx = p->p_retval[1];
frame.tf_eflags &= ~PSL_C;
break;
@ -1007,7 +1007,7 @@ syscall(frame)
#ifdef KTRACE
if (KTRPOINT(p, KTR_SYSRET))
ktrsysret(p->p_tracep, code, error, rval[0]);
ktrsysret(p->p_tracep, code, error, p->p_retval[0]);
#endif
}

View File

@ -36,7 +36,7 @@
* SUCH DAMAGE.
*
* @(#)sys_generic.c 8.5 (Berkeley) 1/21/94
* $Id: sys_generic.c,v 1.30 1997/10/11 18:31:24 phk Exp $
* $Id: sys_generic.c,v 1.31 1997/10/12 20:24:02 phk Exp $
*/
#include "opt_ktrace.h"
@ -65,8 +65,8 @@ static MALLOC_DEFINE(M_IOCTLOPS, "ioctlops", "ioctl data buffer");
static MALLOC_DEFINE(M_SELECT, "select", "select() buffer");
MALLOC_DEFINE(M_IOV, "iov", "large iov's");
static int selscan __P((struct proc *, fd_mask **, fd_mask **, int, int *));
static int pollscan __P((struct proc *, struct pollfd *, int, int *));
static int selscan __P((struct proc *, fd_mask **, fd_mask **, int));
static int pollscan __P((struct proc *, struct pollfd *, int));
/*
* Read system call.
@ -80,10 +80,9 @@ struct read_args {
#endif
/* ARGSUSED */
int
read(p, uap, retval)
read(p, uap)
struct proc *p;
register struct read_args *uap;
int *retval;
{
register struct file *fp;
register struct filedesc *fdp = p->p_fd;
@ -128,7 +127,7 @@ read(p, uap, retval)
if (KTRPOINT(p, KTR_GENIO) && error == 0)
ktrgenio(p->p_tracep, uap->fd, UIO_READ, &ktriov, cnt, error);
#endif
*retval = cnt;
p->p_retval[0] = cnt;
return (error);
}
@ -143,10 +142,9 @@ struct readv_args {
};
#endif
int
readv(p, uap, retval)
readv(p, uap)
struct proc *p;
register struct readv_args *uap;
int *retval;
{
register struct file *fp;
register struct filedesc *fdp = p->p_fd;
@ -215,7 +213,7 @@ readv(p, uap, retval)
FREE(ktriov, M_TEMP);
}
#endif
*retval = cnt;
p->p_retval[0] = cnt;
done:
if (needfree)
FREE(needfree, M_IOV);
@ -233,10 +231,9 @@ struct write_args {
};
#endif
int
write(p, uap, retval)
write(p, uap)
struct proc *p;
register struct write_args *uap;
int *retval;
{
register struct file *fp;
register struct filedesc *fdp = p->p_fd;
@ -281,7 +278,7 @@ write(p, uap, retval)
ktrgenio(p->p_tracep, uap->fd, UIO_WRITE,
&ktriov, cnt, error);
#endif
*retval = cnt;
p->p_retval[0] = cnt;
return (error);
}
@ -296,10 +293,9 @@ struct writev_args {
};
#endif
int
writev(p, uap, retval)
writev(p, uap)
struct proc *p;
register struct writev_args *uap;
int *retval;
{
register struct file *fp;
register struct filedesc *fdp = p->p_fd;
@ -371,7 +367,7 @@ writev(p, uap, retval)
FREE(ktriov, M_TEMP);
}
#endif
*retval = cnt;
p->p_retval[0] = cnt;
done:
if (needfree)
FREE(needfree, M_IOV);
@ -390,10 +386,9 @@ struct ioctl_args {
#endif
/* ARGSUSED */
int
ioctl(p, uap, retval)
ioctl(p, uap)
struct proc *p;
register struct ioctl_args *uap;
int *retval;
{
register struct file *fp;
register struct filedesc *fdp;
@ -531,10 +526,9 @@ struct select_args {
};
#endif
int
select(p, uap, retval)
select(p, uap)
register struct proc *p;
register struct select_args *uap;
int *retval;
{
/*
* The magic 2048 here is chosen to be just enough for FD_SETSIZE
@ -620,8 +614,8 @@ select(p, uap, retval)
retry:
ncoll = nselcoll;
p->p_flag |= P_SELECT;
error = selscan(p, ibits, obits, uap->nd, retval);
if (error || *retval)
error = selscan(p, ibits, obits, uap->nd);
if (error || p->p_retval[0])
goto done;
s = splhigh();
/* this should be timercmp(&time, &atv, >=) */
@ -663,10 +657,10 @@ select(p, uap, retval)
}
static int
selscan(p, ibits, obits, nfd, retval)
selscan(p, ibits, obits, nfd)
struct proc *p;
fd_mask **ibits, **obits;
int nfd, *retval;
int nfd;
{
register struct filedesc *fdp = p->p_fd;
register int msk, i, j, fd;
@ -695,7 +689,7 @@ selscan(p, ibits, obits, nfd, retval)
}
}
}
*retval = n;
p->p_retval[0] = n;
return (0);
}
@ -710,10 +704,9 @@ struct poll_args {
};
#endif
int
poll(p, uap, retval)
poll(p, uap)
register struct proc *p;
register struct poll_args *uap;
register_t *retval;
{
caddr_t bits;
char smallbits[32 * sizeof(struct pollfd)];
@ -756,8 +749,8 @@ poll(p, uap, retval)
retry:
ncoll = nselcoll;
p->p_flag |= P_SELECT;
error = pollscan(p, (struct pollfd *)bits, SCARG(uap, nfds), retval);
if (error || *retval)
error = pollscan(p, (struct pollfd *)bits, SCARG(uap, nfds));
if (error || p->p_retval[0])
goto done;
s = splhigh();
if (timo && timercmp(&time, &atv, >=)) {
@ -792,11 +785,10 @@ poll(p, uap, retval)
}
static int
pollscan(p, fds, nfd, retval)
pollscan(p, fds, nfd)
struct proc *p;
struct pollfd *fds;
int nfd;
register_t *retval;
{
register struct filedesc *fdp = p->p_fd;
int i;
@ -822,7 +814,7 @@ pollscan(p, fds, nfd, retval)
}
}
}
*retval = n;
p->p_retval[0] = n;
return (0);
}
@ -838,12 +830,11 @@ struct openbsd_poll_args {
};
#endif
int
openbsd_poll(p, uap, retval)
openbsd_poll(p, uap)
register struct proc *p;
register struct openbsd_poll_args *uap;
register_t *retval;
{
return (poll(p, (struct poll_args *)uap, retval));
return (poll(p, (struct poll_args *)uap));
}
/*ARGSUSED*/

View File

@ -16,7 +16,7 @@
* 4. Modifications may be freely made to this file if the above conditions
* are met.
*
* $Id: sys_pipe.c,v 1.33 1997/09/14 02:43:25 peter Exp $
* $Id: sys_pipe.c,v 1.34 1997/10/06 08:30:08 peter Exp $
*/
/*
@ -147,12 +147,11 @@ vm_zone_t pipe_zone;
/* ARGSUSED */
int
pipe(p, uap, retval)
pipe(p, uap)
struct proc *p;
struct pipe_args /* {
int dummy;
} */ *uap;
int retval[];
{
register struct filedesc *fdp = p->p_fd;
struct file *rf, *wf;
@ -172,7 +171,7 @@ pipe(p, uap, retval)
error = falloc(p, &rf, &fd);
if (error)
goto free2;
retval[0] = fd;
p->p_retval[0] = fd;
rf->f_flag = FREAD | FWRITE;
rf->f_type = DTYPE_PIPE;
rf->f_ops = &pipeops;
@ -184,7 +183,7 @@ pipe(p, uap, retval)
wf->f_type = DTYPE_PIPE;
wf->f_ops = &pipeops;
wf->f_data = (caddr_t)wpipe;
retval[1] = fd;
p->p_retval[1] = fd;
rpipe->pipe_peer = wpipe;
wpipe->pipe_peer = rpipe;
@ -192,7 +191,7 @@ pipe(p, uap, retval)
return (0);
free3:
ffree(rf);
fdp->fd_ofiles[retval[0]] = 0;
fdp->fd_ofiles[p->p_retval[0]] = 0;
free2:
(void)pipeclose(wpipe);
(void)pipeclose(rpipe);

View File

@ -28,7 +28,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
* $Id: sys_process.c,v 1.29 1997/04/27 21:26:29 alex Exp $
* $Id: sys_process.c,v 1.30 1997/09/02 20:05:53 bde Exp $
*/
#include <sys/param.h>
@ -201,10 +201,9 @@ struct ptrace_args {
#endif
int
ptrace(curp, uap, retval)
ptrace(curp, uap)
struct proc *curp;
struct ptrace_args *uap;
int *retval;
{
struct proc *p;
struct iovec iov;
@ -304,7 +303,7 @@ ptrace(curp, uap, retval)
*/
write = 0;
*retval = 0;
p->p_retval[0] = 0;
switch (uap->req) {
case PT_TRACE_ME:
@ -381,7 +380,7 @@ ptrace(curp, uap, retval)
case PT_READ_I:
case PT_READ_D:
/* write = 0 set above */
iov.iov_base = write ? (caddr_t)&uap->data : (caddr_t)retval;
iov.iov_base = write ? (caddr_t)&uap->data : (caddr_t)p->p_retval;
iov.iov_len = sizeof(int);
uio.uio_iov = &iov;
uio.uio_iovcnt = 1;
@ -415,9 +414,9 @@ ptrace(curp, uap, retval)
if (p->p_flag & P_INMEM) {
p->p_addr->u_kproc.kp_proc = *p;
fill_eproc (p, &p->p_addr->u_kproc.kp_eproc);
*retval = *(int*)((u_int)p->p_addr + (u_int)uap->addr);
p->p_retval[0] = *(int*)((u_int)p->p_addr + (u_int)uap->addr);
} else {
*retval = 0;
p->p_retval[0] = 0;
error = EFAULT;
}
PRELE(p);

View File

@ -1,4 +1,4 @@
/* $Id$ */
/* $Id: sysv_ipc.c,v 1.6 1997/02/22 09:39:21 peter Exp $ */
/* $NetBSD: sysv_ipc.c,v 1.7 1994/06/29 06:33:11 cgd Exp $ */
/*
@ -99,53 +99,48 @@ sysv_nosys(p, s)
*/
int
semsys(p, uap, retval)
semsys(p, uap)
struct proc *p;
struct semsys_args *uap;
int *retval;
{
sysv_nosys(p, "SYSVSEM");
return nosys(p, (struct nosys_args *)uap, retval);
return nosys(p, (struct nosys_args *)uap);
};
int
semconfig(p, uap, retval)
semconfig(p, uap)
struct proc *p;
struct semconfig_args *uap;
int *retval;
{
sysv_nosys(p, "SYSVSEM");
return nosys(p, (struct nosys_args *)uap, retval);
return nosys(p, (struct nosys_args *)uap);
};
int
__semctl(p, uap, retval)
__semctl(p, uap)
struct proc *p;
register struct __semctl_args *uap;
int *retval;
{
sysv_nosys(p, "SYSVSEM");
return nosys(p, (struct nosys_args *)uap, retval);
return nosys(p, (struct nosys_args *)uap);
};
int
semget(p, uap, retval)
semget(p, uap)
struct proc *p;
register struct semget_args *uap;
int *retval;
{
sysv_nosys(p, "SYSVSEM");
return nosys(p, (struct nosys_args *)uap, retval);
return nosys(p, (struct nosys_args *)uap);
};
int
semop(p, uap, retval)
semop(p, uap)
struct proc *p;
register struct semop_args *uap;
int *retval;
{
sysv_nosys(p, "SYSVSEM");
return nosys(p, (struct nosys_args *)uap, retval);
return nosys(p, (struct nosys_args *)uap);
};
/* called from kern_exit.c */
@ -166,54 +161,49 @@ semexit(p)
*/
int
msgsys(p, uap, retval)
msgsys(p, uap)
struct proc *p;
/* XXX actually varargs. */
struct msgsys_args *uap;
int *retval;
{
sysv_nosys(p, "SYSVMSG");
return nosys(p, (struct nosys_args *)uap, retval);
return nosys(p, (struct nosys_args *)uap);
};
int
msgctl(p, uap, retval)
msgctl(p, uap)
struct proc *p;
register struct msgctl_args *uap;
int *retval;
{
sysv_nosys(p, "SYSVMSG");
return nosys(p, (struct nosys_args *)uap, retval);
return nosys(p, (struct nosys_args *)uap);
};
int
msgget(p, uap, retval)
msgget(p, uap)
struct proc *p;
register struct msgget_args *uap;
int *retval;
{
sysv_nosys(p, "SYSVMSG");
return nosys(p, (struct nosys_args *)uap, retval);
return nosys(p, (struct nosys_args *)uap);
};
int
msgsnd(p, uap, retval)
msgsnd(p, uap)
struct proc *p;
register struct msgsnd_args *uap;
int *retval;
{
sysv_nosys(p, "SYSVMSG");
return nosys(p, (struct nosys_args *)uap, retval);
return nosys(p, (struct nosys_args *)uap);
};
int
msgrcv(p, uap, retval)
msgrcv(p, uap)
struct proc *p;
register struct msgrcv_args *uap;
int *retval;
{
sysv_nosys(p, "SYSVMSG");
return nosys(p, (struct nosys_args *)uap, retval);
return nosys(p, (struct nosys_args *)uap);
};
#endif /* !defined(SYSVMSG) */
@ -226,54 +216,49 @@ msgrcv(p, uap, retval)
*/
int
shmdt(p, uap, retval)
shmdt(p, uap)
struct proc *p;
struct shmdt_args *uap;
int *retval;
{
sysv_nosys(p, "SYSVSHM");
return nosys(p, (struct nosys_args *)uap, retval);
return nosys(p, (struct nosys_args *)uap);
};
int
shmat(p, uap, retval)
shmat(p, uap)
struct proc *p;
struct shmat_args *uap;
int *retval;
{
sysv_nosys(p, "SYSVSHM");
return nosys(p, (struct nosys_args *)uap, retval);
return nosys(p, (struct nosys_args *)uap);
};
int
shmctl(p, uap, retval)
shmctl(p, uap)
struct proc *p;
struct shmctl_args *uap;
int *retval;
{
sysv_nosys(p, "SYSVSHM");
return nosys(p, (struct nosys_args *)uap, retval);
return nosys(p, (struct nosys_args *)uap);
};
int
shmget(p, uap, retval)
shmget(p, uap)
struct proc *p;
struct shmget_args *uap;
int *retval;
{
sysv_nosys(p, "SYSVSHM");
return nosys(p, (struct nosys_args *)uap, retval);
return nosys(p, (struct nosys_args *)uap);
};
int
shmsys(p, uap, retval)
shmsys(p, uap)
struct proc *p;
/* XXX actually varargs. */
struct shmsys_args *uap;
int *retval;
{
sysv_nosys(p, "SYSVSHM");
return nosys(p, (struct nosys_args *)uap, retval);
return nosys(p, (struct nosys_args *)uap);
};
/* called from kern_fork.c */

View File

@ -1,4 +1,4 @@
/* $Id: sysv_msg.c,v 1.15 1997/02/22 09:39:22 peter Exp $ */
/* $Id: sysv_msg.c,v 1.16 1997/08/02 14:31:37 bde Exp $ */
/*
* Implementation of SVID messages
@ -35,13 +35,13 @@ SYSINIT(sysv_msg, SI_SUB_SYSV_MSG, SI_ORDER_FIRST, msginit, NULL)
#ifndef _SYS_SYSPROTO_H_
struct msgctl_args;
int msgctl __P((struct proc *p, struct msgctl_args *uap, int *retval));
int msgctl __P((struct proc *p, struct msgctl_args *uap));
struct msgget_args;
int msgget __P((struct proc *p, struct msgget_args *uap, int *retval));
int msgget __P((struct proc *p, struct msgget_args *uap));
struct msgsnd_args;
int msgsnd __P((struct proc *p, struct msgsnd_args *uap, int *retval));
int msgsnd __P((struct proc *p, struct msgsnd_args *uap));
struct msgrcv_args;
int msgrcv __P((struct proc *p, struct msgrcv_args *uap, int *retval));
int msgrcv __P((struct proc *p, struct msgrcv_args *uap));
#endif
static void msg_freehdr __P((struct msg *msghdr));
@ -120,7 +120,7 @@ msginit(dummy)
* Entry point for all MSG calls
*/
int
msgsys(p, uap, retval)
msgsys(p, uap)
struct proc *p;
/* XXX actually varargs. */
struct msgsys_args /* {
@ -131,12 +131,11 @@ msgsys(p, uap, retval)
int a5;
int a6;
} */ *uap;
int *retval;
{
if (uap->which >= sizeof(msgcalls)/sizeof(msgcalls[0]))
return (EINVAL);
return ((*msgcalls[uap->which])(p, &uap->a2, retval));
return ((*msgcalls[uap->which])(p, &uap->a2));
}
static void
@ -172,10 +171,9 @@ struct msgctl_args {
#endif
int
msgctl(p, uap, retval)
msgctl(p, uap)
struct proc *p;
register struct msgctl_args *uap;
int *retval;
{
int msqid = uap->msqid;
int cmd = uap->cmd;
@ -296,7 +294,7 @@ msgctl(p, uap, retval)
}
if (eval == 0)
*retval = rval;
p->p_retval[0] = rval;
return(eval);
}
@ -308,10 +306,9 @@ struct msgget_args {
#endif
int
msgget(p, uap, retval)
msgget(p, uap)
struct proc *p;
register struct msgget_args *uap;
int *retval;
{
int msqid, eval;
int key = uap->key;
@ -403,7 +400,7 @@ msgget(p, uap, retval)
found:
/* Construct the unique msqid */
*retval = IXSEQ_TO_IPCID(msqid, msqptr->msg_perm);
p->p_retval[0] = IXSEQ_TO_IPCID(msqid, msqptr->msg_perm);
return(0);
}
@ -417,10 +414,9 @@ struct msgsnd_args {
#endif
int
msgsnd(p, uap, retval)
msgsnd(p, uap)
struct proc *p;
register struct msgsnd_args *uap;
int *retval;
{
int msqid = uap->msqid;
void *user_msgp = uap->msgp;
@ -739,7 +735,7 @@ msgsnd(p, uap, retval)
msqptr->msg_stime = time.tv_sec;
wakeup((caddr_t)msqptr);
*retval = 0;
p->p_retval[0] = 0;
return(0);
}
@ -754,10 +750,9 @@ struct msgrcv_args {
#endif
int
msgrcv(p, uap, retval)
msgrcv(p, uap)
struct proc *p;
register struct msgrcv_args *uap;
int *retval;
{
int msqid = uap->msqid;
void *user_msgp = uap->msgp;
@ -1027,6 +1022,6 @@ msgrcv(p, uap, retval)
msg_freehdr(msghdr);
wakeup((caddr_t)msqptr);
*retval = msgsz;
p->p_retval[0] = msgsz;
return(0);
}

View File

@ -1,4 +1,4 @@
/* $Id: sysv_sem.c,v 1.18 1997/02/22 09:39:22 peter Exp $ */
/* $Id: sysv_sem.c,v 1.19 1997/08/02 14:31:38 bde Exp $ */
/*
* Implementation of SVID semaphores
@ -21,14 +21,13 @@ SYSINIT(sysv_sem, SI_SUB_SYSV_SEM, SI_ORDER_FIRST, seminit, NULL)
#ifndef _SYS_SYSPROTO_H_
struct __semctl_args;
int __semctl __P((struct proc *p, struct __semctl_args *uap, int *retval));
int __semctl __P((struct proc *p, struct __semctl_args *uap));
struct semget_args;
int semget __P((struct proc *p, struct semget_args *uap, int *retval));
int semget __P((struct proc *p, struct semget_args *uap));
struct semop_args;
int semop __P((struct proc *p, struct semop_args *uap, int *retval));
int semop __P((struct proc *p, struct semop_args *uap));
struct semconfig_args;
int semconfig __P((struct proc *p, struct semconfig_args *uap,
int *retval));
int semconfig __P((struct proc *p, struct semconfig_args *uap));
#endif
static struct sem_undo *semu_alloc __P((struct proc *p));
@ -76,7 +75,7 @@ seminit(dummy)
* Entry point for all SEM calls
*/
int
semsys(p, uap, retval)
semsys(p, uap)
struct proc *p;
/* XXX actually varargs. */
struct semsys_args /* {
@ -86,7 +85,6 @@ semsys(p, uap, retval)
int a4;
int a5;
} */ *uap;
int *retval;
{
while (semlock_holder != NULL && semlock_holder != p)
@ -94,7 +92,7 @@ semsys(p, uap, retval)
if (uap->which >= sizeof(semcalls)/sizeof(semcalls[0]))
return (EINVAL);
return ((*semcalls[uap->which])(p, &uap->a2, retval));
return ((*semcalls[uap->which])(p, &uap->a2));
}
/*
@ -119,10 +117,9 @@ struct semconfig_args {
#endif
int
semconfig(p, uap, retval)
semconfig(p, uap)
struct proc *p;
struct semconfig_args *uap;
int *retval;
{
int eval = 0;
@ -143,7 +140,7 @@ semconfig(p, uap, retval)
break;
}
*retval = 0;
p->p_retval[0] = 0;
return(eval);
}
@ -330,10 +327,9 @@ struct __semctl_args {
#endif
int
__semctl(p, uap, retval)
__semctl(p, uap)
struct proc *p;
register struct __semctl_args *uap;
int *retval;
{
int semid = uap->semid;
int semnum = uap->semnum;
@ -482,7 +478,7 @@ __semctl(p, uap, retval)
}
if (eval == 0)
*retval = rval;
p->p_retval[0] = rval;
return(eval);
}
@ -495,10 +491,9 @@ struct semget_args {
#endif
int
semget(p, uap, retval)
semget(p, uap)
struct proc *p;
register struct semget_args *uap;
int *retval;
{
int semid, eval;
int key = uap->key;
@ -597,7 +592,7 @@ semget(p, uap, retval)
}
found:
*retval = IXSEQ_TO_IPCID(semid, sema[semid].sem_perm);
p->p_retval[0] = IXSEQ_TO_IPCID(semid, sema[semid].sem_perm);
return(0);
}
@ -610,10 +605,9 @@ struct semop_args {
#endif
int
semop(p, uap, retval)
semop(p, uap)
struct proc *p;
register struct semop_args *uap;
int *retval;
{
int semid = uap->semid;
int nsops = uap->nsops;
@ -868,7 +862,7 @@ semop(p, uap, retval)
#ifdef SEM_DEBUG
printf("semop: done\n");
#endif
*retval = 0;
p->p_retval[0] = 0;
return(0);
}

View File

@ -1,4 +1,4 @@
/* $Id: sysv_shm.c,v 1.30 1997/10/11 18:31:25 phk Exp $ */
/* $Id: sysv_shm.c,v 1.31 1997/10/12 20:24:03 phk Exp $ */
/* $NetBSD: sysv_shm.c,v 1.23 1994/07/04 23:25:12 glass Exp $ */
/*
@ -56,13 +56,13 @@
#ifndef _SYS_SYSPROTO_H_
struct shmat_args;
extern int shmat __P((struct proc *p, struct shmat_args *uap, int *retval));
extern int shmat __P((struct proc *p, struct shmat_args *uap));
struct shmctl_args;
extern int shmctl __P((struct proc *p, struct shmctl_args *uap, int *retval));
extern int shmctl __P((struct proc *p, struct shmctl_args *uap));
struct shmdt_args;
extern int shmdt __P((struct proc *p, struct shmdt_args *uap, int *retval));
extern int shmdt __P((struct proc *p, struct shmdt_args *uap));
struct shmget_args;
extern int shmget __P((struct proc *p, struct shmget_args *uap, int *retval));
extern int shmget __P((struct proc *p, struct shmget_args *uap));
#endif
static MALLOC_DEFINE(M_SHM, "shm", "SVID compatible shared memory segments");
@ -71,9 +71,9 @@ static void shminit __P((void *));
SYSINIT(sysv_shm, SI_SUB_SYSV_SHM, SI_ORDER_FIRST, shminit, NULL)
struct oshmctl_args;
static int oshmctl __P((struct proc *p, struct oshmctl_args *uap, int *retval));
static int shmget_allocate_segment __P((struct proc *p, struct shmget_args *uap, int mode, int *retval));
static int shmget_existing __P((struct proc *p, struct shmget_args *uap, int mode, int segnum, int *retval));
static int oshmctl __P((struct proc *p, struct oshmctl_args *uap));
static int shmget_allocate_segment __P((struct proc *p, struct shmget_args *uap, int mode));
static int shmget_existing __P((struct proc *p, struct shmget_args *uap, int mode, int segnum));
/* XXX casting to (sy_call_t *) is bogus, as usual. */
sy_call_t *shmcalls[] = {
@ -185,10 +185,9 @@ struct shmdt_args {
#endif
int
shmdt(p, uap, retval)
shmdt(p, uap)
struct proc *p;
struct shmdt_args *uap;
int *retval;
{
struct shmmap_state *shmmap_s;
int i;
@ -214,10 +213,9 @@ struct shmat_args {
#endif
int
shmat(p, uap, retval)
shmat(p, uap)
struct proc *p;
struct shmat_args *uap;
int *retval;
{
int error, i, flags;
struct ucred *cred = p->p_ucred;
@ -284,7 +282,7 @@ shmat(p, uap, retval)
shmseg->shm_lpid = p->p_pid;
shmseg->shm_atime = time.tv_sec;
shmseg->shm_nattch++;
*retval = attach_va;
p->p_retval[0] = attach_va;
return 0;
}
@ -307,10 +305,9 @@ struct oshmctl_args {
};
static int
oshmctl(p, uap, retval)
oshmctl(p, uap)
struct proc *p;
struct oshmctl_args *uap;
int *retval;
{
#ifdef COMPAT_43
int error;
@ -341,7 +338,7 @@ oshmctl(p, uap, retval)
break;
default:
/* XXX casting to (sy_call_t *) is bogus, as usual. */
return ((sy_call_t *)shmctl)(p, uap, retval);
return ((sy_call_t *)shmctl)(p, uap);
}
return 0;
#else
@ -358,10 +355,9 @@ struct shmctl_args {
#endif
int
shmctl(p, uap, retval)
shmctl(p, uap)
struct proc *p;
struct shmctl_args *uap;
int *retval;
{
int error;
struct ucred *cred = p->p_ucred;
@ -424,12 +420,11 @@ struct shmget_args {
#endif
static int
shmget_existing(p, uap, mode, segnum, retval)
shmget_existing(p, uap, mode, segnum)
struct proc *p;
struct shmget_args *uap;
int mode;
int segnum;
int *retval;
{
struct shmid_ds *shmseg;
struct ucred *cred = p->p_ucred;
@ -455,16 +450,15 @@ shmget_existing(p, uap, mode, segnum, retval)
return EINVAL;
if ((uap->shmflg & (IPC_CREAT | IPC_EXCL)) == (IPC_CREAT | IPC_EXCL))
return EEXIST;
*retval = IXSEQ_TO_IPCID(segnum, shmseg->shm_perm);
p->p_retval[0] = IXSEQ_TO_IPCID(segnum, shmseg->shm_perm);
return 0;
}
static int
shmget_allocate_segment(p, uap, mode, retval)
shmget_allocate_segment(p, uap, mode)
struct proc *p;
struct shmget_args *uap;
int mode;
int *retval;
{
int i, segnum, shmid, size;
struct ucred *cred = p->p_ucred;
@ -528,15 +522,14 @@ shmget_allocate_segment(p, uap, mode, retval)
shmseg->shm_perm.mode &= ~SHMSEG_WANTED;
wakeup((caddr_t)shmseg);
}
*retval = shmid;
p->p_retval[0] = shmid;
return 0;
}
int
shmget(p, uap, retval)
shmget(p, uap)
struct proc *p;
struct shmget_args *uap;
int *retval;
{
int segnum, mode, error;
@ -545,7 +538,7 @@ shmget(p, uap, retval)
again:
segnum = shm_find_segment_by_key(uap->key);
if (segnum >= 0) {
error = shmget_existing(p, uap, mode, segnum, retval);
error = shmget_existing(p, uap, mode, segnum);
if (error == EAGAIN)
goto again;
return error;
@ -553,11 +546,11 @@ shmget(p, uap, retval)
if ((uap->shmflg & IPC_CREAT) == 0)
return ENOENT;
}
return shmget_allocate_segment(p, uap, mode, retval);
return shmget_allocate_segment(p, uap, mode);
}
int
shmsys(p, uap, retval)
shmsys(p, uap)
struct proc *p;
/* XXX actually varargs. */
struct shmsys_args /* {
@ -566,12 +559,11 @@ shmsys(p, uap, retval)
int a3;
int a4;
} */ *uap;
int *retval;
{
if (uap->which >= sizeof(shmcalls)/sizeof(shmcalls[0]))
return EINVAL;
return ((*shmcalls[uap->which])(p, &uap->a2, retval));
return ((*shmcalls[uap->which])(p, &uap->a2));
}
void

View File

@ -31,7 +31,7 @@
* SUCH DAMAGE.
*
* @(#)uipc_syscalls.c 8.4 (Berkeley) 2/21/94
* $Id: uipc_syscalls.c,v 1.30 1997/09/02 20:05:58 bde Exp $
* $Id: uipc_syscalls.c,v 1.31 1997/10/12 20:24:17 phk Exp $
*/
#include "opt_ktrace.h"
@ -53,17 +53,15 @@
#include <sys/ktrace.h>
#endif
extern int sendit __P((struct proc *p, int s, struct msghdr *mp, int flags,
int *retsize));
extern int sendit __P((struct proc *p, int s, struct msghdr *mp, int flags));
extern int recvit __P((struct proc *p, int s, struct msghdr *mp,
caddr_t namelenp, int *retsize));
caddr_t namelenp));
static int accept1 __P((struct proc *p, struct accept_args *uap, int *retval,
int compat));
static int accept1 __P((struct proc *p, struct accept_args *uap, int compat));
static int getsockname1 __P((struct proc *p, struct getsockname_args *uap,
int *retval, int compat));
int compat));
static int getpeername1 __P((struct proc *p, struct getpeername_args *uap,
int *retval, int compat));
int compat));
/*
* System call interface to the socket abstraction.
@ -75,14 +73,13 @@ static int getpeername1 __P((struct proc *p, struct getpeername_args *uap,
extern struct fileops socketops;
int
socket(p, uap, retval)
socket(p, uap)
struct proc *p;
register struct socket_args /* {
int domain;
int type;
int protocol;
} */ *uap;
int *retval;
{
struct filedesc *fdp = p->p_fd;
struct socket *so;
@ -101,21 +98,20 @@ socket(p, uap, retval)
ffree(fp);
} else {
fp->f_data = (caddr_t)so;
*retval = fd;
p->p_retval[0] = fd;
}
return (error);
}
/* ARGSUSED */
int
bind(p, uap, retval)
bind(p, uap)
struct proc *p;
register struct bind_args /* {
int s;
caddr_t name;
int namelen;
} */ *uap;
int *retval;
{
struct file *fp;
struct sockaddr *sa;
@ -134,13 +130,12 @@ bind(p, uap, retval)
/* ARGSUSED */
int
listen(p, uap, retval)
listen(p, uap)
struct proc *p;
register struct listen_args /* {
int s;
int backlog;
} */ *uap;
int *retval;
{
struct file *fp;
int error;
@ -152,14 +147,13 @@ listen(p, uap, retval)
}
static int
accept1(p, uap, retval, compat)
accept1(p, uap, compat)
struct proc *p;
register struct accept_args /* {
int s;
caddr_t name;
int *anamelen;
} */ *uap;
int *retval;
int compat;
{
struct file *fp;
@ -218,7 +212,7 @@ accept1(p, uap, retval, compat)
head->so_qlen--;
fflag = fp->f_flag;
error = falloc(p, &fp, retval);
error = falloc(p, &fp, p->p_retval);
if (error) {
/*
* Probably ran out of file descriptors. Put the
@ -268,37 +262,34 @@ accept1(p, uap, retval, compat)
}
int
accept(p, uap, retval)
accept(p, uap)
struct proc *p;
struct accept_args *uap;
int *retval;
{
return (accept1(p, uap, retval, 0));
return (accept1(p, uap, 0));
}
#ifdef COMPAT_OLDSOCK
int
oaccept(p, uap, retval)
oaccept(p, uap)
struct proc *p;
struct accept_args *uap;
int *retval;
{
return (accept1(p, uap, retval, 1));
return (accept1(p, uap, 1));
}
#endif /* COMPAT_OLDSOCK */
/* ARGSUSED */
int
connect(p, uap, retval)
connect(p, uap)
struct proc *p;
register struct connect_args /* {
int s;
caddr_t name;
int namelen;
} */ *uap;
int *retval;
{
struct file *fp;
register struct socket *so;
@ -342,7 +333,7 @@ connect(p, uap, retval)
}
int
socketpair(p, uap, retval)
socketpair(p, uap)
struct proc *p;
register struct socketpair_args /* {
int domain;
@ -350,7 +341,6 @@ socketpair(p, uap, retval)
int protocol;
int *rsv;
} */ *uap;
int retval[];
{
register struct filedesc *fdp = p->p_fd;
struct file *fp1, *fp2;
@ -391,10 +381,6 @@ socketpair(p, uap, retval)
goto free4;
}
error = copyout((caddr_t)sv, (caddr_t)uap->rsv, 2 * sizeof (int));
#if 0 /* old pipe(2) syscall compatability, unused these days */
retval[0] = sv[0]; /* XXX ??? */
retval[1] = sv[1]; /* XXX ??? */
#endif
return (error);
free4:
ffree(fp2);
@ -410,11 +396,11 @@ socketpair(p, uap, retval)
}
int
sendit(p, s, mp, flags, retsize)
sendit(p, s, mp, flags)
register struct proc *p;
int s;
register struct msghdr *mp;
int flags, *retsize;
int flags;
{
struct file *fp;
struct uio auio;
@ -500,12 +486,12 @@ sendit(p, s, mp, flags, retsize)
psignal(p, SIGPIPE);
}
if (error == 0)
*retsize = len - auio.uio_resid;
p->p_retval[0] = len - auio.uio_resid;
#ifdef KTRACE
if (ktriov != NULL) {
if (error == 0)
ktrgenio(p->p_tracep, s, UIO_WRITE,
ktriov, *retsize, error);
ktriov, p->p_retval[0], error);
FREE(ktriov, M_TEMP);
}
#endif
@ -516,7 +502,7 @@ sendit(p, s, mp, flags, retsize)
}
int
sendto(p, uap, retval)
sendto(p, uap)
struct proc *p;
register struct sendto_args /* {
int s;
@ -526,7 +512,6 @@ sendto(p, uap, retval)
caddr_t to;
int tolen;
} */ *uap;
int *retval;
{
struct msghdr msg;
struct iovec aiov;
@ -541,12 +526,12 @@ sendto(p, uap, retval)
#endif
aiov.iov_base = uap->buf;
aiov.iov_len = uap->len;
return (sendit(p, uap->s, &msg, uap->flags, retval));
return (sendit(p, uap->s, &msg, uap->flags));
}
#ifdef COMPAT_OLDSOCK
int
osend(p, uap, retval)
osend(p, uap)
struct proc *p;
register struct osend_args /* {
int s;
@ -554,7 +539,6 @@ osend(p, uap, retval)
int len;
int flags;
} */ *uap;
int *retval;
{
struct msghdr msg;
struct iovec aiov;
@ -567,18 +551,17 @@ osend(p, uap, retval)
aiov.iov_len = uap->len;
msg.msg_control = 0;
msg.msg_flags = 0;
return (sendit(p, uap->s, &msg, uap->flags, retval));
return (sendit(p, uap->s, &msg, uap->flags));
}
int
osendmsg(p, uap, retval)
osendmsg(p, uap)
struct proc *p;
register struct osendmsg_args /* {
int s;
caddr_t msg;
int flags;
} */ *uap;
int *retval;
{
struct msghdr msg;
struct iovec aiov[UIO_SMALLIOV], *iov;
@ -601,7 +584,7 @@ osendmsg(p, uap, retval)
goto done;
msg.msg_flags = MSG_COMPAT;
msg.msg_iov = iov;
error = sendit(p, uap->s, &msg, uap->flags, retval);
error = sendit(p, uap->s, &msg, uap->flags);
done:
if (iov != aiov)
FREE(iov, M_IOV);
@ -610,14 +593,13 @@ osendmsg(p, uap, retval)
#endif
int
sendmsg(p, uap, retval)
sendmsg(p, uap)
struct proc *p;
register struct sendmsg_args /* {
int s;
caddr_t msg;
int flags;
} */ *uap;
int *retval;
{
struct msghdr msg;
struct iovec aiov[UIO_SMALLIOV], *iov;
@ -642,7 +624,7 @@ sendmsg(p, uap, retval)
#ifdef COMPAT_OLDSOCK
msg.msg_flags = 0;
#endif
error = sendit(p, uap->s, &msg, uap->flags, retval);
error = sendit(p, uap->s, &msg, uap->flags);
done:
if (iov != aiov)
FREE(iov, M_IOV);
@ -650,12 +632,11 @@ sendmsg(p, uap, retval)
}
int
recvit(p, s, mp, namelenp, retsize)
recvit(p, s, mp, namelenp)
register struct proc *p;
int s;
register struct msghdr *mp;
caddr_t namelenp;
int *retsize;
{
struct file *fp;
struct uio auio;
@ -713,7 +694,7 @@ recvit(p, s, mp, namelenp, retsize)
#endif
if (error)
goto out;
*retsize = len - auio.uio_resid;
p->p_retval[0] = len - auio.uio_resid;
if (mp->msg_name) {
len = mp->msg_namelen;
if (len <= 0 || fromsa == 0)
@ -799,7 +780,7 @@ recvit(p, s, mp, namelenp, retsize)
}
int
recvfrom(p, uap, retval)
recvfrom(p, uap)
struct proc *p;
register struct recvfrom_args /* {
int s;
@ -809,7 +790,6 @@ recvfrom(p, uap, retval)
caddr_t from;
int *fromlenaddr;
} */ *uap;
int *retval;
{
struct msghdr msg;
struct iovec aiov;
@ -829,26 +809,25 @@ recvfrom(p, uap, retval)
aiov.iov_len = uap->len;
msg.msg_control = 0;
msg.msg_flags = uap->flags;
return (recvit(p, uap->s, &msg, (caddr_t)uap->fromlenaddr, retval));
return (recvit(p, uap->s, &msg, (caddr_t)uap->fromlenaddr));
}
#ifdef COMPAT_OLDSOCK
int
orecvfrom(p, uap, retval)
orecvfrom(p, uap)
struct proc *p;
struct recvfrom_args *uap;
int *retval;
{
uap->flags |= MSG_COMPAT;
return (recvfrom(p, uap, retval));
return (recvfrom(p, uap));
}
#endif
#ifdef COMPAT_OLDSOCK
int
orecv(p, uap, retval)
orecv(p, uap)
struct proc *p;
register struct orecv_args /* {
int s;
@ -856,7 +835,6 @@ orecv(p, uap, retval)
int len;
int flags;
} */ *uap;
int *retval;
{
struct msghdr msg;
struct iovec aiov;
@ -869,7 +847,7 @@ orecv(p, uap, retval)
aiov.iov_len = uap->len;
msg.msg_control = 0;
msg.msg_flags = uap->flags;
return (recvit(p, uap->s, &msg, (caddr_t)0, retval));
return (recvit(p, uap->s, &msg, (caddr_t)0));
}
/*
@ -878,14 +856,13 @@ orecv(p, uap, retval)
* rights where the control fields are now.
*/
int
orecvmsg(p, uap, retval)
orecvmsg(p, uap)
struct proc *p;
register struct orecvmsg_args /* {
int s;
struct omsghdr *msg;
int flags;
} */ *uap;
int *retval;
{
struct msghdr msg;
struct iovec aiov[UIO_SMALLIOV], *iov;
@ -909,7 +886,7 @@ orecvmsg(p, uap, retval)
if (error)
goto done;
msg.msg_iov = iov;
error = recvit(p, uap->s, &msg, (caddr_t)&uap->msg->msg_namelen, retval);
error = recvit(p, uap->s, &msg, (caddr_t)&uap->msg->msg_namelen);
if (msg.msg_controllen && error == 0)
error = copyout((caddr_t)&msg.msg_controllen,
@ -922,14 +899,13 @@ orecvmsg(p, uap, retval)
#endif
int
recvmsg(p, uap, retval)
recvmsg(p, uap)
struct proc *p;
register struct recvmsg_args /* {
int s;
struct msghdr *msg;
int flags;
} */ *uap;
int *retval;
{
struct msghdr msg;
struct iovec aiov[UIO_SMALLIOV], *uiov, *iov;
@ -957,7 +933,7 @@ recvmsg(p, uap, retval)
(unsigned)(msg.msg_iovlen * sizeof (struct iovec)));
if (error)
goto done;
error = recvit(p, uap->s, &msg, (caddr_t)0, retval);
error = recvit(p, uap->s, &msg, (caddr_t)0);
if (!error) {
msg.msg_iov = uiov;
error = copyout((caddr_t)&msg, (caddr_t)uap->msg, sizeof(msg));
@ -970,13 +946,12 @@ recvmsg(p, uap, retval)
/* ARGSUSED */
int
shutdown(p, uap, retval)
shutdown(p, uap)
struct proc *p;
register struct shutdown_args /* {
int s;
int how;
} */ *uap;
int *retval;
{
struct file *fp;
int error;
@ -989,7 +964,7 @@ shutdown(p, uap, retval)
/* ARGSUSED */
int
setsockopt(p, uap, retval)
setsockopt(p, uap)
struct proc *p;
register struct setsockopt_args /* {
int s;
@ -998,7 +973,6 @@ setsockopt(p, uap, retval)
caddr_t val;
int valsize;
} */ *uap;
int *retval;
{
struct file *fp;
struct mbuf *m = NULL;
@ -1026,7 +1000,7 @@ setsockopt(p, uap, retval)
/* ARGSUSED */
int
getsockopt(p, uap, retval)
getsockopt(p, uap)
struct proc *p;
register struct getsockopt_args /* {
int s;
@ -1035,7 +1009,6 @@ getsockopt(p, uap, retval)
caddr_t val;
int *avalsize;
} */ *uap;
int *retval;
{
struct file *fp;
struct mbuf *m = NULL, *m0;
@ -1077,14 +1050,13 @@ getsockopt(p, uap, retval)
*/
/* ARGSUSED */
static int
getsockname1(p, uap, retval, compat)
getsockname1(p, uap, compat)
struct proc *p;
register struct getsockname_args /* {
int fdes;
caddr_t asa;
int *alen;
} */ *uap;
int *retval;
int compat;
{
struct file *fp;
@ -1125,24 +1097,22 @@ getsockname1(p, uap, retval, compat)
}
int
getsockname(p, uap, retval)
getsockname(p, uap)
struct proc *p;
struct getsockname_args *uap;
int *retval;
{
return (getsockname1(p, uap, retval, 0));
return (getsockname1(p, uap, 0));
}
#ifdef COMPAT_OLDSOCK
int
ogetsockname(p, uap, retval)
ogetsockname(p, uap)
struct proc *p;
struct getsockname_args *uap;
int *retval;
{
return (getsockname1(p, uap, retval, 1));
return (getsockname1(p, uap, 1));
}
#endif /* COMPAT_OLDSOCK */
@ -1151,14 +1121,13 @@ ogetsockname(p, uap, retval)
*/
/* ARGSUSED */
static int
getpeername1(p, uap, retval, compat)
getpeername1(p, uap, compat)
struct proc *p;
register struct getpeername_args /* {
int fdes;
caddr_t asa;
int *alen;
} */ *uap;
int *retval;
int compat;
{
struct file *fp;
@ -1200,25 +1169,23 @@ getpeername1(p, uap, retval, compat)
}
int
getpeername(p, uap, retval)
getpeername(p, uap)
struct proc *p;
struct getpeername_args *uap;
int *retval;
{
return (getpeername1(p, uap, retval, 0));
return (getpeername1(p, uap, 0));
}
#ifdef COMPAT_OLDSOCK
int
ogetpeername(p, uap, retval)
ogetpeername(p, uap)
struct proc *p;
struct ogetpeername_args *uap;
int *retval;
{
/* XXX uap should have type `getpeername_args *' to begin with. */
return (getpeername1(p, (struct getpeername_args *)uap, retval, 1));
return (getpeername1(p, (struct getpeername_args *)uap, 1));
}
#endif /* COMPAT_OLDSOCK */

View File

@ -13,7 +13,7 @@
* bad that happens because of using this software isn't the responsibility
* of the author. This software is distributed AS-IS.
*
* $Id: vfs_aio.c,v 1.7 1997/10/11 18:31:25 phk Exp $
* $Id: vfs_aio.c,v 1.8 1997/10/12 20:24:19 phk Exp $
*/
/*
@ -579,16 +579,15 @@ aio_startproc(void *uproc)
static int
aio_newproc() {
int error;
int rval[2];
struct rfork_args rfa;
struct proc *p;
rfa.flags = RFMEM | RFPROC | RFCFDG;
if (error = rfork(curproc, &rfa, &rval[0]))
p = curproc;
if (error = rfork(p, &rfa))
return error;
cpu_set_fork_handler(p = pfind(rval[0]), aio_startproc, curproc);
cpu_set_fork_handler(p = pfind(p->p_retval[0]), aio_startproc, curproc);
#if DEBUGAIO > 0
if (debugaio > 2)
@ -827,7 +826,7 @@ aio_aqueue(struct proc *p, struct aiocb *job, int type) {
* Support the aio_return system call
*/
int
aio_return(struct proc *p, struct aio_return_args *uap, int *retval) {
aio_return(struct proc *p, struct aio_return_args *uap) {
int jobref, status;
struct aiocblist *cb;
struct kaioinfo *ki;
@ -852,7 +851,7 @@ aio_return(struct proc *p, struct aio_return_args *uap, int *retval) {
cb;
cb = TAILQ_NEXT(cb, plist)) {
if (((int) cb->uaiocb._aiocb_private.kernelinfo) == jobref) {
retval[0] = cb->uaiocb._aiocb_private.status;
p->p_retval[0] = cb->uaiocb._aiocb_private.status;
aio_free_entry(cb);
return 0;
}
@ -906,7 +905,7 @@ aio_marksuspend(struct proc *p, int njobs, int *joblist, int set) {
* completed.
*/
int
aio_suspend(struct proc *p, struct aio_suspend_args *uap, int *retval) {
aio_suspend(struct proc *p, struct aio_suspend_args *uap) {
struct timeval atv, utv;
struct timespec ts;
struct aiocb *const *cbptr, *cbp;
@ -1026,7 +1025,7 @@ aio_suspend(struct proc *p, struct aio_suspend_args *uap, int *retval) {
* in kernel mode later on.
*/
int
aio_cancel(struct proc *p, struct aio_cancel_args *uap, int *retval) {
aio_cancel(struct proc *p, struct aio_cancel_args *uap) {
return AIO_NOTCANCELLED;
}
@ -1036,7 +1035,7 @@ aio_cancel(struct proc *p, struct aio_cancel_args *uap, int *retval) {
* best to do it in a userland subroutine.
*/
int
aio_error(struct proc *p, struct aio_error_args *uap, int *retval) {
aio_error(struct proc *p, struct aio_error_args *uap) {
int activeflag, errorcode;
struct aiocblist *cb;
struct kaioinfo *ki;
@ -1056,7 +1055,7 @@ aio_error(struct proc *p, struct aio_error_args *uap, int *retval) {
cb = TAILQ_NEXT(cb, plist)) {
if (((int) cb->uaiocb._aiocb_private.kernelinfo) == jobref) {
retval[0] = cb->uaiocb._aiocb_private.error;
p->p_retval[0] = cb->uaiocb._aiocb_private.error;
return 0;
}
}
@ -1066,7 +1065,7 @@ aio_error(struct proc *p, struct aio_error_args *uap, int *retval) {
cb = TAILQ_NEXT(cb, plist)) {
if (((int) cb->uaiocb._aiocb_private.kernelinfo) == jobref) {
retval[0] = EINPROGRESS;
p->p_retval[0] = EINPROGRESS;
return 0;
}
}
@ -1082,7 +1081,7 @@ aio_error(struct proc *p, struct aio_error_args *uap, int *retval) {
}
int
aio_read(struct proc *p, struct aio_read_args *uap, int *retval) {
aio_read(struct proc *p, struct aio_read_args *uap) {
struct filedesc *fdp;
struct file *fp;
struct uio auio;
@ -1152,12 +1151,12 @@ aio_read(struct proc *p, struct aio_read_args *uap, int *retval) {
(error == ERESTART || error == EINTR || error == EWOULDBLOCK))
error = 0;
cnt -= auio.uio_resid;
*retval = cnt;
p->p_retval[0] = cnt;
return error;
}
int
aio_write(struct proc *p, struct aio_write_args *uap, int *retval) {
aio_write(struct proc *p, struct aio_write_args *uap) {
struct filedesc *fdp;
struct file *fp;
struct uio auio;
@ -1225,12 +1224,12 @@ aio_write(struct proc *p, struct aio_write_args *uap, int *retval) {
}
}
cnt -= auio.uio_resid;
*retval = cnt;
p->p_retval[0] = cnt;
return error;
}
int
lio_listio(struct proc *p, struct lio_listio_args *uap, int *retval) {
lio_listio(struct proc *p, struct lio_listio_args *uap) {
int cnt, nent, nentqueued;
struct aiocb *iocb, * const *cbptr;
struct aiocblist *cb;

View File

@ -18,7 +18,7 @@
* 5. Modifications may be freely made to this file if the above conditions
* are met.
*
* $Id: vfs_bio.c,v 1.131 1997/10/26 20:55:04 phk Exp $
* $Id: vfs_bio.c,v 1.132 1997/10/28 15:58:24 bde Exp $
*/
/*
@ -1898,7 +1898,7 @@ vfs_update()
tsleep(&vfs_update_wakeup, PUSER, "update",
hz * vfs_update_interval);
vfs_update_wakeup = 0;
sync(curproc, NULL, NULL);
sync(curproc, NULL);
}
}

View File

@ -36,7 +36,7 @@
* SUCH DAMAGE.
*
* @(#)vfs_syscalls.c 8.13 (Berkeley) 4/15/94
* $Id: vfs_syscalls.c,v 1.78 1997/10/23 09:29:09 kato Exp $
* $Id: vfs_syscalls.c,v 1.79 1997/10/28 10:29:55 bde Exp $
*/
/*
@ -98,7 +98,7 @@ struct mount_args {
#endif
/* ARGSUSED */
int
mount(p, uap, retval)
mount(p, uap)
struct proc *p;
register struct mount_args /* {
syscallarg(char *) type;
@ -106,7 +106,6 @@ mount(p, uap, retval)
syscallarg(int) flags;
syscallarg(caddr_t) data;
} */ *uap;
register_t *retval;
{
struct vnode *vp;
struct mount *mp;
@ -355,13 +354,12 @@ struct unmount_args {
#endif
/* ARGSUSED */
int
unmount(p, uap, retval)
unmount(p, uap)
struct proc *p;
register struct unmount_args /* {
syscallarg(char *) path;
syscallarg(int) flags;
} */ *uap;
register_t *retval;
{
register struct vnode *vp;
struct mount *mp;
@ -469,10 +467,9 @@ SYSCTL_INT(_debug, 0, syncprt, CTLFLAG_RW, &syncprt, 0, "");
/* ARGSUSED */
int
sync(p, uap, retval)
sync(p, uap)
struct proc *p;
struct sync_args *uap;
register_t *retval;
{
register struct mount *mp, *nmp;
int asyncflag;
@ -522,7 +519,7 @@ struct quotactl_args {
#endif
/* ARGSUSED */
int
quotactl(p, uap, retval)
quotactl(p, uap)
struct proc *p;
register struct quotactl_args /* {
syscallarg(char *) path;
@ -530,7 +527,6 @@ quotactl(p, uap, retval)
syscallarg(int) uid;
syscallarg(caddr_t) arg;
} */ *uap;
register_t *retval;
{
register struct mount *mp;
int error;
@ -556,13 +552,12 @@ struct statfs_args {
#endif
/* ARGSUSED */
int
statfs(p, uap, retval)
statfs(p, uap)
struct proc *p;
register struct statfs_args /* {
syscallarg(char *) path;
syscallarg(struct statfs *) buf;
} */ *uap;
register_t *retval;
{
register struct mount *mp;
register struct statfs *sp;
@ -599,13 +594,12 @@ struct fstatfs_args {
#endif
/* ARGSUSED */
int
fstatfs(p, uap, retval)
fstatfs(p, uap)
struct proc *p;
register struct fstatfs_args /* {
syscallarg(int) fd;
syscallarg(struct statfs *) buf;
} */ *uap;
register_t *retval;
{
struct file *fp;
struct mount *mp;
@ -640,14 +634,13 @@ struct getfsstat_args {
};
#endif
int
getfsstat(p, uap, retval)
getfsstat(p, uap)
struct proc *p;
register struct getfsstat_args /* {
syscallarg(struct statfs *) buf;
syscallarg(long) bufsize;
syscallarg(int) flags;
} */ *uap;
register_t *retval;
{
register struct mount *mp, *nmp;
register struct statfs *sp;
@ -692,9 +685,9 @@ getfsstat(p, uap, retval)
}
simple_unlock(&mountlist_slock);
if (sfsp && count > maxcount)
*retval = maxcount;
p->p_retval[0] = maxcount;
else
*retval = count;
p->p_retval[0] = count;
return (0);
}
@ -708,12 +701,11 @@ struct fchdir_args {
#endif
/* ARGSUSED */
int
fchdir(p, uap, retval)
fchdir(p, uap)
struct proc *p;
struct fchdir_args /* {
syscallarg(int) fd;
} */ *uap;
register_t *retval;
{
register struct filedesc *fdp = p->p_fd;
struct vnode *vp, *tdp;
@ -760,12 +752,11 @@ struct chdir_args {
#endif
/* ARGSUSED */
int
chdir(p, uap, retval)
chdir(p, uap)
struct proc *p;
struct chdir_args /* {
syscallarg(char *) path;
} */ *uap;
register_t *retval;
{
register struct filedesc *fdp = p->p_fd;
int error;
@ -790,12 +781,11 @@ struct chroot_args {
#endif
/* ARGSUSED */
int
chroot(p, uap, retval)
chroot(p, uap)
struct proc *p;
struct chroot_args /* {
syscallarg(char *) path;
} */ *uap;
register_t *retval;
{
register struct filedesc *fdp = p->p_fd;
int error;
@ -852,14 +842,13 @@ struct open_args {
};
#endif
int
open(p, uap, retval)
open(p, uap)
struct proc *p;
register struct open_args /* {
syscallarg(char *) path;
syscallarg(int) flags;
syscallarg(int) mode;
} */ *uap;
register_t *retval;
{
register struct filedesc *fdp = p->p_fd;
register struct file *fp;
@ -888,7 +877,7 @@ open(p, uap, retval)
p->p_dupfd >= 0 && /* XXX from fdopen */
(error =
dupfdopen(fdp, indx, p->p_dupfd, flags, error)) == 0) {
*retval = indx;
p->p_retval[0] = indx;
return (0);
}
if (error == ERESTART)
@ -925,7 +914,7 @@ open(p, uap, retval)
fp->f_flag |= FHASLOCK;
}
VOP_UNLOCK(vp, 0, p);
*retval = indx;
p->p_retval[0] = indx;
return (0);
}
@ -940,13 +929,12 @@ struct ocreat_args {
};
#endif
int
ocreat(p, uap, retval)
ocreat(p, uap)
struct proc *p;
register struct ocreat_args /* {
syscallarg(char *) path;
syscallarg(int) mode;
} */ *uap;
register_t *retval;
{
struct open_args /* {
syscallarg(char *) path;
@ -957,7 +945,7 @@ ocreat(p, uap, retval)
SCARG(&nuap, path) = SCARG(uap, path);
SCARG(&nuap, mode) = SCARG(uap, mode);
SCARG(&nuap, flags) = O_WRONLY | O_CREAT | O_TRUNC;
return (open(p, &nuap, retval));
return (open(p, &nuap));
}
#endif /* COMPAT_43 */
@ -973,14 +961,13 @@ struct mknod_args {
#endif
/* ARGSUSED */
int
mknod(p, uap, retval)
mknod(p, uap)
struct proc *p;
register struct mknod_args /* {
syscallarg(char *) path;
syscallarg(int) mode;
syscallarg(int) dev;
} */ *uap;
register_t *retval;
{
register struct vnode *vp;
struct vattr vattr;
@ -1057,13 +1044,12 @@ struct mkfifo_args {
#endif
/* ARGSUSED */
int
mkfifo(p, uap, retval)
mkfifo(p, uap)
struct proc *p;
register struct mkfifo_args /* {
syscallarg(char *) path;
syscallarg(int) mode;
} */ *uap;
register_t *retval;
{
struct vattr vattr;
int error;
@ -1099,13 +1085,12 @@ struct link_args {
#endif
/* ARGSUSED */
int
link(p, uap, retval)
link(p, uap)
struct proc *p;
register struct link_args /* {
syscallarg(char *) path;
syscallarg(char *) link;
} */ *uap;
register_t *retval;
{
register struct vnode *vp;
struct nameidata nd;
@ -1155,13 +1140,12 @@ struct symlink_args {
#endif
/* ARGSUSED */
int
symlink(p, uap, retval)
symlink(p, uap)
struct proc *p;
register struct symlink_args /* {
syscallarg(char *) path;
syscallarg(char *) link;
} */ *uap;
register_t *retval;
{
struct vattr vattr;
char *path;
@ -1200,12 +1184,11 @@ symlink(p, uap, retval)
*/
/* ARGSUSED */
int
undelete(p, uap, retval)
undelete(p, uap)
struct proc *p;
register struct undelete_args /* {
syscallarg(char *) path;
} */ *uap;
register_t *retval;
{
int error;
struct nameidata nd;
@ -1246,12 +1229,11 @@ struct unlink_args {
#endif
/* ARGSUSED */
int
unlink(p, uap, retval)
unlink(p, uap)
struct proc *p;
struct unlink_args /* {
syscallarg(char *) path;
} */ *uap;
register_t *retval;
{
register struct vnode *vp;
int error;
@ -1307,7 +1289,7 @@ struct lseek_args {
};
#endif
int
lseek(p, uap, retval)
lseek(p, uap)
struct proc *p;
register struct lseek_args /* {
syscallarg(int) fd;
@ -1315,7 +1297,6 @@ lseek(p, uap, retval)
syscallarg(off_t) offset;
syscallarg(int) whence;
} */ *uap;
register_t *retval; /* XXX */
{
struct ucred *cred = p->p_ucred;
register struct filedesc *fdp = p->p_fd;
@ -1344,7 +1325,7 @@ lseek(p, uap, retval)
default:
return (EINVAL);
}
*(off_t *)retval = fp->f_offset;
*(off_t *)(p->p_retval) = fp->f_offset;
return (0);
}
@ -1360,14 +1341,13 @@ struct olseek_args {
};
#endif
int
olseek(p, uap, retval)
olseek(p, uap)
struct proc *p;
register struct olseek_args /* {
syscallarg(int) fd;
syscallarg(long) offset;
syscallarg(int) whence;
} */ *uap;
register_t *retval;
{
struct lseek_args /* {
syscallarg(int) fd;
@ -1375,14 +1355,12 @@ olseek(p, uap, retval)
syscallarg(off_t) offset;
syscallarg(int) whence;
} */ nuap;
off_t qret;
int error;
SCARG(&nuap, fd) = SCARG(uap, fd);
SCARG(&nuap, offset) = SCARG(uap, offset);
SCARG(&nuap, whence) = SCARG(uap, whence);
error = lseek(p, &nuap, (register_t *) &qret);
*(long *)retval = qret;
error = lseek(p, &nuap);
return (error);
}
#endif /* COMPAT_43 */
@ -1397,13 +1375,12 @@ struct access_args {
};
#endif
int
access(p, uap, retval)
access(p, uap)
struct proc *p;
register struct access_args /* {
syscallarg(char *) path;
syscallarg(int) flags;
} */ *uap;
register_t *retval;
{
register struct ucred *cred = p->p_ucred;
register struct vnode *vp;
@ -1451,13 +1428,12 @@ struct ostat_args {
#endif
/* ARGSUSED */
int
ostat(p, uap, retval)
ostat(p, uap)
struct proc *p;
register struct ostat_args /* {
syscallarg(char *) path;
syscallarg(struct ostat *) ub;
} */ *uap;
register_t *retval;
{
struct stat sb;
struct ostat osb;
@ -1488,13 +1464,12 @@ struct olstat_args {
#endif
/* ARGSUSED */
int
olstat(p, uap, retval)
olstat(p, uap)
struct proc *p;
register struct olstat_args /* {
syscallarg(char *) path;
syscallarg(struct ostat *) ub;
} */ *uap;
register_t *retval;
{
struct vnode *vp;
struct stat sb;
@ -1559,13 +1534,12 @@ struct stat_args {
#endif
/* ARGSUSED */
int
stat(p, uap, retval)
stat(p, uap)
struct proc *p;
register struct stat_args /* {
syscallarg(char *) path;
syscallarg(struct stat *) ub;
} */ *uap;
register_t *retval;
{
struct stat sb;
int error;
@ -1594,13 +1568,12 @@ struct lstat_args {
#endif
/* ARGSUSED */
int
lstat(p, uap, retval)
lstat(p, uap)
struct proc *p;
register struct lstat_args /* {
syscallarg(char *) path;
syscallarg(struct stat *) ub;
} */ *uap;
register_t *retval;
{
int error;
struct vnode *vp;
@ -1633,13 +1606,12 @@ struct pathconf_args {
#endif
/* ARGSUSED */
int
pathconf(p, uap, retval)
pathconf(p, uap)
struct proc *p;
register struct pathconf_args /* {
syscallarg(char *) path;
syscallarg(int) name;
} */ *uap;
register_t *retval;
{
int error;
struct nameidata nd;
@ -1648,7 +1620,7 @@ pathconf(p, uap, retval)
SCARG(uap, path), p);
if (error = namei(&nd))
return (error);
error = VOP_PATHCONF(nd.ni_vp, SCARG(uap, name), retval);
error = VOP_PATHCONF(nd.ni_vp, SCARG(uap, name), p->p_retval);
vput(nd.ni_vp);
return (error);
}
@ -1665,14 +1637,13 @@ struct readlink_args {
#endif
/* ARGSUSED */
int
readlink(p, uap, retval)
readlink(p, uap)
struct proc *p;
register struct readlink_args /* {
syscallarg(char *) path;
syscallarg(char *) buf;
syscallarg(int) count;
} */ *uap;
register_t *retval;
{
register struct vnode *vp;
struct iovec aiov;
@ -1700,7 +1671,7 @@ readlink(p, uap, retval)
error = VOP_READLINK(vp, &auio, p->p_ucred);
}
vput(vp);
*retval = SCARG(uap, count) - auio.uio_resid;
p->p_retval[0] = SCARG(uap, count) - auio.uio_resid;
return (error);
}
@ -1715,13 +1686,12 @@ struct chflags_args {
#endif
/* ARGSUSED */
int
chflags(p, uap, retval)
chflags(p, uap)
struct proc *p;
register struct chflags_args /* {
syscallarg(char *) path;
syscallarg(int) flags;
} */ *uap;
register_t *retval;
{
register struct vnode *vp;
struct vattr vattr;
@ -1752,13 +1722,12 @@ struct fchflags_args {
#endif
/* ARGSUSED */
int
fchflags(p, uap, retval)
fchflags(p, uap)
struct proc *p;
register struct fchflags_args /* {
syscallarg(int) fd;
syscallarg(int) flags;
} */ *uap;
register_t *retval;
{
struct vattr vattr;
struct vnode *vp;
@ -1788,13 +1757,12 @@ struct chmod_args {
#endif
/* ARGSUSED */
int
chmod(p, uap, retval)
chmod(p, uap)
struct proc *p;
register struct chmod_args /* {
syscallarg(char *) path;
syscallarg(int) mode;
} */ *uap;
register_t *retval;
{
register struct vnode *vp;
struct vattr vattr;
@ -1825,13 +1793,12 @@ struct fchmod_args {
#endif
/* ARGSUSED */
int
fchmod(p, uap, retval)
fchmod(p, uap)
struct proc *p;
register struct fchmod_args /* {
syscallarg(int) fd;
syscallarg(int) mode;
} */ *uap;
register_t *retval;
{
struct vattr vattr;
struct vnode *vp;
@ -1862,14 +1829,13 @@ struct chown_args {
#endif
/* ARGSUSED */
int
chown(p, uap, retval)
chown(p, uap)
struct proc *p;
register struct chown_args /* {
syscallarg(char *) path;
syscallarg(int) uid;
syscallarg(int) gid;
} */ *uap;
register_t *retval;
{
register struct vnode *vp;
struct vattr vattr;
@ -1902,14 +1868,13 @@ struct lchown_args {
#endif
/* ARGSUSED */
int
lchown(p, uap, retval)
lchown(p, uap)
struct proc *p;
register struct lchown_args /* {
syscallarg(char *) path;
syscallarg(int) uid;
syscallarg(int) gid;
} */ *uap;
register_t *retval;
{
register struct vnode *vp;
struct vattr vattr;
@ -1942,14 +1907,13 @@ struct fchown_args {
#endif
/* ARGSUSED */
int
fchown(p, uap, retval)
fchown(p, uap)
struct proc *p;
register struct fchown_args /* {
syscallarg(int) fd;
syscallarg(int) uid;
syscallarg(int) gid;
} */ *uap;
register_t *retval;
{
struct vattr vattr;
struct vnode *vp;
@ -1980,13 +1944,12 @@ struct utimes_args {
#endif
/* ARGSUSED */
int
utimes(p, uap, retval)
utimes(p, uap)
struct proc *p;
register struct utimes_args /* {
syscallarg(char *) path;
syscallarg(struct timeval *) tptr;
} */ *uap;
register_t *retval;
{
register struct vnode *vp;
struct timeval tv[2];
@ -2029,14 +1992,13 @@ struct truncate_args {
#endif
/* ARGSUSED */
int
truncate(p, uap, retval)
truncate(p, uap)
struct proc *p;
register struct truncate_args /* {
syscallarg(char *) path;
syscallarg(int) pad;
syscallarg(off_t) length;
} */ *uap;
register_t *retval;
{
register struct vnode *vp;
struct vattr vattr;
@ -2075,14 +2037,13 @@ struct ftruncate_args {
#endif
/* ARGSUSED */
int
ftruncate(p, uap, retval)
ftruncate(p, uap)
struct proc *p;
register struct ftruncate_args /* {
syscallarg(int) fd;
syscallarg(int) pad;
syscallarg(off_t) length;
} */ *uap;
register_t *retval;
{
struct vattr vattr;
struct vnode *vp;
@ -2121,13 +2082,12 @@ struct otruncate_args {
#endif
/* ARGSUSED */
int
otruncate(p, uap, retval)
otruncate(p, uap)
struct proc *p;
register struct otruncate_args /* {
syscallarg(char *) path;
syscallarg(long) length;
} */ *uap;
register_t *retval;
{
struct truncate_args /* {
syscallarg(char *) path;
@ -2137,7 +2097,7 @@ otruncate(p, uap, retval)
SCARG(&nuap, path) = SCARG(uap, path);
SCARG(&nuap, length) = SCARG(uap, length);
return (truncate(p, &nuap, retval));
return (truncate(p, &nuap));
}
/*
@ -2151,13 +2111,12 @@ struct oftruncate_args {
#endif
/* ARGSUSED */
int
oftruncate(p, uap, retval)
oftruncate(p, uap)
struct proc *p;
register struct oftruncate_args /* {
syscallarg(int) fd;
syscallarg(long) length;
} */ *uap;
register_t *retval;
{
struct ftruncate_args /* {
syscallarg(int) fd;
@ -2167,7 +2126,7 @@ oftruncate(p, uap, retval)
SCARG(&nuap, fd) = SCARG(uap, fd);
SCARG(&nuap, length) = SCARG(uap, length);
return (ftruncate(p, &nuap, retval));
return (ftruncate(p, &nuap));
}
#endif /* COMPAT_43 || COMPAT_SUNOS */
@ -2181,12 +2140,11 @@ struct fsync_args {
#endif
/* ARGSUSED */
int
fsync(p, uap, retval)
fsync(p, uap)
struct proc *p;
struct fsync_args /* {
syscallarg(int) fd;
} */ *uap;
register_t *retval;
{
register struct vnode *vp;
struct file *fp;
@ -2218,13 +2176,12 @@ struct rename_args {
#endif
/* ARGSUSED */
int
rename(p, uap, retval)
rename(p, uap)
struct proc *p;
register struct rename_args /* {
syscallarg(char *) from;
syscallarg(char *) to;
} */ *uap;
register_t *retval;
{
register struct vnode *tvp, *fvp, *tdvp;
struct nameidata fromnd, tond;
@ -2320,13 +2277,12 @@ struct mkdir_args {
#endif
/* ARGSUSED */
int
mkdir(p, uap, retval)
mkdir(p, uap)
struct proc *p;
register struct mkdir_args /* {
syscallarg(char *) path;
syscallarg(int) mode;
} */ *uap;
register_t *retval;
{
register struct vnode *vp;
struct vattr vattr;
@ -2369,12 +2325,11 @@ struct rmdir_args {
#endif
/* ARGSUSED */
int
rmdir(p, uap, retval)
rmdir(p, uap)
struct proc *p;
struct rmdir_args /* {
syscallarg(char *) path;
} */ *uap;
register_t *retval;
{
register struct vnode *vp;
int error;
@ -2432,7 +2387,7 @@ struct ogetdirentries_args {
};
#endif
int
ogetdirentries(p, uap, retval)
ogetdirentries(p, uap)
struct proc *p;
register struct ogetdirentries_args /* {
syscallarg(int) fd;
@ -2440,7 +2395,6 @@ ogetdirentries(p, uap, retval)
syscallarg(u_int) count;
syscallarg(long *) basep;
} */ *uap;
register_t *retval;
{
register struct vnode *vp;
struct file *fp;
@ -2577,7 +2531,7 @@ ogetdirentries(p, uap, retval)
}
error = copyout((caddr_t)&loff, (caddr_t)SCARG(uap, basep),
sizeof(long));
*retval = SCARG(uap, count) - auio.uio_resid;
p->p_retval[0] = SCARG(uap, count) - auio.uio_resid;
return (error);
}
#endif /* COMPAT_43 */
@ -2594,7 +2548,7 @@ struct getdirentries_args {
};
#endif
int
getdirentries(p, uap, retval)
getdirentries(p, uap)
struct proc *p;
register struct getdirentries_args /* {
syscallarg(int) fd;
@ -2602,7 +2556,6 @@ getdirentries(p, uap, retval)
syscallarg(u_int) count;
syscallarg(long *) basep;
} */ *uap;
register_t *retval;
{
register struct vnode *vp;
struct file *fp;
@ -2689,7 +2642,7 @@ getdirentries(p, uap, retval)
}
error = copyout((caddr_t)&loff, (caddr_t)SCARG(uap, basep),
sizeof(long));
*retval = SCARG(uap, count) - auio.uio_resid;
p->p_retval[0] = SCARG(uap, count) - auio.uio_resid;
return (error);
}
@ -2702,17 +2655,16 @@ struct umask_args {
};
#endif
int
umask(p, uap, retval)
umask(p, uap)
struct proc *p;
struct umask_args /* {
syscallarg(int) newmask;
} */ *uap;
int *retval; /* XXX */
{
register struct filedesc *fdp;
fdp = p->p_fd;
*retval = fdp->fd_cmask;
p->p_retval[0] = fdp->fd_cmask;
fdp->fd_cmask = SCARG(uap, newmask) & ALLPERMS;
return (0);
}
@ -2728,12 +2680,11 @@ struct revoke_args {
#endif
/* ARGSUSED */
int
revoke(p, uap, retval)
revoke(p, uap)
struct proc *p;
register struct revoke_args /* {
syscallarg(char *) path;
} */ *uap;
register_t *retval;
{
register struct vnode *vp;
struct vattr vattr;
@ -2794,10 +2745,9 @@ static u_long numcwdfail3; STATNODE(CTLFLAG_RD, numcwdfail3, &numcwdfail3);
static u_long numcwdfail4; STATNODE(CTLFLAG_RD, numcwdfail4, &numcwdfail4);
static u_long numcwdfound; STATNODE(CTLFLAG_RD, numcwdfound, &numcwdfound);
int
__getcwd(p, uap, retval)
__getcwd(p, uap)
struct proc *p;
struct __getcwd_args *uap;
register_t *retval;
{
struct filedesc *fdp;
struct vnode *vp;

View File

@ -36,7 +36,7 @@
* SUCH DAMAGE.
*
* @(#)vfs_syscalls.c 8.13 (Berkeley) 4/15/94
* $Id: vfs_syscalls.c,v 1.78 1997/10/23 09:29:09 kato Exp $
* $Id: vfs_syscalls.c,v 1.79 1997/10/28 10:29:55 bde Exp $
*/
/*
@ -98,7 +98,7 @@ struct mount_args {
#endif
/* ARGSUSED */
int
mount(p, uap, retval)
mount(p, uap)
struct proc *p;
register struct mount_args /* {
syscallarg(char *) type;
@ -106,7 +106,6 @@ mount(p, uap, retval)
syscallarg(int) flags;
syscallarg(caddr_t) data;
} */ *uap;
register_t *retval;
{
struct vnode *vp;
struct mount *mp;
@ -355,13 +354,12 @@ struct unmount_args {
#endif
/* ARGSUSED */
int
unmount(p, uap, retval)
unmount(p, uap)
struct proc *p;
register struct unmount_args /* {
syscallarg(char *) path;
syscallarg(int) flags;
} */ *uap;
register_t *retval;
{
register struct vnode *vp;
struct mount *mp;
@ -469,10 +467,9 @@ SYSCTL_INT(_debug, 0, syncprt, CTLFLAG_RW, &syncprt, 0, "");
/* ARGSUSED */
int
sync(p, uap, retval)
sync(p, uap)
struct proc *p;
struct sync_args *uap;
register_t *retval;
{
register struct mount *mp, *nmp;
int asyncflag;
@ -522,7 +519,7 @@ struct quotactl_args {
#endif
/* ARGSUSED */
int
quotactl(p, uap, retval)
quotactl(p, uap)
struct proc *p;
register struct quotactl_args /* {
syscallarg(char *) path;
@ -530,7 +527,6 @@ quotactl(p, uap, retval)
syscallarg(int) uid;
syscallarg(caddr_t) arg;
} */ *uap;
register_t *retval;
{
register struct mount *mp;
int error;
@ -556,13 +552,12 @@ struct statfs_args {
#endif
/* ARGSUSED */
int
statfs(p, uap, retval)
statfs(p, uap)
struct proc *p;
register struct statfs_args /* {
syscallarg(char *) path;
syscallarg(struct statfs *) buf;
} */ *uap;
register_t *retval;
{
register struct mount *mp;
register struct statfs *sp;
@ -599,13 +594,12 @@ struct fstatfs_args {
#endif
/* ARGSUSED */
int
fstatfs(p, uap, retval)
fstatfs(p, uap)
struct proc *p;
register struct fstatfs_args /* {
syscallarg(int) fd;
syscallarg(struct statfs *) buf;
} */ *uap;
register_t *retval;
{
struct file *fp;
struct mount *mp;
@ -640,14 +634,13 @@ struct getfsstat_args {
};
#endif
int
getfsstat(p, uap, retval)
getfsstat(p, uap)
struct proc *p;
register struct getfsstat_args /* {
syscallarg(struct statfs *) buf;
syscallarg(long) bufsize;
syscallarg(int) flags;
} */ *uap;
register_t *retval;
{
register struct mount *mp, *nmp;
register struct statfs *sp;
@ -692,9 +685,9 @@ getfsstat(p, uap, retval)
}
simple_unlock(&mountlist_slock);
if (sfsp && count > maxcount)
*retval = maxcount;
p->p_retval[0] = maxcount;
else
*retval = count;
p->p_retval[0] = count;
return (0);
}
@ -708,12 +701,11 @@ struct fchdir_args {
#endif
/* ARGSUSED */
int
fchdir(p, uap, retval)
fchdir(p, uap)
struct proc *p;
struct fchdir_args /* {
syscallarg(int) fd;
} */ *uap;
register_t *retval;
{
register struct filedesc *fdp = p->p_fd;
struct vnode *vp, *tdp;
@ -760,12 +752,11 @@ struct chdir_args {
#endif
/* ARGSUSED */
int
chdir(p, uap, retval)
chdir(p, uap)
struct proc *p;
struct chdir_args /* {
syscallarg(char *) path;
} */ *uap;
register_t *retval;
{
register struct filedesc *fdp = p->p_fd;
int error;
@ -790,12 +781,11 @@ struct chroot_args {
#endif
/* ARGSUSED */
int
chroot(p, uap, retval)
chroot(p, uap)
struct proc *p;
struct chroot_args /* {
syscallarg(char *) path;
} */ *uap;
register_t *retval;
{
register struct filedesc *fdp = p->p_fd;
int error;
@ -852,14 +842,13 @@ struct open_args {
};
#endif
int
open(p, uap, retval)
open(p, uap)
struct proc *p;
register struct open_args /* {
syscallarg(char *) path;
syscallarg(int) flags;
syscallarg(int) mode;
} */ *uap;
register_t *retval;
{
register struct filedesc *fdp = p->p_fd;
register struct file *fp;
@ -888,7 +877,7 @@ open(p, uap, retval)
p->p_dupfd >= 0 && /* XXX from fdopen */
(error =
dupfdopen(fdp, indx, p->p_dupfd, flags, error)) == 0) {
*retval = indx;
p->p_retval[0] = indx;
return (0);
}
if (error == ERESTART)
@ -925,7 +914,7 @@ open(p, uap, retval)
fp->f_flag |= FHASLOCK;
}
VOP_UNLOCK(vp, 0, p);
*retval = indx;
p->p_retval[0] = indx;
return (0);
}
@ -940,13 +929,12 @@ struct ocreat_args {
};
#endif
int
ocreat(p, uap, retval)
ocreat(p, uap)
struct proc *p;
register struct ocreat_args /* {
syscallarg(char *) path;
syscallarg(int) mode;
} */ *uap;
register_t *retval;
{
struct open_args /* {
syscallarg(char *) path;
@ -957,7 +945,7 @@ ocreat(p, uap, retval)
SCARG(&nuap, path) = SCARG(uap, path);
SCARG(&nuap, mode) = SCARG(uap, mode);
SCARG(&nuap, flags) = O_WRONLY | O_CREAT | O_TRUNC;
return (open(p, &nuap, retval));
return (open(p, &nuap));
}
#endif /* COMPAT_43 */
@ -973,14 +961,13 @@ struct mknod_args {
#endif
/* ARGSUSED */
int
mknod(p, uap, retval)
mknod(p, uap)
struct proc *p;
register struct mknod_args /* {
syscallarg(char *) path;
syscallarg(int) mode;
syscallarg(int) dev;
} */ *uap;
register_t *retval;
{
register struct vnode *vp;
struct vattr vattr;
@ -1057,13 +1044,12 @@ struct mkfifo_args {
#endif
/* ARGSUSED */
int
mkfifo(p, uap, retval)
mkfifo(p, uap)
struct proc *p;
register struct mkfifo_args /* {
syscallarg(char *) path;
syscallarg(int) mode;
} */ *uap;
register_t *retval;
{
struct vattr vattr;
int error;
@ -1099,13 +1085,12 @@ struct link_args {
#endif
/* ARGSUSED */
int
link(p, uap, retval)
link(p, uap)
struct proc *p;
register struct link_args /* {
syscallarg(char *) path;
syscallarg(char *) link;
} */ *uap;
register_t *retval;
{
register struct vnode *vp;
struct nameidata nd;
@ -1155,13 +1140,12 @@ struct symlink_args {
#endif
/* ARGSUSED */
int
symlink(p, uap, retval)
symlink(p, uap)
struct proc *p;
register struct symlink_args /* {
syscallarg(char *) path;
syscallarg(char *) link;
} */ *uap;
register_t *retval;
{
struct vattr vattr;
char *path;
@ -1200,12 +1184,11 @@ symlink(p, uap, retval)
*/
/* ARGSUSED */
int
undelete(p, uap, retval)
undelete(p, uap)
struct proc *p;
register struct undelete_args /* {
syscallarg(char *) path;
} */ *uap;
register_t *retval;
{
int error;
struct nameidata nd;
@ -1246,12 +1229,11 @@ struct unlink_args {
#endif
/* ARGSUSED */
int
unlink(p, uap, retval)
unlink(p, uap)
struct proc *p;
struct unlink_args /* {
syscallarg(char *) path;
} */ *uap;
register_t *retval;
{
register struct vnode *vp;
int error;
@ -1307,7 +1289,7 @@ struct lseek_args {
};
#endif
int
lseek(p, uap, retval)
lseek(p, uap)
struct proc *p;
register struct lseek_args /* {
syscallarg(int) fd;
@ -1315,7 +1297,6 @@ lseek(p, uap, retval)
syscallarg(off_t) offset;
syscallarg(int) whence;
} */ *uap;
register_t *retval; /* XXX */
{
struct ucred *cred = p->p_ucred;
register struct filedesc *fdp = p->p_fd;
@ -1344,7 +1325,7 @@ lseek(p, uap, retval)
default:
return (EINVAL);
}
*(off_t *)retval = fp->f_offset;
*(off_t *)(p->p_retval) = fp->f_offset;
return (0);
}
@ -1360,14 +1341,13 @@ struct olseek_args {
};
#endif
int
olseek(p, uap, retval)
olseek(p, uap)
struct proc *p;
register struct olseek_args /* {
syscallarg(int) fd;
syscallarg(long) offset;
syscallarg(int) whence;
} */ *uap;
register_t *retval;
{
struct lseek_args /* {
syscallarg(int) fd;
@ -1375,14 +1355,12 @@ olseek(p, uap, retval)
syscallarg(off_t) offset;
syscallarg(int) whence;
} */ nuap;
off_t qret;
int error;
SCARG(&nuap, fd) = SCARG(uap, fd);
SCARG(&nuap, offset) = SCARG(uap, offset);
SCARG(&nuap, whence) = SCARG(uap, whence);
error = lseek(p, &nuap, (register_t *) &qret);
*(long *)retval = qret;
error = lseek(p, &nuap);
return (error);
}
#endif /* COMPAT_43 */
@ -1397,13 +1375,12 @@ struct access_args {
};
#endif
int
access(p, uap, retval)
access(p, uap)
struct proc *p;
register struct access_args /* {
syscallarg(char *) path;
syscallarg(int) flags;
} */ *uap;
register_t *retval;
{
register struct ucred *cred = p->p_ucred;
register struct vnode *vp;
@ -1451,13 +1428,12 @@ struct ostat_args {
#endif
/* ARGSUSED */
int
ostat(p, uap, retval)
ostat(p, uap)
struct proc *p;
register struct ostat_args /* {
syscallarg(char *) path;
syscallarg(struct ostat *) ub;
} */ *uap;
register_t *retval;
{
struct stat sb;
struct ostat osb;
@ -1488,13 +1464,12 @@ struct olstat_args {
#endif
/* ARGSUSED */
int
olstat(p, uap, retval)
olstat(p, uap)
struct proc *p;
register struct olstat_args /* {
syscallarg(char *) path;
syscallarg(struct ostat *) ub;
} */ *uap;
register_t *retval;
{
struct vnode *vp;
struct stat sb;
@ -1559,13 +1534,12 @@ struct stat_args {
#endif
/* ARGSUSED */
int
stat(p, uap, retval)
stat(p, uap)
struct proc *p;
register struct stat_args /* {
syscallarg(char *) path;
syscallarg(struct stat *) ub;
} */ *uap;
register_t *retval;
{
struct stat sb;
int error;
@ -1594,13 +1568,12 @@ struct lstat_args {
#endif
/* ARGSUSED */
int
lstat(p, uap, retval)
lstat(p, uap)
struct proc *p;
register struct lstat_args /* {
syscallarg(char *) path;
syscallarg(struct stat *) ub;
} */ *uap;
register_t *retval;
{
int error;
struct vnode *vp;
@ -1633,13 +1606,12 @@ struct pathconf_args {
#endif
/* ARGSUSED */
int
pathconf(p, uap, retval)
pathconf(p, uap)
struct proc *p;
register struct pathconf_args /* {
syscallarg(char *) path;
syscallarg(int) name;
} */ *uap;
register_t *retval;
{
int error;
struct nameidata nd;
@ -1648,7 +1620,7 @@ pathconf(p, uap, retval)
SCARG(uap, path), p);
if (error = namei(&nd))
return (error);
error = VOP_PATHCONF(nd.ni_vp, SCARG(uap, name), retval);
error = VOP_PATHCONF(nd.ni_vp, SCARG(uap, name), p->p_retval);
vput(nd.ni_vp);
return (error);
}
@ -1665,14 +1637,13 @@ struct readlink_args {
#endif
/* ARGSUSED */
int
readlink(p, uap, retval)
readlink(p, uap)
struct proc *p;
register struct readlink_args /* {
syscallarg(char *) path;
syscallarg(char *) buf;
syscallarg(int) count;
} */ *uap;
register_t *retval;
{
register struct vnode *vp;
struct iovec aiov;
@ -1700,7 +1671,7 @@ readlink(p, uap, retval)
error = VOP_READLINK(vp, &auio, p->p_ucred);
}
vput(vp);
*retval = SCARG(uap, count) - auio.uio_resid;
p->p_retval[0] = SCARG(uap, count) - auio.uio_resid;
return (error);
}
@ -1715,13 +1686,12 @@ struct chflags_args {
#endif
/* ARGSUSED */
int
chflags(p, uap, retval)
chflags(p, uap)
struct proc *p;
register struct chflags_args /* {
syscallarg(char *) path;
syscallarg(int) flags;
} */ *uap;
register_t *retval;
{
register struct vnode *vp;
struct vattr vattr;
@ -1752,13 +1722,12 @@ struct fchflags_args {
#endif
/* ARGSUSED */
int
fchflags(p, uap, retval)
fchflags(p, uap)
struct proc *p;
register struct fchflags_args /* {
syscallarg(int) fd;
syscallarg(int) flags;
} */ *uap;
register_t *retval;
{
struct vattr vattr;
struct vnode *vp;
@ -1788,13 +1757,12 @@ struct chmod_args {
#endif
/* ARGSUSED */
int
chmod(p, uap, retval)
chmod(p, uap)
struct proc *p;
register struct chmod_args /* {
syscallarg(char *) path;
syscallarg(int) mode;
} */ *uap;
register_t *retval;
{
register struct vnode *vp;
struct vattr vattr;
@ -1825,13 +1793,12 @@ struct fchmod_args {
#endif
/* ARGSUSED */
int
fchmod(p, uap, retval)
fchmod(p, uap)
struct proc *p;
register struct fchmod_args /* {
syscallarg(int) fd;
syscallarg(int) mode;
} */ *uap;
register_t *retval;
{
struct vattr vattr;
struct vnode *vp;
@ -1862,14 +1829,13 @@ struct chown_args {
#endif
/* ARGSUSED */
int
chown(p, uap, retval)
chown(p, uap)
struct proc *p;
register struct chown_args /* {
syscallarg(char *) path;
syscallarg(int) uid;
syscallarg(int) gid;
} */ *uap;
register_t *retval;
{
register struct vnode *vp;
struct vattr vattr;
@ -1902,14 +1868,13 @@ struct lchown_args {
#endif
/* ARGSUSED */
int
lchown(p, uap, retval)
lchown(p, uap)
struct proc *p;
register struct lchown_args /* {
syscallarg(char *) path;
syscallarg(int) uid;
syscallarg(int) gid;
} */ *uap;
register_t *retval;
{
register struct vnode *vp;
struct vattr vattr;
@ -1942,14 +1907,13 @@ struct fchown_args {
#endif
/* ARGSUSED */
int
fchown(p, uap, retval)
fchown(p, uap)
struct proc *p;
register struct fchown_args /* {
syscallarg(int) fd;
syscallarg(int) uid;
syscallarg(int) gid;
} */ *uap;
register_t *retval;
{
struct vattr vattr;
struct vnode *vp;
@ -1980,13 +1944,12 @@ struct utimes_args {
#endif
/* ARGSUSED */
int
utimes(p, uap, retval)
utimes(p, uap)
struct proc *p;
register struct utimes_args /* {
syscallarg(char *) path;
syscallarg(struct timeval *) tptr;
} */ *uap;
register_t *retval;
{
register struct vnode *vp;
struct timeval tv[2];
@ -2029,14 +1992,13 @@ struct truncate_args {
#endif
/* ARGSUSED */
int
truncate(p, uap, retval)
truncate(p, uap)
struct proc *p;
register struct truncate_args /* {
syscallarg(char *) path;
syscallarg(int) pad;
syscallarg(off_t) length;
} */ *uap;
register_t *retval;
{
register struct vnode *vp;
struct vattr vattr;
@ -2075,14 +2037,13 @@ struct ftruncate_args {
#endif
/* ARGSUSED */
int
ftruncate(p, uap, retval)
ftruncate(p, uap)
struct proc *p;
register struct ftruncate_args /* {
syscallarg(int) fd;
syscallarg(int) pad;
syscallarg(off_t) length;
} */ *uap;
register_t *retval;
{
struct vattr vattr;
struct vnode *vp;
@ -2121,13 +2082,12 @@ struct otruncate_args {
#endif
/* ARGSUSED */
int
otruncate(p, uap, retval)
otruncate(p, uap)
struct proc *p;
register struct otruncate_args /* {
syscallarg(char *) path;
syscallarg(long) length;
} */ *uap;
register_t *retval;
{
struct truncate_args /* {
syscallarg(char *) path;
@ -2137,7 +2097,7 @@ otruncate(p, uap, retval)
SCARG(&nuap, path) = SCARG(uap, path);
SCARG(&nuap, length) = SCARG(uap, length);
return (truncate(p, &nuap, retval));
return (truncate(p, &nuap));
}
/*
@ -2151,13 +2111,12 @@ struct oftruncate_args {
#endif
/* ARGSUSED */
int
oftruncate(p, uap, retval)
oftruncate(p, uap)
struct proc *p;
register struct oftruncate_args /* {
syscallarg(int) fd;
syscallarg(long) length;
} */ *uap;
register_t *retval;
{
struct ftruncate_args /* {
syscallarg(int) fd;
@ -2167,7 +2126,7 @@ oftruncate(p, uap, retval)
SCARG(&nuap, fd) = SCARG(uap, fd);
SCARG(&nuap, length) = SCARG(uap, length);
return (ftruncate(p, &nuap, retval));
return (ftruncate(p, &nuap));
}
#endif /* COMPAT_43 || COMPAT_SUNOS */
@ -2181,12 +2140,11 @@ struct fsync_args {
#endif
/* ARGSUSED */
int
fsync(p, uap, retval)
fsync(p, uap)
struct proc *p;
struct fsync_args /* {
syscallarg(int) fd;
} */ *uap;
register_t *retval;
{
register struct vnode *vp;
struct file *fp;
@ -2218,13 +2176,12 @@ struct rename_args {
#endif
/* ARGSUSED */
int
rename(p, uap, retval)
rename(p, uap)
struct proc *p;
register struct rename_args /* {
syscallarg(char *) from;
syscallarg(char *) to;
} */ *uap;
register_t *retval;
{
register struct vnode *tvp, *fvp, *tdvp;
struct nameidata fromnd, tond;
@ -2320,13 +2277,12 @@ struct mkdir_args {
#endif
/* ARGSUSED */
int
mkdir(p, uap, retval)
mkdir(p, uap)
struct proc *p;
register struct mkdir_args /* {
syscallarg(char *) path;
syscallarg(int) mode;
} */ *uap;
register_t *retval;
{
register struct vnode *vp;
struct vattr vattr;
@ -2369,12 +2325,11 @@ struct rmdir_args {
#endif
/* ARGSUSED */
int
rmdir(p, uap, retval)
rmdir(p, uap)
struct proc *p;
struct rmdir_args /* {
syscallarg(char *) path;
} */ *uap;
register_t *retval;
{
register struct vnode *vp;
int error;
@ -2432,7 +2387,7 @@ struct ogetdirentries_args {
};
#endif
int
ogetdirentries(p, uap, retval)
ogetdirentries(p, uap)
struct proc *p;
register struct ogetdirentries_args /* {
syscallarg(int) fd;
@ -2440,7 +2395,6 @@ ogetdirentries(p, uap, retval)
syscallarg(u_int) count;
syscallarg(long *) basep;
} */ *uap;
register_t *retval;
{
register struct vnode *vp;
struct file *fp;
@ -2577,7 +2531,7 @@ ogetdirentries(p, uap, retval)
}
error = copyout((caddr_t)&loff, (caddr_t)SCARG(uap, basep),
sizeof(long));
*retval = SCARG(uap, count) - auio.uio_resid;
p->p_retval[0] = SCARG(uap, count) - auio.uio_resid;
return (error);
}
#endif /* COMPAT_43 */
@ -2594,7 +2548,7 @@ struct getdirentries_args {
};
#endif
int
getdirentries(p, uap, retval)
getdirentries(p, uap)
struct proc *p;
register struct getdirentries_args /* {
syscallarg(int) fd;
@ -2602,7 +2556,6 @@ getdirentries(p, uap, retval)
syscallarg(u_int) count;
syscallarg(long *) basep;
} */ *uap;
register_t *retval;
{
register struct vnode *vp;
struct file *fp;
@ -2689,7 +2642,7 @@ getdirentries(p, uap, retval)
}
error = copyout((caddr_t)&loff, (caddr_t)SCARG(uap, basep),
sizeof(long));
*retval = SCARG(uap, count) - auio.uio_resid;
p->p_retval[0] = SCARG(uap, count) - auio.uio_resid;
return (error);
}
@ -2702,17 +2655,16 @@ struct umask_args {
};
#endif
int
umask(p, uap, retval)
umask(p, uap)
struct proc *p;
struct umask_args /* {
syscallarg(int) newmask;
} */ *uap;
int *retval; /* XXX */
{
register struct filedesc *fdp;
fdp = p->p_fd;
*retval = fdp->fd_cmask;
p->p_retval[0] = fdp->fd_cmask;
fdp->fd_cmask = SCARG(uap, newmask) & ALLPERMS;
return (0);
}
@ -2728,12 +2680,11 @@ struct revoke_args {
#endif
/* ARGSUSED */
int
revoke(p, uap, retval)
revoke(p, uap)
struct proc *p;
register struct revoke_args /* {
syscallarg(char *) path;
} */ *uap;
register_t *retval;
{
register struct vnode *vp;
struct vattr vattr;
@ -2794,10 +2745,9 @@ static u_long numcwdfail3; STATNODE(CTLFLAG_RD, numcwdfail3, &numcwdfail3);
static u_long numcwdfail4; STATNODE(CTLFLAG_RD, numcwdfail4, &numcwdfail4);
static u_long numcwdfound; STATNODE(CTLFLAG_RD, numcwdfound, &numcwdfound);
int
__getcwd(p, uap, retval)
__getcwd(p, uap)
struct proc *p;
struct __getcwd_args *uap;
register_t *retval;
{
struct filedesc *fdp;
struct vnode *vp;

View File

@ -35,7 +35,7 @@
*
* @(#)portal_vnops.c 8.14 (Berkeley) 5/21/95
*
* $Id: portal_vnops.c,v 1.27 1997/10/26 20:55:20 phk Exp $
* $Id: portal_vnops.c,v 1.28 1997/10/27 13:33:41 bde Exp $
*/
/*
@ -84,10 +84,9 @@ portal_closefd(p, fd)
{
int error;
struct close_args ua;
int rc;
ua.fd = fd;
error = close(p, &ua, &rc);
error = close(p, &ua);
/*
* We should never get an error, and there isn't anything
* we could do if we got one, so just print a message.

View File

@ -34,7 +34,7 @@
* SUCH DAMAGE.
*
* @(#)nfs_syscalls.c 8.5 (Berkeley) 3/30/95
* $Id: nfs_syscalls.c,v 1.29 1997/10/12 20:25:47 phk Exp $
* $Id: nfs_syscalls.c,v 1.30 1997/10/28 15:59:11 bde Exp $
*/
#include <sys/param.h>
@ -129,10 +129,9 @@ struct getfh_args {
};
#endif
int
getfh(p, uap, retval)
getfh(p, uap)
struct proc *p;
register struct getfh_args *uap;
int *retval;
{
register struct vnode *vp;
fhandle_t fh;
@ -175,10 +174,9 @@ struct nfssvc_args {
};
#endif
int
nfssvc(p, uap, retval)
nfssvc(p, uap)
struct proc *p;
register struct nfssvc_args *uap;
int *retval;
{
#ifndef NFS_NOSERVER
struct nameidata nd;

View File

@ -34,7 +34,7 @@
* SUCH DAMAGE.
*
* @(#)nfs_syscalls.c 8.5 (Berkeley) 3/30/95
* $Id: nfs_syscalls.c,v 1.29 1997/10/12 20:25:47 phk Exp $
* $Id: nfs_syscalls.c,v 1.30 1997/10/28 15:59:11 bde Exp $
*/
#include <sys/param.h>
@ -129,10 +129,9 @@ struct getfh_args {
};
#endif
int
getfh(p, uap, retval)
getfh(p, uap)
struct proc *p;
register struct getfh_args *uap;
int *retval;
{
register struct vnode *vp;
fhandle_t fh;
@ -175,10 +174,9 @@ struct nfssvc_args {
};
#endif
int
nfssvc(p, uap, retval)
nfssvc(p, uap)
struct proc *p;
register struct nfssvc_args *uap;
int *retval;
{
#ifndef NFS_NOSERVER
struct nameidata nd;

View File

@ -34,7 +34,7 @@
* SUCH DAMAGE.
*
* @(#)nfs_syscalls.c 8.5 (Berkeley) 3/30/95
* $Id: nfs_syscalls.c,v 1.29 1997/10/12 20:25:47 phk Exp $
* $Id: nfs_syscalls.c,v 1.30 1997/10/28 15:59:11 bde Exp $
*/
#include <sys/param.h>
@ -129,10 +129,9 @@ struct getfh_args {
};
#endif
int
getfh(p, uap, retval)
getfh(p, uap)
struct proc *p;
register struct getfh_args *uap;
int *retval;
{
register struct vnode *vp;
fhandle_t fh;
@ -175,10 +174,9 @@ struct nfssvc_args {
};
#endif
int
nfssvc(p, uap, retval)
nfssvc(p, uap)
struct proc *p;
register struct nfssvc_args *uap;
int *retval;
{
#ifndef NFS_NOSERVER
struct nameidata nd;

View File

@ -36,7 +36,7 @@
* SUCH DAMAGE.
*
* @(#)proc.h 8.15 (Berkeley) 5/19/95
* $Id: proc.h,v 1.44 1997/09/21 22:09:18 gibbs Exp $
* $Id: proc.h,v 1.45 1997/10/12 20:26:03 phk Exp $
*/
#ifndef _SYS_PROC_H_
@ -151,6 +151,7 @@ struct proc {
short p_locks; /* DEBUG: lockmgr count of held locks */
short p_simple_locks; /* DEBUG: count of held simple locks */
register_t p_retval[2]; /* syscall aux returns */
/* End area that is zeroed on creation. */
#define p_endzero p_startcopy

View File

@ -30,13 +30,13 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
* $Id$
* $Id: sysent.h,v 1.14 1997/02/22 09:46:03 peter Exp $
*/
#ifndef _SYS_SYSENT_H_
#define _SYS_SYSENT_H_
typedef int sy_call_t __P((struct proc *, void *, int *));
typedef int sy_call_t __P((struct proc *, void *));
struct sysent { /* system call table */
int sy_narg; /* number of arguments */

View File

@ -842,204 +842,204 @@ struct __getcwd_args {
u_char * buf;
u_int buflen;
};
int nosys __P((struct proc *, struct nosys_args *, int []));
void exit __P((struct proc *, struct rexit_args *, int [])) __dead2;
int fork __P((struct proc *, struct fork_args *, int []));
int read __P((struct proc *, struct read_args *, int []));
int write __P((struct proc *, struct write_args *, int []));
int open __P((struct proc *, struct open_args *, int []));
int close __P((struct proc *, struct close_args *, int []));
int wait4 __P((struct proc *, struct wait_args *, int []));
int link __P((struct proc *, struct link_args *, int []));
int unlink __P((struct proc *, struct unlink_args *, int []));
int chdir __P((struct proc *, struct chdir_args *, int []));
int fchdir __P((struct proc *, struct fchdir_args *, int []));
int mknod __P((struct proc *, struct mknod_args *, int []));
int chmod __P((struct proc *, struct chmod_args *, int []));
int chown __P((struct proc *, struct chown_args *, int []));
int obreak __P((struct proc *, struct obreak_args *, int []));
int getfsstat __P((struct proc *, struct getfsstat_args *, int []));
int getpid __P((struct proc *, struct getpid_args *, int []));
int mount __P((struct proc *, struct mount_args *, int []));
int unmount __P((struct proc *, struct unmount_args *, int []));
int setuid __P((struct proc *, struct setuid_args *, int []));
int getuid __P((struct proc *, struct getuid_args *, int []));
int geteuid __P((struct proc *, struct geteuid_args *, int []));
int ptrace __P((struct proc *, struct ptrace_args *, int []));
int recvmsg __P((struct proc *, struct recvmsg_args *, int []));
int sendmsg __P((struct proc *, struct sendmsg_args *, int []));
int recvfrom __P((struct proc *, struct recvfrom_args *, int []));
int accept __P((struct proc *, struct accept_args *, int []));
int getpeername __P((struct proc *, struct getpeername_args *, int []));
int getsockname __P((struct proc *, struct getsockname_args *, int []));
int access __P((struct proc *, struct access_args *, int []));
int chflags __P((struct proc *, struct chflags_args *, int []));
int fchflags __P((struct proc *, struct fchflags_args *, int []));
int sync __P((struct proc *, struct sync_args *, int []));
int kill __P((struct proc *, struct kill_args *, int []));
int getppid __P((struct proc *, struct getppid_args *, int []));
int dup __P((struct proc *, struct dup_args *, int []));
int pipe __P((struct proc *, struct pipe_args *, int []));
int getegid __P((struct proc *, struct getegid_args *, int []));
int profil __P((struct proc *, struct profil_args *, int []));
int ktrace __P((struct proc *, struct ktrace_args *, int []));
int sigaction __P((struct proc *, struct sigaction_args *, int []));
int getgid __P((struct proc *, struct getgid_args *, int []));
int sigprocmask __P((struct proc *, struct sigprocmask_args *, int []));
int getlogin __P((struct proc *, struct getlogin_args *, int []));
int setlogin __P((struct proc *, struct setlogin_args *, int []));
int acct __P((struct proc *, struct acct_args *, int []));
int sigpending __P((struct proc *, struct sigpending_args *, int []));
int sigaltstack __P((struct proc *, struct sigaltstack_args *, int []));
int ioctl __P((struct proc *, struct ioctl_args *, int []));
int reboot __P((struct proc *, struct reboot_args *, int []));
int revoke __P((struct proc *, struct revoke_args *, int []));
int symlink __P((struct proc *, struct symlink_args *, int []));
int readlink __P((struct proc *, struct readlink_args *, int []));
int execve __P((struct proc *, struct execve_args *, int []));
int umask __P((struct proc *, struct umask_args *, int []));
int chroot __P((struct proc *, struct chroot_args *, int []));
int msync __P((struct proc *, struct msync_args *, int []));
int vfork __P((struct proc *, struct vfork_args *, int []));
int sbrk __P((struct proc *, struct sbrk_args *, int []));
int sstk __P((struct proc *, struct sstk_args *, int []));
int ovadvise __P((struct proc *, struct ovadvise_args *, int []));
int munmap __P((struct proc *, struct munmap_args *, int []));
int mprotect __P((struct proc *, struct mprotect_args *, int []));
int madvise __P((struct proc *, struct madvise_args *, int []));
int mincore __P((struct proc *, struct mincore_args *, int []));
int getgroups __P((struct proc *, struct getgroups_args *, int []));
int setgroups __P((struct proc *, struct setgroups_args *, int []));
int getpgrp __P((struct proc *, struct getpgrp_args *, int []));
int setpgid __P((struct proc *, struct setpgid_args *, int []));
int setitimer __P((struct proc *, struct setitimer_args *, int []));
int swapon __P((struct proc *, struct swapon_args *, int []));
int getitimer __P((struct proc *, struct getitimer_args *, int []));
int getdtablesize __P((struct proc *, struct getdtablesize_args *, int []));
int dup2 __P((struct proc *, struct dup2_args *, int []));
int fcntl __P((struct proc *, struct fcntl_args *, int []));
int select __P((struct proc *, struct select_args *, int []));
int fsync __P((struct proc *, struct fsync_args *, int []));
int setpriority __P((struct proc *, struct setpriority_args *, int []));
int socket __P((struct proc *, struct socket_args *, int []));
int connect __P((struct proc *, struct connect_args *, int []));
int getpriority __P((struct proc *, struct getpriority_args *, int []));
int sigreturn __P((struct proc *, struct sigreturn_args *, int []));
int bind __P((struct proc *, struct bind_args *, int []));
int setsockopt __P((struct proc *, struct setsockopt_args *, int []));
int listen __P((struct proc *, struct listen_args *, int []));
int sigsuspend __P((struct proc *, struct sigsuspend_args *, int []));
int gettimeofday __P((struct proc *, struct gettimeofday_args *, int []));
int getrusage __P((struct proc *, struct getrusage_args *, int []));
int getsockopt __P((struct proc *, struct getsockopt_args *, int []));
int readv __P((struct proc *, struct readv_args *, int []));
int writev __P((struct proc *, struct writev_args *, int []));
int settimeofday __P((struct proc *, struct settimeofday_args *, int []));
int fchown __P((struct proc *, struct fchown_args *, int []));
int fchmod __P((struct proc *, struct fchmod_args *, int []));
int setreuid __P((struct proc *, struct setreuid_args *, int []));
int setregid __P((struct proc *, struct setregid_args *, int []));
int rename __P((struct proc *, struct rename_args *, int []));
int flock __P((struct proc *, struct flock_args *, int []));
int mkfifo __P((struct proc *, struct mkfifo_args *, int []));
int sendto __P((struct proc *, struct sendto_args *, int []));
int shutdown __P((struct proc *, struct shutdown_args *, int []));
int socketpair __P((struct proc *, struct socketpair_args *, int []));
int mkdir __P((struct proc *, struct mkdir_args *, int []));
int rmdir __P((struct proc *, struct rmdir_args *, int []));
int utimes __P((struct proc *, struct utimes_args *, int []));
int adjtime __P((struct proc *, struct adjtime_args *, int []));
int setsid __P((struct proc *, struct setsid_args *, int []));
int quotactl __P((struct proc *, struct quotactl_args *, int []));
int nfssvc __P((struct proc *, struct nfssvc_args *, int []));
int statfs __P((struct proc *, struct statfs_args *, int []));
int fstatfs __P((struct proc *, struct fstatfs_args *, int []));
int getfh __P((struct proc *, struct getfh_args *, int []));
int getdomainname __P((struct proc *, struct getdomainname_args *, int []));
int setdomainname __P((struct proc *, struct setdomainname_args *, int []));
int uname __P((struct proc *, struct uname_args *, int []));
int sysarch __P((struct proc *, struct sysarch_args *, int []));
int rtprio __P((struct proc *, struct rtprio_args *, int []));
int semsys __P((struct proc *, struct semsys_args *, int []));
int msgsys __P((struct proc *, struct msgsys_args *, int []));
int shmsys __P((struct proc *, struct shmsys_args *, int []));
int ntp_adjtime __P((struct proc *, struct ntp_adjtime_args *, int []));
int setgid __P((struct proc *, struct setgid_args *, int []));
int setegid __P((struct proc *, struct setegid_args *, int []));
int seteuid __P((struct proc *, struct seteuid_args *, int []));
int nosys __P((struct proc *, struct nosys_args *));
void exit __P((struct proc *, struct rexit_args *)) __dead2;
int fork __P((struct proc *, struct fork_args *));
int read __P((struct proc *, struct read_args *));
int write __P((struct proc *, struct write_args *));
int open __P((struct proc *, struct open_args *));
int close __P((struct proc *, struct close_args *));
int wait4 __P((struct proc *, struct wait_args *));
int link __P((struct proc *, struct link_args *));
int unlink __P((struct proc *, struct unlink_args *));
int chdir __P((struct proc *, struct chdir_args *));
int fchdir __P((struct proc *, struct fchdir_args *));
int mknod __P((struct proc *, struct mknod_args *));
int chmod __P((struct proc *, struct chmod_args *));
int chown __P((struct proc *, struct chown_args *));
int obreak __P((struct proc *, struct obreak_args *));
int getfsstat __P((struct proc *, struct getfsstat_args *));
int getpid __P((struct proc *, struct getpid_args *));
int mount __P((struct proc *, struct mount_args *));
int unmount __P((struct proc *, struct unmount_args *));
int setuid __P((struct proc *, struct setuid_args *));
int getuid __P((struct proc *, struct getuid_args *));
int geteuid __P((struct proc *, struct geteuid_args *));
int ptrace __P((struct proc *, struct ptrace_args *));
int recvmsg __P((struct proc *, struct recvmsg_args *));
int sendmsg __P((struct proc *, struct sendmsg_args *));
int recvfrom __P((struct proc *, struct recvfrom_args *));
int accept __P((struct proc *, struct accept_args *));
int getpeername __P((struct proc *, struct getpeername_args *));
int getsockname __P((struct proc *, struct getsockname_args *));
int access __P((struct proc *, struct access_args *));
int chflags __P((struct proc *, struct chflags_args *));
int fchflags __P((struct proc *, struct fchflags_args *));
int sync __P((struct proc *, struct sync_args *));
int kill __P((struct proc *, struct kill_args *));
int getppid __P((struct proc *, struct getppid_args *));
int dup __P((struct proc *, struct dup_args *));
int pipe __P((struct proc *, struct pipe_args *));
int getegid __P((struct proc *, struct getegid_args *));
int profil __P((struct proc *, struct profil_args *));
int ktrace __P((struct proc *, struct ktrace_args *));
int sigaction __P((struct proc *, struct sigaction_args *));
int getgid __P((struct proc *, struct getgid_args *));
int sigprocmask __P((struct proc *, struct sigprocmask_args *));
int getlogin __P((struct proc *, struct getlogin_args *));
int setlogin __P((struct proc *, struct setlogin_args *));
int acct __P((struct proc *, struct acct_args *));
int sigpending __P((struct proc *, struct sigpending_args *));
int sigaltstack __P((struct proc *, struct sigaltstack_args *));
int ioctl __P((struct proc *, struct ioctl_args *));
int reboot __P((struct proc *, struct reboot_args *));
int revoke __P((struct proc *, struct revoke_args *));
int symlink __P((struct proc *, struct symlink_args *));
int readlink __P((struct proc *, struct readlink_args *));
int execve __P((struct proc *, struct execve_args *));
int umask __P((struct proc *, struct umask_args *));
int chroot __P((struct proc *, struct chroot_args *));
int msync __P((struct proc *, struct msync_args *));
int vfork __P((struct proc *, struct vfork_args *));
int sbrk __P((struct proc *, struct sbrk_args *));
int sstk __P((struct proc *, struct sstk_args *));
int ovadvise __P((struct proc *, struct ovadvise_args *));
int munmap __P((struct proc *, struct munmap_args *));
int mprotect __P((struct proc *, struct mprotect_args *));
int madvise __P((struct proc *, struct madvise_args *));
int mincore __P((struct proc *, struct mincore_args *));
int getgroups __P((struct proc *, struct getgroups_args *));
int setgroups __P((struct proc *, struct setgroups_args *));
int getpgrp __P((struct proc *, struct getpgrp_args *));
int setpgid __P((struct proc *, struct setpgid_args *));
int setitimer __P((struct proc *, struct setitimer_args *));
int swapon __P((struct proc *, struct swapon_args *));
int getitimer __P((struct proc *, struct getitimer_args *));
int getdtablesize __P((struct proc *, struct getdtablesize_args *));
int dup2 __P((struct proc *, struct dup2_args *));
int fcntl __P((struct proc *, struct fcntl_args *));
int select __P((struct proc *, struct select_args *));
int fsync __P((struct proc *, struct fsync_args *));
int setpriority __P((struct proc *, struct setpriority_args *));
int socket __P((struct proc *, struct socket_args *));
int connect __P((struct proc *, struct connect_args *));
int getpriority __P((struct proc *, struct getpriority_args *));
int sigreturn __P((struct proc *, struct sigreturn_args *));
int bind __P((struct proc *, struct bind_args *));
int setsockopt __P((struct proc *, struct setsockopt_args *));
int listen __P((struct proc *, struct listen_args *));
int sigsuspend __P((struct proc *, struct sigsuspend_args *));
int gettimeofday __P((struct proc *, struct gettimeofday_args *));
int getrusage __P((struct proc *, struct getrusage_args *));
int getsockopt __P((struct proc *, struct getsockopt_args *));
int readv __P((struct proc *, struct readv_args *));
int writev __P((struct proc *, struct writev_args *));
int settimeofday __P((struct proc *, struct settimeofday_args *));
int fchown __P((struct proc *, struct fchown_args *));
int fchmod __P((struct proc *, struct fchmod_args *));
int setreuid __P((struct proc *, struct setreuid_args *));
int setregid __P((struct proc *, struct setregid_args *));
int rename __P((struct proc *, struct rename_args *));
int flock __P((struct proc *, struct flock_args *));
int mkfifo __P((struct proc *, struct mkfifo_args *));
int sendto __P((struct proc *, struct sendto_args *));
int shutdown __P((struct proc *, struct shutdown_args *));
int socketpair __P((struct proc *, struct socketpair_args *));
int mkdir __P((struct proc *, struct mkdir_args *));
int rmdir __P((struct proc *, struct rmdir_args *));
int utimes __P((struct proc *, struct utimes_args *));
int adjtime __P((struct proc *, struct adjtime_args *));
int setsid __P((struct proc *, struct setsid_args *));
int quotactl __P((struct proc *, struct quotactl_args *));
int nfssvc __P((struct proc *, struct nfssvc_args *));
int statfs __P((struct proc *, struct statfs_args *));
int fstatfs __P((struct proc *, struct fstatfs_args *));
int getfh __P((struct proc *, struct getfh_args *));
int getdomainname __P((struct proc *, struct getdomainname_args *));
int setdomainname __P((struct proc *, struct setdomainname_args *));
int uname __P((struct proc *, struct uname_args *));
int sysarch __P((struct proc *, struct sysarch_args *));
int rtprio __P((struct proc *, struct rtprio_args *));
int semsys __P((struct proc *, struct semsys_args *));
int msgsys __P((struct proc *, struct msgsys_args *));
int shmsys __P((struct proc *, struct shmsys_args *));
int ntp_adjtime __P((struct proc *, struct ntp_adjtime_args *));
int setgid __P((struct proc *, struct setgid_args *));
int setegid __P((struct proc *, struct setegid_args *));
int seteuid __P((struct proc *, struct seteuid_args *));
#ifdef LFS
int lfs_bmapv __P((struct proc *, struct lfs_bmapv_args *, int []));
int lfs_markv __P((struct proc *, struct lfs_markv_args *, int []));
int lfs_segclean __P((struct proc *, struct lfs_segclean_args *, int []));
int lfs_segwait __P((struct proc *, struct lfs_segwait_args *, int []));
int lfs_bmapv __P((struct proc *, struct lfs_bmapv_args *));
int lfs_markv __P((struct proc *, struct lfs_markv_args *));
int lfs_segclean __P((struct proc *, struct lfs_segclean_args *));
int lfs_segwait __P((struct proc *, struct lfs_segwait_args *));
#else
#endif
int stat __P((struct proc *, struct stat_args *, int []));
int fstat __P((struct proc *, struct fstat_args *, int []));
int lstat __P((struct proc *, struct lstat_args *, int []));
int pathconf __P((struct proc *, struct pathconf_args *, int []));
int fpathconf __P((struct proc *, struct fpathconf_args *, int []));
int getrlimit __P((struct proc *, struct __getrlimit_args *, int []));
int setrlimit __P((struct proc *, struct __setrlimit_args *, int []));
int getdirentries __P((struct proc *, struct getdirentries_args *, int []));
int mmap __P((struct proc *, struct mmap_args *, int []));
int lseek __P((struct proc *, struct lseek_args *, int []));
int truncate __P((struct proc *, struct truncate_args *, int []));
int ftruncate __P((struct proc *, struct ftruncate_args *, int []));
int __sysctl __P((struct proc *, struct sysctl_args *, int []));
int mlock __P((struct proc *, struct mlock_args *, int []));
int munlock __P((struct proc *, struct munlock_args *, int []));
int utrace __P((struct proc *, struct utrace_args *, int []));
int undelete __P((struct proc *, struct undelete_args *, int []));
int getpgid __P((struct proc *, struct getpgid_args *, int []));
int poll __P((struct proc *, struct poll_args *, int []));
int lkmnosys __P((struct proc *, struct nosys_args *, int []));
int __semctl __P((struct proc *, struct __semctl_args *, int []));
int semget __P((struct proc *, struct semget_args *, int []));
int semop __P((struct proc *, struct semop_args *, int []));
int semconfig __P((struct proc *, struct semconfig_args *, int []));
int msgctl __P((struct proc *, struct msgctl_args *, int []));
int msgget __P((struct proc *, struct msgget_args *, int []));
int msgsnd __P((struct proc *, struct msgsnd_args *, int []));
int msgrcv __P((struct proc *, struct msgrcv_args *, int []));
int shmat __P((struct proc *, struct shmat_args *, int []));
int shmctl __P((struct proc *, struct shmctl_args *, int []));
int shmdt __P((struct proc *, struct shmdt_args *, int []));
int shmget __P((struct proc *, struct shmget_args *, int []));
int clock_gettime __P((struct proc *, struct clock_gettime_args *, int []));
int clock_settime __P((struct proc *, struct clock_settime_args *, int []));
int clock_getres __P((struct proc *, struct clock_getres_args *, int []));
int nanosleep __P((struct proc *, struct nanosleep_args *, int []));
int minherit __P((struct proc *, struct minherit_args *, int []));
int rfork __P((struct proc *, struct rfork_args *, int []));
int openbsd_poll __P((struct proc *, struct openbsd_poll_args *, int []));
int issetugid __P((struct proc *, struct issetugid_args *, int []));
int lchown __P((struct proc *, struct lchown_args *, int []));
int modnext __P((struct proc *, struct modnext_args *, int []));
int modstat __P((struct proc *, struct modstat_args *, int []));
int modfnext __P((struct proc *, struct modfnext_args *, int []));
int modfind __P((struct proc *, struct modfind_args *, int []));
int kldload __P((struct proc *, struct kldload_args *, int []));
int kldunload __P((struct proc *, struct kldunload_args *, int []));
int kldfind __P((struct proc *, struct kldfind_args *, int []));
int kldnext __P((struct proc *, struct kldnext_args *, int []));
int kldstat __P((struct proc *, struct kldstat_args *, int []));
int kldfirstmod __P((struct proc *, struct kldfirstmod_args *, int []));
int getsid __P((struct proc *, struct getsid_args *, int []));
int signanosleep __P((struct proc *, struct signanosleep_args *, int []));
int aio_return __P((struct proc *, struct aio_return_args *, int []));
int aio_suspend __P((struct proc *, struct aio_suspend_args *, int []));
int aio_cancel __P((struct proc *, struct aio_cancel_args *, int []));
int aio_error __P((struct proc *, struct aio_error_args *, int []));
int aio_read __P((struct proc *, struct aio_read_args *, int []));
int aio_write __P((struct proc *, struct aio_write_args *, int []));
int lio_listio __P((struct proc *, struct lio_listio_args *, int []));
int yield __P((struct proc *, struct yield_args *, int []));
int thr_sleep __P((struct proc *, struct thr_sleep_args *, int []));
int thr_wakeup __P((struct proc *, struct thr_wakeup_args *, int []));
int mlockall __P((struct proc *, struct mlockall_args *, int []));
int munlockall __P((struct proc *, struct munlockall_args *, int []));
int __getcwd __P((struct proc *, struct __getcwd_args *, int []));
int stat __P((struct proc *, struct stat_args *));
int fstat __P((struct proc *, struct fstat_args *));
int lstat __P((struct proc *, struct lstat_args *));
int pathconf __P((struct proc *, struct pathconf_args *));
int fpathconf __P((struct proc *, struct fpathconf_args *));
int getrlimit __P((struct proc *, struct __getrlimit_args *));
int setrlimit __P((struct proc *, struct __setrlimit_args *));
int getdirentries __P((struct proc *, struct getdirentries_args *));
int mmap __P((struct proc *, struct mmap_args *));
int lseek __P((struct proc *, struct lseek_args *));
int truncate __P((struct proc *, struct truncate_args *));
int ftruncate __P((struct proc *, struct ftruncate_args *));
int __sysctl __P((struct proc *, struct sysctl_args *));
int mlock __P((struct proc *, struct mlock_args *));
int munlock __P((struct proc *, struct munlock_args *));
int utrace __P((struct proc *, struct utrace_args *));
int undelete __P((struct proc *, struct undelete_args *));
int getpgid __P((struct proc *, struct getpgid_args *));
int poll __P((struct proc *, struct poll_args *));
int lkmnosys __P((struct proc *, struct nosys_args *));
int __semctl __P((struct proc *, struct __semctl_args *));
int semget __P((struct proc *, struct semget_args *));
int semop __P((struct proc *, struct semop_args *));
int semconfig __P((struct proc *, struct semconfig_args *));
int msgctl __P((struct proc *, struct msgctl_args *));
int msgget __P((struct proc *, struct msgget_args *));
int msgsnd __P((struct proc *, struct msgsnd_args *));
int msgrcv __P((struct proc *, struct msgrcv_args *));
int shmat __P((struct proc *, struct shmat_args *));
int shmctl __P((struct proc *, struct shmctl_args *));
int shmdt __P((struct proc *, struct shmdt_args *));
int shmget __P((struct proc *, struct shmget_args *));
int clock_gettime __P((struct proc *, struct clock_gettime_args *));
int clock_settime __P((struct proc *, struct clock_settime_args *));
int clock_getres __P((struct proc *, struct clock_getres_args *));
int nanosleep __P((struct proc *, struct nanosleep_args *));
int minherit __P((struct proc *, struct minherit_args *));
int rfork __P((struct proc *, struct rfork_args *));
int openbsd_poll __P((struct proc *, struct openbsd_poll_args *));
int issetugid __P((struct proc *, struct issetugid_args *));
int lchown __P((struct proc *, struct lchown_args *));
int modnext __P((struct proc *, struct modnext_args *));
int modstat __P((struct proc *, struct modstat_args *));
int modfnext __P((struct proc *, struct modfnext_args *));
int modfind __P((struct proc *, struct modfind_args *));
int kldload __P((struct proc *, struct kldload_args *));
int kldunload __P((struct proc *, struct kldunload_args *));
int kldfind __P((struct proc *, struct kldfind_args *));
int kldnext __P((struct proc *, struct kldnext_args *));
int kldstat __P((struct proc *, struct kldstat_args *));
int kldfirstmod __P((struct proc *, struct kldfirstmod_args *));
int getsid __P((struct proc *, struct getsid_args *));
int signanosleep __P((struct proc *, struct signanosleep_args *));
int aio_return __P((struct proc *, struct aio_return_args *));
int aio_suspend __P((struct proc *, struct aio_suspend_args *));
int aio_cancel __P((struct proc *, struct aio_cancel_args *));
int aio_error __P((struct proc *, struct aio_error_args *));
int aio_read __P((struct proc *, struct aio_read_args *));
int aio_write __P((struct proc *, struct aio_write_args *));
int lio_listio __P((struct proc *, struct lio_listio_args *));
int yield __P((struct proc *, struct yield_args *));
int thr_sleep __P((struct proc *, struct thr_sleep_args *));
int thr_wakeup __P((struct proc *, struct thr_wakeup_args *));
int mlockall __P((struct proc *, struct mlockall_args *));
int munlockall __P((struct proc *, struct munlockall_args *));
int __getcwd __P((struct proc *, struct __getcwd_args *));
#ifdef COMPAT_43
@ -1160,38 +1160,38 @@ struct ogetdirentries_args {
#ifdef LFS
#else
#endif
int ocreat __P((struct proc *, struct ocreat_args *, int []));
int olseek __P((struct proc *, struct olseek_args *, int []));
int ostat __P((struct proc *, struct ostat_args *, int []));
int olstat __P((struct proc *, struct olstat_args *, int []));
int ofstat __P((struct proc *, struct ofstat_args *, int []));
int ogetkerninfo __P((struct proc *, struct getkerninfo_args *, int []));
int ogetpagesize __P((struct proc *, struct getpagesize_args *, int []));
int ommap __P((struct proc *, struct ommap_args *, int []));
int owait __P((struct proc *, struct owait_args *, int []));
int ogethostname __P((struct proc *, struct gethostname_args *, int []));
int osethostname __P((struct proc *, struct sethostname_args *, int []));
int oaccept __P((struct proc *, struct accept_args *, int []));
int osend __P((struct proc *, struct osend_args *, int []));
int orecv __P((struct proc *, struct orecv_args *, int []));
int osigvec __P((struct proc *, struct osigvec_args *, int []));
int osigblock __P((struct proc *, struct osigblock_args *, int []));
int osigsetmask __P((struct proc *, struct osigsetmask_args *, int []));
int osigstack __P((struct proc *, struct osigstack_args *, int []));
int orecvmsg __P((struct proc *, struct orecvmsg_args *, int []));
int osendmsg __P((struct proc *, struct osendmsg_args *, int []));
int orecvfrom __P((struct proc *, struct recvfrom_args *, int []));
int otruncate __P((struct proc *, struct otruncate_args *, int []));
int oftruncate __P((struct proc *, struct oftruncate_args *, int []));
int ogetpeername __P((struct proc *, struct ogetpeername_args *, int []));
int ogethostid __P((struct proc *, struct ogethostid_args *, int []));
int osethostid __P((struct proc *, struct osethostid_args *, int []));
int ogetrlimit __P((struct proc *, struct ogetrlimit_args *, int []));
int osetrlimit __P((struct proc *, struct osetrlimit_args *, int []));
int okillpg __P((struct proc *, struct okillpg_args *, int []));
int oquota __P((struct proc *, struct oquota_args *, int []));
int ogetsockname __P((struct proc *, struct getsockname_args *, int []));
int ogetdirentries __P((struct proc *, struct ogetdirentries_args *, int []));
int ocreat __P((struct proc *, struct ocreat_args *));
int olseek __P((struct proc *, struct olseek_args *));
int ostat __P((struct proc *, struct ostat_args *));
int olstat __P((struct proc *, struct olstat_args *));
int ofstat __P((struct proc *, struct ofstat_args *));
int ogetkerninfo __P((struct proc *, struct getkerninfo_args *));
int ogetpagesize __P((struct proc *, struct getpagesize_args *));
int ommap __P((struct proc *, struct ommap_args *));
int owait __P((struct proc *, struct owait_args *));
int ogethostname __P((struct proc *, struct gethostname_args *));
int osethostname __P((struct proc *, struct sethostname_args *));
int oaccept __P((struct proc *, struct accept_args *));
int osend __P((struct proc *, struct osend_args *));
int orecv __P((struct proc *, struct orecv_args *));
int osigvec __P((struct proc *, struct osigvec_args *));
int osigblock __P((struct proc *, struct osigblock_args *));
int osigsetmask __P((struct proc *, struct osigsetmask_args *));
int osigstack __P((struct proc *, struct osigstack_args *));
int orecvmsg __P((struct proc *, struct orecvmsg_args *));
int osendmsg __P((struct proc *, struct osendmsg_args *));
int orecvfrom __P((struct proc *, struct recvfrom_args *));
int otruncate __P((struct proc *, struct otruncate_args *));
int oftruncate __P((struct proc *, struct oftruncate_args *));
int ogetpeername __P((struct proc *, struct ogetpeername_args *));
int ogethostid __P((struct proc *, struct ogethostid_args *));
int osethostid __P((struct proc *, struct osethostid_args *));
int ogetrlimit __P((struct proc *, struct ogetrlimit_args *));
int osetrlimit __P((struct proc *, struct osetrlimit_args *));
int okillpg __P((struct proc *, struct okillpg_args *));
int oquota __P((struct proc *, struct oquota_args *));
int ogetsockname __P((struct proc *, struct getsockname_args *));
int ogetdirentries __P((struct proc *, struct ogetdirentries_args *));
#endif /* COMPAT_43 */

View File

@ -31,7 +31,7 @@
* SUCH DAMAGE.
*
* @(#)lfs_syscalls.c 8.10 (Berkeley) 5/14/95
* $Id: lfs_syscalls.c,v 1.18 1997/03/22 08:03:51 bde Exp $
* $Id: lfs_syscalls.c,v 1.19 1997/03/23 00:45:20 bde Exp $
*/
#include <sys/param.h>
@ -94,10 +94,9 @@ struct lfs_markv_args {
};
#endif
int
lfs_markv(p, uap, retval)
lfs_markv(p, uap)
struct proc *p;
struct lfs_markv_args *uap;
int *retval;
{
struct segment *sp;
BLOCK_INFO *blkp;
@ -273,10 +272,9 @@ struct lfs_bmapv_args {
};
#endif
int
lfs_bmapv(p, uap, retval)
lfs_bmapv(p, uap)
struct proc *p;
struct lfs_bmapv_args *uap;
int *retval;
{
BLOCK_INFO *blkp;
struct mount *mntp;
@ -343,10 +341,9 @@ struct lfs_segclean_args {
};
#endif
int
lfs_segclean(p, uap, retval)
lfs_segclean(p, uap)
struct proc *p;
struct lfs_segclean_args *uap;
int *retval;
{
CLEANERINFO *cip;
SEGUSE *sup;
@ -406,10 +403,9 @@ struct lfs_segwait_args {
};
#endif
int
lfs_segwait(p, uap, retval)
lfs_segwait(p, uap)
struct proc *p;
struct lfs_segwait_args *uap;
int *retval;
{
struct mount *mntp;
struct timeval atv;

View File

@ -38,7 +38,7 @@
* from: Utah $Hdr: vm_mmap.c 1.6 91/10/21$
*
* @(#)vm_mmap.c 8.4 (Berkeley) 1/12/94
* $Id: vm_mmap.c,v 1.67 1997/08/30 18:50:06 peter Exp $
* $Id: vm_mmap.c,v 1.68 1997/09/01 03:17:20 bde Exp $
*/
/*
@ -82,10 +82,9 @@ struct sbrk_args {
/* ARGSUSED */
int
sbrk(p, uap, retval)
sbrk(p, uap)
struct proc *p;
struct sbrk_args *uap;
int *retval;
{
/* Not yet implemented */
@ -100,10 +99,9 @@ struct sstk_args {
/* ARGSUSED */
int
sstk(p, uap, retval)
sstk(p, uap)
struct proc *p;
struct sstk_args *uap;
int *retval;
{
/* Not yet implemented */
@ -119,13 +117,12 @@ struct getpagesize_args {
/* ARGSUSED */
int
ogetpagesize(p, uap, retval)
ogetpagesize(p, uap)
struct proc *p;
struct getpagesize_args *uap;
int *retval;
{
*retval = PAGE_SIZE;
p->p_retval[0] = PAGE_SIZE;
return (0);
}
#endif /* COMPAT_43 || COMPAT_SUNOS */
@ -152,10 +149,9 @@ struct mmap_args {
#endif
int
mmap(p, uap, retval)
mmap(p, uap)
struct proc *p;
register struct mmap_args *uap;
int *retval;
{
register struct filedesc *fdp = p->p_fd;
register struct file *fp;
@ -281,7 +277,7 @@ mmap(p, uap, retval)
error = vm_mmap(&p->p_vmspace->vm_map, &addr, size, prot, maxprot,
flags, handle, pos);
if (error == 0)
*retval = (int) (addr + pageoff);
p->p_retval[0] = (int) (addr + pageoff);
return (error);
}
@ -297,10 +293,9 @@ struct ommap_args {
};
#endif
int
ommap(p, uap, retval)
ommap(p, uap)
struct proc *p;
register struct ommap_args *uap;
int *retval;
{
struct mmap_args nargs;
static const char cvtbsdprot[8] = {
@ -338,7 +333,7 @@ ommap(p, uap, retval)
nargs.flags |= MAP_INHERIT;
nargs.fd = uap->fd;
nargs.pos = uap->pos;
return (mmap(p, &nargs, retval));
return (mmap(p, &nargs));
}
#endif /* COMPAT_43 */
@ -351,10 +346,9 @@ struct msync_args {
};
#endif
int
msync(p, uap, retval)
msync(p, uap)
struct proc *p;
struct msync_args *uap;
int *retval;
{
vm_offset_t addr;
vm_size_t size, pageoff;
@ -424,10 +418,9 @@ struct munmap_args {
};
#endif
int
munmap(p, uap, retval)
munmap(p, uap)
register struct proc *p;
register struct munmap_args *uap;
int *retval;
{
vm_offset_t addr;
vm_size_t size, pageoff;
@ -486,10 +479,9 @@ struct mprotect_args {
};
#endif
int
mprotect(p, uap, retval)
mprotect(p, uap)
struct proc *p;
struct mprotect_args *uap;
int *retval;
{
vm_offset_t addr;
vm_size_t size, pageoff;
@ -528,10 +520,9 @@ struct minherit_args {
};
#endif
int
minherit(p, uap, retval)
minherit(p, uap)
struct proc *p;
struct minherit_args *uap;
int *retval;
{
vm_offset_t addr;
vm_size_t size, pageoff;
@ -568,10 +559,9 @@ struct madvise_args {
/* ARGSUSED */
int
madvise(p, uap, retval)
madvise(p, uap)
struct proc *p;
struct madvise_args *uap;
int *retval;
{
vm_map_t map;
pmap_t pmap;
@ -615,10 +605,9 @@ struct mincore_args {
/* ARGSUSED */
int
mincore(p, uap, retval)
mincore(p, uap)
struct proc *p;
struct mincore_args *uap;
int *retval;
{
vm_offset_t addr, first_addr;
vm_offset_t end, cend;
@ -782,10 +771,9 @@ struct mlock_args {
};
#endif
int
mlock(p, uap, retval)
mlock(p, uap)
struct proc *p;
struct mlock_args *uap;
int *retval;
{
vm_offset_t addr;
vm_size_t size, pageoff;
@ -827,10 +815,9 @@ struct mlockall_args {
#endif
int
mlockall(p, uap, retval)
mlockall(p, uap)
struct proc *p;
struct mlockall_args *uap;
int *retval;
{
return 0;
}
@ -842,10 +829,9 @@ struct mlockall_args {
#endif
int
munlockall(p, uap, retval)
munlockall(p, uap)
struct proc *p;
struct munlockall_args *uap;
int *retval;
{
return 0;
}
@ -857,10 +843,9 @@ struct munlock_args {
};
#endif
int
munlock(p, uap, retval)
munlock(p, uap)
struct proc *p;
struct munlock_args *uap;
int *retval;
{
vm_offset_t addr;
vm_size_t size, pageoff;

View File

@ -31,7 +31,7 @@
* SUCH DAMAGE.
*
* @(#)vm_swap.c 8.5 (Berkeley) 2/17/94
* $Id: vm_swap.c,v 1.46 1997/09/07 16:21:11 bde Exp $
* $Id: vm_swap.c,v 1.47 1997/09/14 03:19:42 peter Exp $
*/
#include <sys/param.h>
@ -166,10 +166,9 @@ struct swapon_args {
/* ARGSUSED */
int
swapon(p, uap, retval)
swapon(p, uap)
struct proc *p;
struct swapon_args *uap;
int *retval;
{
register struct vnode *vp;
dev_t dev;

View File

@ -38,7 +38,7 @@
* from: Utah $Hdr: vm_unix.c 1.1 89/11/07$
*
* @(#)vm_unix.c 8.1 (Berkeley) 6/11/93
* $Id: vm_unix.c,v 1.14 1997/02/22 09:48:40 peter Exp $
* $Id: vm_unix.c,v 1.15 1997/08/02 14:33:27 bde Exp $
*/
/*
@ -65,10 +65,9 @@ struct obreak_args {
/* ARGSUSED */
int
obreak(p, uap, retval)
obreak(p, uap)
struct proc *p;
struct obreak_args *uap;
int *retval;
{
register struct vmspace *vm = p->p_vmspace;
vm_offset_t new, old, base;
@ -122,10 +121,9 @@ struct ovadvise_args {
/* ARGSUSED */
int
ovadvise(p, uap, retval)
ovadvise(p, uap)
struct proc *p;
struct ovadvise_args *uap;
int *retval;
{
return (EINVAL);