From 4f48184fb2c8948c406b21c3f802b5b281cef957 Mon Sep 17 00:00:00 2001 From: alfred Date: Fri, 13 Dec 2002 22:41:47 +0000 Subject: Backout removal SCARGS, the code freeze is only "selectively" over. --- sys/i386/ibcs2/ibcs2_xenix.c | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) (limited to 'sys/i386/ibcs2/ibcs2_xenix.c') diff --git a/sys/i386/ibcs2/ibcs2_xenix.c b/sys/i386/ibcs2/ibcs2_xenix.c index 9aea547..356161b 100644 --- a/sys/i386/ibcs2/ibcs2_xenix.c +++ b/sys/i386/ibcs2/ibcs2_xenix.c @@ -79,12 +79,12 @@ xenix_rdchk(td, uap) caddr_t sg = stackgap_init(); DPRINTF(("IBCS2: 'xenix rdchk'\n")); - sa.fd = uap->fd; - sa.com = FIONREAD; - sa.data = stackgap_alloc(&sg, sizeof(int)); + SCARG(&sa, fd) = SCARG(uap, fd); + SCARG(&sa, com) = FIONREAD; + SCARG(&sa, data) = stackgap_alloc(&sg, sizeof(int)); if ((error = ioctl(td, &sa)) != 0) return error; - td->td_retval[0] = (*((int*)sa.data)) ? 1 : 0; + td->td_retval[0] = (*((int*)SCARG(&sa, data))) ? 1 : 0; return 0; } @@ -96,9 +96,9 @@ xenix_chsize(td, uap) struct ftruncate_args sa; DPRINTF(("IBCS2: 'xenix chsize'\n")); - sa.fd = uap->fd; - sa.pad = 0; - sa.length = uap->size; + SCARG(&sa, fd) = SCARG(uap, fd); + SCARG(&sa, pad) = 0; + SCARG(&sa, length) = SCARG(uap, size); return ftruncate(td, &sa); } @@ -123,7 +123,7 @@ xenix_ftime(td, uap) itb.timezone = tz.tz_minuteswest; itb.dstflag = tz.tz_dsttime != DST_NONE; - return copyout((caddr_t)&itb, (caddr_t)uap->tp, + return copyout((caddr_t)&itb, (caddr_t)SCARG(uap, tp), sizeof(struct ibcs2_timeb)); } @@ -132,8 +132,8 @@ xenix_nap(struct thread *td, struct xenix_nap_args *uap) { long period; - DPRINTF(("IBCS2: 'xenix nap %d ms'\n", uap->millisec)); - period = (long)uap->millisec / (1000/hz); + DPRINTF(("IBCS2: 'xenix nap %d ms'\n", SCARG(uap, millisec))); + period = (long)SCARG(uap, millisec) / (1000/hz); if (period) while (tsleep(&period, PPAUSE, "nap", period) != EWOULDBLOCK) ; @@ -200,22 +200,22 @@ xenix_eaccess(struct thread *td, struct xenix_eaccess_args *uap) int error, flags; caddr_t sg = stackgap_init(); - CHECKALTEXIST(td, &sg, uap->path); + CHECKALTEXIST(td, &sg, SCARG(uap, path)); NDINIT(&nd, LOOKUP, FOLLOW | LOCKLEAF, UIO_USERSPACE, - uap->path, td); + SCARG(uap, path), td); if ((error = namei(&nd)) != 0) return error; vp = nd.ni_vp; /* Flags == 0 means only check for existence. */ - if (uap->flags) { + if (SCARG(uap, flags)) { flags = 0; - if (uap->flags & IBCS2_R_OK) + if (SCARG(uap, flags) & IBCS2_R_OK) flags |= VREAD; - if (uap->flags & IBCS2_W_OK) + if (SCARG(uap, flags) & IBCS2_W_OK) flags |= VWRITE; - if (uap->flags & IBCS2_X_OK) + if (SCARG(uap, flags) & IBCS2_X_OK) flags |= VEXEC; if ((flags & VWRITE) == 0 || (error = vn_writechk(vp)) == 0) error = VOP_ACCESS(vp, flags, cred, td); -- cgit v1.1