summaryrefslogtreecommitdiffstats
path: root/sys/kern
diff options
context:
space:
mode:
authorphk <phk@FreeBSD.org>1997-11-06 19:29:57 +0000
committerphk <phk@FreeBSD.org>1997-11-06 19:29:57 +0000
commit4c8218a5c7d132b8ae0bd2a5a677455d69fabaab (patch)
tree70e3bdde81d385220c0b0de7410976c4e83e5bbd /sys/kern
parent363a7ddf8560aa6b11580adeb58853d719217b26 (diff)
downloadFreeBSD-src-4c8218a5c7d132b8ae0bd2a5a677455d69fabaab.zip
FreeBSD-src-4c8218a5c7d132b8ae0bd2a5a677455d69fabaab.tar.gz
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.
Diffstat (limited to 'sys/kern')
-rw-r--r--sys/kern/init_main.c10
-rw-r--r--sys/kern/kern_acct.c5
-rw-r--r--sys/kern/kern_descrip.c54
-rw-r--r--sys/kern/kern_exec.c5
-rw-r--r--sys/kern/kern_exit.c17
-rw-r--r--sys/kern/kern_fork.c17
-rw-r--r--sys/kern/kern_ktrace.c8
-rw-r--r--sys/kern/kern_linker.c42
-rw-r--r--sys/kern/kern_lkm.c7
-rw-r--r--sys/kern/kern_module.c29
-rw-r--r--sys/kern/kern_ntptime.c12
-rw-r--r--sys/kern/kern_prot.c98
-rw-r--r--sys/kern/kern_resource.c28
-rw-r--r--sys/kern/kern_shutdown.c7
-rw-r--r--sys/kern/kern_sig.c46
-rw-r--r--sys/kern/kern_sysctl.c8
-rw-r--r--sys/kern/kern_threads.c20
-rw-r--r--sys/kern/kern_time.c35
-rw-r--r--sys/kern/kern_xxx.c28
-rw-r--r--sys/kern/subr_prof.c5
-rw-r--r--sys/kern/subr_trap.c16
-rw-r--r--sys/kern/sys_generic.c59
-rw-r--r--sys/kern/sys_pipe.c11
-rw-r--r--sys/kern/sys_process.c13
-rw-r--r--sys/kern/sysv_ipc.c77
-rw-r--r--sys/kern/sysv_msg.c35
-rw-r--r--sys/kern/sysv_sem.c36
-rw-r--r--sys/kern/sysv_shm.c54
-rw-r--r--sys/kern/uipc_syscalls.c143
-rw-r--r--sys/kern/vfs_aio.c33
-rw-r--r--sys/kern/vfs_bio.c4
-rw-r--r--sys/kern/vfs_extattr.c176
-rw-r--r--sys/kern/vfs_syscalls.c176
33 files changed, 528 insertions, 786 deletions
diff --git a/sys/kern/init_main.c b/sys/kern/init_main.c
index 46315e0..3c2ae5b 100644
--- a/sys/kern/init_main.c
+++ b/sys/kern/init_main.c
@@ -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);
diff --git a/sys/kern/kern_acct.c b/sys/kern/kern_acct.c
index 9393a72..72b2e92 100644
--- a/sys/kern/kern_acct.c
+++ b/sys/kern/kern_acct.c
@@ -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;
diff --git a/sys/kern/kern_descrip.c b/sys/kern/kern_descrip.c
index 1275f0c..7cdebfb 100644
--- a/sys/kern/kern_descrip.c
+++ b/sys/kern/kern_descrip.c
@@ -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;
diff --git a/sys/kern/kern_exec.c b/sys/kern/kern_exec.c
index d72d3ab..bdad7d9 100644
--- a/sys/kern/kern_exec.c
+++ b/sys/kern/kern_exec.c
@@ -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;
diff --git a/sys/kern/kern_exit.c b/sys/kern/kern_exit.c
index 3d85909..f2c5ddc 100644
--- a/sys/kern/kern_exit.c
+++ b/sys/kern/kern_exit.c
@@ -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
diff --git a/sys/kern/kern_fork.c b/sys/kern/kern_fork.c
index f5a59a3..dd25f34 100644
--- a/sys/kern/kern_fork.c
+++ b/sys/kern/kern_fork.c
@@ -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));
}
diff --git a/sys/kern/kern_ktrace.c b/sys/kern/kern_ktrace.c
index 94b650d2..d28c630 100644
--- a/sys/kern/kern_ktrace.c
+++ b/sys/kern/kern_ktrace.c
@@ -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 @@ done:
*/
/* 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;
diff --git a/sys/kern/kern_linker.c b/sys/kern/kern_linker.c
index 08c20ae..9efaae2 100644
--- a/sys/kern/kern_linker.c
+++ b/sys/kern/kern_linker.c
@@ -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 @@ out:
}
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 @@ out:
}
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 @@ out:
}
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;
diff --git a/sys/kern/kern_lkm.c b/sys/kern/kern_lkm.c
index f317899..475d601 100644
--- a/sys/kern/kern_lkm.c
+++ b/sys/kern/kern_lkm.c
@@ -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
diff --git a/sys/kern/kern_module.c b/sys/kern/kern_module.c
index b6d1b90..80a8f14 100644
--- a/sys/kern/kern_module.c
+++ b/sys/kern/kern_module.c
@@ -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;
diff --git a/sys/kern/kern_ntptime.c b/sys/kern/kern_ntptime.c
index 88ba077b..963ddc1 100644
--- a/sys/kern/kern_ntptime.c
+++ b/sys/kern/kern_ntptime.c
@@ -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;
}
diff --git a/sys/kern/kern_prot.c b/sys/kern/kern_prot.c
index 9e338f1..41e5192 100644
--- a/sys/kern/kern_prot.c
+++ b/sys/kern/kern_prot.c
@@ -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];
diff --git a/sys/kern/kern_resource.c b/sys/kern/kern_resource.c
index d3ad1ac..d97b0c9 100644
--- a/sys/kern/kern_resource.c
+++ b/sys/kern/kern_resource.c
@@ -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;
diff --git a/sys/kern/kern_shutdown.c b/sys/kern/kern_shutdown.c
index b3021aa..145dd2a 100644
--- a/sys/kern/kern_shutdown.c
+++ b/sys/kern/kern_shutdown.c
@@ -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;
diff --git a/sys/kern/kern_sig.c b/sys/kern/kern_sig.c
index fb78d3e..8a378a1 100644
--- a/sys/kern/kern_sig.c
+++ b/sys/kern/kern_sig.c
@@ -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);
diff --git a/sys/kern/kern_sysctl.c b/sys/kern/kern_sysctl.c
index 2b7bac3..f8b01d7 100644
--- a/sys/kern/kern_sysctl.c
+++ b/sys/kern/kern_sysctl.c
@@ -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));
diff --git a/sys/kern/kern_threads.c b/sys/kern/kern_threads.c
index 93a2290..37b1461 100644
--- a/sys/kern/kern_threads.c
+++ b/sys/kern/kern_threads.c
@@ -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;
diff --git a/sys/kern/kern_time.c b/sys/kern/kern_time.c
index e857ba0..57d498e 100644
--- a/sys/kern/kern_time.c
+++ b/sys/kern/kern_time.c
@@ -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);
diff --git a/sys/kern/kern_xxx.c b/sys/kern/kern_xxx.c
index 17550b6..8d61720 100644
--- a/sys/kern/kern_xxx.c
+++ b/sys/kern/kern_xxx.c
@@ -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;
diff --git a/sys/kern/subr_prof.c b/sys/kern/subr_prof.c
index c81364b..0d571e1 100644
--- a/sys/kern/subr_prof.c
+++ b/sys/kern/subr_prof.c
@@ -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;
diff --git a/sys/kern/subr_trap.c b/sys/kern/subr_trap.c
index ec74808..4cab4c1 100644
--- a/sys/kern/subr_trap.c
+++ b/sys/kern/subr_trap.c
@@ -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 @@ bad:
#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
}
diff --git a/sys/kern/sys_generic.c b/sys/kern/sys_generic.c
index 5b3a741..514713d 100644
--- a/sys/kern/sys_generic.c
+++ b/sys/kern/sys_generic.c
@@ -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 @@ done:
}
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 @@ out:
}
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*/
diff --git a/sys/kern/sys_pipe.c b/sys/kern/sys_pipe.c
index ebfe451..5821505 100644
--- a/sys/kern/sys_pipe.c
+++ b/sys/kern/sys_pipe.c
@@ -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);
diff --git a/sys/kern/sys_process.c b/sys/kern/sys_process.c
index 364fc9b..9ae7569 100644
--- a/sys/kern/sys_process.c
+++ b/sys/kern/sys_process.c
@@ -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);
diff --git a/sys/kern/sysv_ipc.c b/sys/kern/sysv_ipc.c
index a1a1965..2418f60 100644
--- a/sys/kern/sysv_ipc.c
+++ b/sys/kern/sysv_ipc.c
@@ -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 */
diff --git a/sys/kern/sysv_msg.c b/sys/kern/sysv_msg.c
index 1766d8f..d439759 100644
--- a/sys/kern/sysv_msg.c
+++ b/sys/kern/sysv_msg.c
@@ -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);
}
diff --git a/sys/kern/sysv_sem.c b/sys/kern/sysv_sem.c
index a7f3a06..4894f8c 100644
--- a/sys/kern/sysv_sem.c
+++ b/sys/kern/sysv_sem.c
@@ -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 @@ done:
#ifdef SEM_DEBUG
printf("semop: done\n");
#endif
- *retval = 0;
+ p->p_retval[0] = 0;
return(0);
}
diff --git a/sys/kern/sysv_shm.c b/sys/kern/sysv_shm.c
index a55d027..b9fd3b8 100644
--- a/sys/kern/sysv_shm.c
+++ b/sys/kern/sysv_shm.c
@@ -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
diff --git a/sys/kern/uipc_syscalls.c b/sys/kern/uipc_syscalls.c
index ed42cce..0c0e61f 100644
--- a/sys/kern/uipc_syscalls.c
+++ b/sys/kern/uipc_syscalls.c
@@ -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 @@ gotnoname:
}
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 @@ bad:
}
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 @@ free1:
}
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 @@ bad:
}
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 @@ done:
#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 @@ done:
}
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 @@ out:
}
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 @@ done:
#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 @@ done:
/* 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 @@ bad:
}
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 @@ bad:
}
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 */
diff --git a/sys/kern/vfs_aio.c b/sys/kern/vfs_aio.c
index 1418878..493de18 100644
--- a/sys/kern/vfs_aio.c
+++ b/sys/kern/vfs_aio.c
@@ -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;
diff --git a/sys/kern/vfs_bio.c b/sys/kern/vfs_bio.c
index bd1d78f..b9d1335 100644
--- a/sys/kern/vfs_bio.c
+++ b/sys/kern/vfs_bio.c
@@ -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);
}
}
diff --git a/sys/kern/vfs_extattr.c b/sys/kern/vfs_extattr.c
index 6273cc6..75877ed 100644
--- a/sys/kern/vfs_extattr.c
+++ b/sys/kern/vfs_extattr.c
@@ -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 @@ out:
*/
/* 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 @@ unionread:
}
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 @@ unionread:
}
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;
diff --git a/sys/kern/vfs_syscalls.c b/sys/kern/vfs_syscalls.c
index 6273cc6..75877ed 100644
--- a/sys/kern/vfs_syscalls.c
+++ b/sys/kern/vfs_syscalls.c
@@ -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 @@ out:
*/
/* 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 @@ unionread:
}
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 @@ unionread:
}
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;
OpenPOWER on IntegriCloud