diff options
author | alfred <alfred@FreeBSD.org> | 2002-12-14 01:56:26 +0000 |
---|---|---|
committer | alfred <alfred@FreeBSD.org> | 2002-12-14 01:56:26 +0000 |
commit | d070c0a52d25d76fe9298c4217dc07e9439decca (patch) | |
tree | f2f1c63d7a3acfeb3493534ac55908632c5769ee /sys/i386/ibcs2/ibcs2_fcntl.c | |
parent | 069ffa44b51ac78013fd8505fb1faf6c57b4bb12 (diff) | |
download | FreeBSD-src-d070c0a52d25d76fe9298c4217dc07e9439decca.zip FreeBSD-src-d070c0a52d25d76fe9298c4217dc07e9439decca.tar.gz |
SCARGS removal take II.
Diffstat (limited to 'sys/i386/ibcs2/ibcs2_fcntl.c')
-rw-r--r-- | sys/i386/ibcs2/ibcs2_fcntl.c | 86 |
1 files changed, 43 insertions, 43 deletions
diff --git a/sys/i386/ibcs2/ibcs2_fcntl.c b/sys/i386/ibcs2/ibcs2_fcntl.c index 6ada6c9..df93363 100644 --- a/sys/i386/ibcs2/ibcs2_fcntl.c +++ b/sys/i386/ibcs2/ibcs2_fcntl.c @@ -174,20 +174,20 @@ ibcs2_open(td, uap) struct ibcs2_open_args *uap; { struct proc *p = td->td_proc; - int noctty = SCARG(uap, flags) & IBCS2_O_NOCTTY; + int noctty = uap->flags & IBCS2_O_NOCTTY; int ret; caddr_t sg = stackgap_init(); - SCARG(uap, flags) = cvt_o_flags(SCARG(uap, flags)); - if (SCARG(uap, flags) & O_CREAT) - CHECKALTCREAT(td, &sg, SCARG(uap, path)); + uap->flags = cvt_o_flags(uap->flags); + if (uap->flags & O_CREAT) + CHECKALTCREAT(td, &sg, uap->path); else - CHECKALTEXIST(td, &sg, SCARG(uap, path)); + CHECKALTEXIST(td, &sg, uap->path); ret = open(td, (struct open_args *)uap); #ifdef SPX_HACK if (ret == ENXIO) { - if (!strcmp(SCARG(uap, path), "/compat/ibcs2/dev/spx")) + if (!strcmp(uap->path, "/compat/ibcs2/dev/spx")) ret = spx_open(td, uap); } else #endif /* SPX_HACK */ @@ -219,10 +219,10 @@ ibcs2_creat(td, uap) struct open_args cup; caddr_t sg = stackgap_init(); - CHECKALTCREAT(td, &sg, SCARG(uap, path)); - SCARG(&cup, path) = SCARG(uap, path); - SCARG(&cup, mode) = SCARG(uap, mode); - SCARG(&cup, flags) = O_WRONLY | O_CREAT | O_TRUNC; + CHECKALTCREAT(td, &sg, uap->path); + cup.path = uap->path; + cup.mode = uap->mode; + cup.flags = O_WRONLY | O_CREAT | O_TRUNC; return open(td, &cup); } @@ -234,9 +234,9 @@ ibcs2_access(td, uap) struct access_args cup; caddr_t sg = stackgap_init(); - CHECKALTEXIST(td, &sg, SCARG(uap, path)); - SCARG(&cup, path) = SCARG(uap, path); - SCARG(&cup, flags) = SCARG(uap, flags); + CHECKALTEXIST(td, &sg, uap->path); + cup.path = uap->path; + cup.flags = uap->flags; return access(td, &cup); } @@ -250,55 +250,55 @@ ibcs2_fcntl(td, uap) struct flock *flp; struct ibcs2_flock ifl; - switch(SCARG(uap, cmd)) { + switch(uap->cmd) { case IBCS2_F_DUPFD: - SCARG(&fa, fd) = SCARG(uap, fd); - SCARG(&fa, cmd) = F_DUPFD; - SCARG(&fa, arg) = (/* XXX */ int)SCARG(uap, arg); + fa.fd = uap->fd; + fa.cmd = F_DUPFD; + fa.arg = (/* XXX */ int)uap->arg; return fcntl(td, &fa); case IBCS2_F_GETFD: - SCARG(&fa, fd) = SCARG(uap, fd); - SCARG(&fa, cmd) = F_GETFD; - SCARG(&fa, arg) = (/* XXX */ int)SCARG(uap, arg); + fa.fd = uap->fd; + fa.cmd = F_GETFD; + fa.arg = (/* XXX */ int)uap->arg; return fcntl(td, &fa); case IBCS2_F_SETFD: - SCARG(&fa, fd) = SCARG(uap, fd); - SCARG(&fa, cmd) = F_SETFD; - SCARG(&fa, arg) = (/* XXX */ int)SCARG(uap, arg); + fa.fd = uap->fd; + fa.cmd = F_SETFD; + fa.arg = (/* XXX */ int)uap->arg; return fcntl(td, &fa); case IBCS2_F_GETFL: - SCARG(&fa, fd) = SCARG(uap, fd); - SCARG(&fa, cmd) = F_GETFL; - SCARG(&fa, arg) = (/* XXX */ int)SCARG(uap, arg); + fa.fd = uap->fd; + fa.cmd = F_GETFL; + fa.arg = (/* XXX */ int)uap->arg; error = fcntl(td, &fa); if (error) return error; td->td_retval[0] = oflags2ioflags(td->td_retval[0]); return error; case IBCS2_F_SETFL: - SCARG(&fa, fd) = SCARG(uap, fd); - SCARG(&fa, cmd) = F_SETFL; - SCARG(&fa, arg) = (/* XXX */ int) - ioflags2oflags((int)SCARG(uap, arg)); + fa.fd = uap->fd; + fa.cmd = F_SETFL; + fa.arg = (/* XXX */ int) + ioflags2oflags((int)uap->arg); return fcntl(td, &fa); case IBCS2_F_GETLK: { caddr_t sg = stackgap_init(); flp = stackgap_alloc(&sg, sizeof(*flp)); - error = copyin((caddr_t)SCARG(uap, arg), (caddr_t)&ifl, + error = copyin((caddr_t)uap->arg, (caddr_t)&ifl, ibcs2_flock_len); if (error) return error; cvt_iflock2flock(&ifl, flp); - SCARG(&fa, fd) = SCARG(uap, fd); - SCARG(&fa, cmd) = F_GETLK; - SCARG(&fa, arg) = (/* XXX */ int)flp; + fa.fd = uap->fd; + fa.cmd = F_GETLK; + fa.arg = (/* XXX */ int)flp; error = fcntl(td, &fa); if (error) return error; cvt_flock2iflock(flp, &ifl); - return copyout((caddr_t)&ifl, (caddr_t)SCARG(uap, arg), + return copyout((caddr_t)&ifl, (caddr_t)uap->arg, ibcs2_flock_len); } @@ -306,14 +306,14 @@ ibcs2_fcntl(td, uap) { caddr_t sg = stackgap_init(); flp = stackgap_alloc(&sg, sizeof(*flp)); - error = copyin((caddr_t)SCARG(uap, arg), (caddr_t)&ifl, + error = copyin((caddr_t)uap->arg, (caddr_t)&ifl, ibcs2_flock_len); if (error) return error; cvt_iflock2flock(&ifl, flp); - SCARG(&fa, fd) = SCARG(uap, fd); - SCARG(&fa, cmd) = F_SETLK; - SCARG(&fa, arg) = (/* XXX */ int)flp; + fa.fd = uap->fd; + fa.cmd = F_SETLK; + fa.arg = (/* XXX */ int)flp; return fcntl(td, &fa); } @@ -322,14 +322,14 @@ ibcs2_fcntl(td, uap) { caddr_t sg = stackgap_init(); flp = stackgap_alloc(&sg, sizeof(*flp)); - error = copyin((caddr_t)SCARG(uap, arg), (caddr_t)&ifl, + error = copyin((caddr_t)uap->arg, (caddr_t)&ifl, ibcs2_flock_len); if (error) return error; cvt_iflock2flock(&ifl, flp); - SCARG(&fa, fd) = SCARG(uap, fd); - SCARG(&fa, cmd) = F_SETLKW; - SCARG(&fa, arg) = (/* XXX */ int)flp; + fa.fd = uap->fd; + fa.cmd = F_SETLKW; + fa.arg = (/* XXX */ int)flp; return fcntl(td, &fa); } } |