summaryrefslogtreecommitdiffstats
path: root/sys/i386/ibcs2/ibcs2_xenix.c
diff options
context:
space:
mode:
authoralfred <alfred@FreeBSD.org>2002-12-13 22:41:47 +0000
committeralfred <alfred@FreeBSD.org>2002-12-13 22:41:47 +0000
commit4f48184fb2c8948c406b21c3f802b5b281cef957 (patch)
treea1ef524330ea7e253fb665abea3ddb594cde69fc /sys/i386/ibcs2/ibcs2_xenix.c
parentd19b4e039d47537b44233aae83d03b974d29d771 (diff)
downloadFreeBSD-src-4f48184fb2c8948c406b21c3f802b5b281cef957.zip
FreeBSD-src-4f48184fb2c8948c406b21c3f802b5b281cef957.tar.gz
Backout removal SCARGS, the code freeze is only "selectively" over.
Diffstat (limited to 'sys/i386/ibcs2/ibcs2_xenix.c')
-rw-r--r--sys/i386/ibcs2/ibcs2_xenix.c32
1 files changed, 16 insertions, 16 deletions
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);
OpenPOWER on IntegriCloud