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