diff options
author | phk <phk@FreeBSD.org> | 1997-11-06 19:29:57 +0000 |
---|---|---|
committer | phk <phk@FreeBSD.org> | 1997-11-06 19:29:57 +0000 |
commit | 4c8218a5c7d132b8ae0bd2a5a677455d69fabaab (patch) | |
tree | 70e3bdde81d385220c0b0de7410976c4e83e5bbd /sys/kern/sys_pipe.c | |
parent | 363a7ddf8560aa6b11580adeb58853d719217b26 (diff) | |
download | FreeBSD-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/sys_pipe.c')
-rw-r--r-- | sys/kern/sys_pipe.c | 11 |
1 files changed, 5 insertions, 6 deletions
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); |