From: David Rhodus Date: Tue, 29 Mar 2005 00:35:55 +0000 (+0000) Subject: Remove some uses of the SCARG macro. X-Git-Tag: v2.0.1~8016 X-Git-Url: https://gitweb.dragonflybsd.org/dragonfly.git/commitdiff_plain/ab2eb4eb47eafbc636e2dffcf1c0f0ef38ee3056?hp=0ac5b9db3e046e1f58a4b52ffc129cc7f3ed82d7 Remove some uses of the SCARG macro. --- diff --git a/sys/kern/kern_acct.c b/sys/kern/kern_acct.c index a6c9c59c21..4613d3df9a 100644 --- a/sys/kern/kern_acct.c +++ b/sys/kern/kern_acct.c @@ -38,7 +38,7 @@ * * @(#)kern_acct.c 8.1 (Berkeley) 6/14/93 * $FreeBSD: src/sys/kern/kern_acct.c,v 1.23.2.1 2002/07/24 18:33:55 johan Exp $ - * $DragonFly: src/sys/kern/kern_acct.c,v 1.16 2004/11/12 00:09:23 dillon Exp $ + * $DragonFly: src/sys/kern/kern_acct.c,v 1.17 2005/03/29 00:35:55 drhodus Exp $ */ #include @@ -136,8 +136,8 @@ acct(uap) * If accounting is to be started to a file, open that file for * appending and make sure it's a 'normal'. */ - if (SCARG(uap, path) != NULL) { - error = nlookup_init(&nd, SCARG(uap, path), UIO_USERSPACE, + if (uap->path != NULL) { + error = nlookup_init(&nd, uap->path, UIO_USERSPACE, NLC_LOCKVP); if (error == 0) error = vn_open(&nd, NULL, FWRITE | O_APPEND, 0); @@ -171,7 +171,7 @@ acct(uap) * If no new file opened then leave. We never did an nlookup so * don't try cleaning it up. */ - if (SCARG(uap, path) == NULL) + if (uap->path == NULL) return (error); /* diff --git a/sys/kern/kern_acl.c b/sys/kern/kern_acl.c index 8bd441a120..89acbda57b 100644 --- a/sys/kern/kern_acl.c +++ b/sys/kern/kern_acl.c @@ -24,7 +24,7 @@ * SUCH DAMAGE. * * $FreeBSD: src/sys/kern/kern_acl.c,v 1.2.2.1 2000/07/28 18:48:16 rwatson Exp $ - * $DragonFly: src/sys/kern/kern_acl.c,v 1.8 2004/11/12 00:09:23 dillon Exp $ + * $DragonFly: src/sys/kern/kern_acl.c,v 1.9 2005/03/29 00:35:55 drhodus Exp $ */ /* @@ -161,14 +161,14 @@ __acl_get_file(struct __acl_get_file_args *uap) int error; vp = NULL; - error = nlookup_init(&nd, SCARG(uap, path), UIO_USERSPACE, NLC_FOLLOW); + error = nlookup_init(&nd, uap->path, UIO_USERSPACE, NLC_FOLLOW); if (error == 0) error = nlookup(&nd); if (error == 0) error = cache_vref(nd.nl_ncp, nd.nl_cred, &vp); nlookup_done(&nd); if (error == 0) { - error = vacl_get_acl(vp, SCARG(uap, type), SCARG(uap, aclp)); + error = vacl_get_acl(vp, uap->type, uap->aclp); vrele(vp); } return (error); @@ -185,14 +185,14 @@ __acl_set_file(struct __acl_set_file_args *uap) int error; vp = NULL; - error = nlookup_init(&nd, SCARG(uap, path), UIO_USERSPACE, NLC_FOLLOW); + error = nlookup_init(&nd, uap->path, UIO_USERSPACE, NLC_FOLLOW); if (error == 0) error = nlookup(&nd); if (error == 0) error = cache_vref(nd.nl_ncp, nd.nl_cred, &vp); nlookup_done(&nd); if (error == 0) { - error = vacl_set_acl(vp, SCARG(uap, type), SCARG(uap, aclp)); + error = vacl_set_acl(vp, uap->type, uap->aclp); vrele(vp); } return (error); @@ -209,11 +209,11 @@ __acl_get_fd(struct __acl_get_fd_args *uap) int error; KKASSERT(td->td_proc); - error = getvnode(td->td_proc->p_fd, SCARG(uap, filedes), &fp); + error = getvnode(td->td_proc->p_fd, uap->filedes, &fp); if (error) return(error); - return vacl_get_acl((struct vnode *)fp->f_data, SCARG(uap, type), - SCARG(uap, aclp)); + return vacl_get_acl((struct vnode *)fp->f_data, uap->type, + uap->aclp); } /* @@ -227,11 +227,11 @@ __acl_set_fd(struct __acl_set_fd_args *uap) int error; KKASSERT(td->td_proc); - error = getvnode(td->td_proc->p_fd, SCARG(uap, filedes), &fp); + error = getvnode(td->td_proc->p_fd, uap->filedes, &fp); if (error) return(error); - return vacl_set_acl((struct vnode *)fp->f_data, SCARG(uap, type), - SCARG(uap, aclp)); + return vacl_set_acl((struct vnode *)fp->f_data, uap->type, + uap->aclp); } /* @@ -245,7 +245,7 @@ __acl_delete_file(struct __acl_delete_file_args *uap) int error; vp = NULL; - error = nlookup_init(&nd, SCARG(uap, path), UIO_USERSPACE, NLC_FOLLOW); + error = nlookup_init(&nd, uap->path, UIO_USERSPACE, NLC_FOLLOW); if (error == 0) error = nlookup(&nd); if (error == 0) @@ -253,7 +253,7 @@ __acl_delete_file(struct __acl_delete_file_args *uap) nlookup_done(&nd); if (error == 0) { - error = vacl_delete(vp, SCARG(uap, type)); + error = vacl_delete(vp, uap->type); vrele(vp); } return (error); @@ -270,10 +270,10 @@ __acl_delete_fd(struct __acl_delete_fd_args *uap) int error; KKASSERT(td->td_proc); - error = getvnode(td->td_proc->p_fd, SCARG(uap, filedes), &fp); + error = getvnode(td->td_proc->p_fd, uap->filedes, &fp); if (error) return(error); - error = vacl_delete((struct vnode *)fp->f_data, SCARG(uap, type)); + error = vacl_delete((struct vnode *)fp->f_data, uap->type); return (error); } @@ -288,7 +288,7 @@ __acl_aclcheck_file(struct __acl_aclcheck_file_args *uap) int error; vp = NULL; - error = nlookup_init(&nd, SCARG(uap, path), UIO_USERSPACE, NLC_FOLLOW); + error = nlookup_init(&nd, uap->path, UIO_USERSPACE, NLC_FOLLOW); if (error == 0) error = nlookup(&nd); if (error == 0) @@ -296,7 +296,7 @@ __acl_aclcheck_file(struct __acl_aclcheck_file_args *uap) nlookup_done(&nd); if (error == 0) { - error = vacl_aclcheck(vp, SCARG(uap, type), SCARG(uap, aclp)); + error = vacl_aclcheck(vp, uap->type, uap->aclp); vrele(vp); } return (error); @@ -313,9 +313,9 @@ __acl_aclcheck_fd(struct __acl_aclcheck_fd_args *uap) int error; KKASSERT(td->td_proc); - error = getvnode(td->td_proc->p_fd, SCARG(uap, filedes), &fp); + error = getvnode(td->td_proc->p_fd, uap->filedes, &fp); if (error) return(error); - return vacl_aclcheck((struct vnode *)fp->f_data, SCARG(uap, type), - SCARG(uap, aclp)); + return vacl_aclcheck((struct vnode *)fp->f_data, uap->type, + uap->aclp); } diff --git a/sys/kern/kern_ktrace.c b/sys/kern/kern_ktrace.c index ffb563d000..c5199a44fa 100644 --- a/sys/kern/kern_ktrace.c +++ b/sys/kern/kern_ktrace.c @@ -32,7 +32,7 @@ * * @(#)kern_ktrace.c 8.2 (Berkeley) 9/23/93 * $FreeBSD: src/sys/kern/kern_ktrace.c,v 1.35.2.6 2002/07/05 22:36:38 darrenr Exp $ - * $DragonFly: src/sys/kern/kern_ktrace.c,v 1.17 2004/11/12 00:09:23 dillon Exp $ + * $DragonFly: src/sys/kern/kern_ktrace.c,v 1.18 2005/03/29 00:35:55 drhodus Exp $ */ #include "opt_ktrace.h" @@ -361,7 +361,7 @@ utrace(struct utrace_args *uap) if (!KTRPOINT(td, KTR_USER)) return (0); - if (SCARG(uap, len) > KTR_USER_MAXLEN) + if (uap->len > KTR_USER_MAXLEN) return (EINVAL); p->p_traceflag |= KTRFAC_ACTIVE; /* diff --git a/sys/kern/kern_linker.c b/sys/kern/kern_linker.c index e9579b4a85..2eb65324cd 100644 --- a/sys/kern/kern_linker.c +++ b/sys/kern/kern_linker.c @@ -24,7 +24,7 @@ * SUCH DAMAGE. * * $FreeBSD: src/sys/kern/kern_linker.c,v 1.41.2.3 2001/11/21 17:50:35 luigi Exp $ - * $DragonFly: src/sys/kern/kern_linker.c,v 1.20 2004/11/12 00:09:23 dillon Exp $ + * $DragonFly: src/sys/kern/kern_linker.c,v 1.21 2005/03/29 00:35:55 drhodus Exp $ */ #include "opt_ddb.h" @@ -714,7 +714,7 @@ kldload(struct kldload_args *uap) return error; filename = malloc(MAXPATHLEN, M_TEMP, M_WAITOK); - if ((error = copyinstr(SCARG(uap, file), filename, MAXPATHLEN, NULL)) != 0) + if ((error = copyinstr(uap->file, filename, MAXPATHLEN, NULL)) != 0) goto out; /* Can't load more than one module with the same name */ @@ -753,7 +753,7 @@ kldunload(struct kldunload_args *uap) if ((error = suser(td)) != 0) return error; - lf = linker_find_file_by_id(SCARG(uap, fileid)); + lf = linker_find_file_by_id(uap->fileid); if (lf) { KLD_DPF(FILE, ("kldunload: lf->userrefs=%d\n", lf->userrefs)); if (lf->userrefs == 0) { @@ -782,7 +782,7 @@ kldfind(struct kldfind_args *uap) uap->sysmsg_result = -1; filename = malloc(MAXPATHLEN, M_TEMP, M_WAITOK); - if ((error = copyinstr(SCARG(uap, file), filename, MAXPATHLEN, NULL)) != 0) + if ((error = copyinstr(uap->file, filename, MAXPATHLEN, NULL)) != 0) goto out; modulename = rindex(filename, '/'); @@ -807,7 +807,7 @@ kldnext(struct kldnext_args *uap) linker_file_t lf; int error = 0; - if (SCARG(uap, fileid) == 0) { + if (uap->fileid == 0) { if (TAILQ_FIRST(&linker_files)) uap->sysmsg_result = TAILQ_FIRST(&linker_files)->id; else @@ -815,7 +815,7 @@ kldnext(struct kldnext_args *uap) return 0; } - lf = linker_find_file_by_id(SCARG(uap, fileid)); + lf = linker_find_file_by_id(uap->fileid); if (lf) { if (TAILQ_NEXT(lf, link)) uap->sysmsg_result = TAILQ_NEXT(lf, link)->id; @@ -836,13 +836,13 @@ kldstat(struct kldstat_args *uap) struct kld_file_stat* stat; int namelen; - lf = linker_find_file_by_id(SCARG(uap, fileid)); + lf = linker_find_file_by_id(uap->fileid); if (!lf) { error = ENOENT; goto out; } - stat = SCARG(uap, stat); + stat = uap->stat; /* * Check the version of the user's structure. @@ -880,7 +880,7 @@ kldfirstmod(struct kldfirstmod_args *uap) linker_file_t lf; int error = 0; - lf = linker_find_file_by_id(SCARG(uap, fileid)); + lf = linker_find_file_by_id(uap->fileid); if (lf) { if (TAILQ_FIRST(&lf->modules)) uap->sysmsg_result = module_getid(TAILQ_FIRST(&lf->modules)); @@ -902,9 +902,9 @@ kldsym(struct kldsym_args *uap) struct kld_sym_lookup lookup; int error = 0; - if ((error = copyin(SCARG(uap, data), &lookup, sizeof(lookup))) != 0) + if ((error = copyin(uap->data, &lookup, sizeof(lookup))) != 0) goto out; - if (lookup.version != sizeof(lookup) || SCARG(uap, cmd) != KLDSYM_LOOKUP) { + if (lookup.version != sizeof(lookup) || uap->cmd != KLDSYM_LOOKUP) { error = EINVAL; goto out; } @@ -913,8 +913,8 @@ kldsym(struct kldsym_args *uap) if ((error = copyinstr(lookup.symname, symstr, MAXPATHLEN, NULL)) != 0) goto out; - if (SCARG(uap, fileid) != 0) { - lf = linker_find_file_by_id(SCARG(uap, fileid)); + if (uap->fileid != 0) { + lf = linker_find_file_by_id(uap->fileid); if (lf == NULL) { error = ENOENT; goto out; @@ -923,7 +923,7 @@ kldsym(struct kldsym_args *uap) lf->ops->symbol_values(lf, sym, &symval) == 0) { lookup.symvalue = (uintptr_t)symval.value; lookup.symsize = symval.size; - error = copyout(&lookup, SCARG(uap, data), sizeof(lookup)); + error = copyout(&lookup, uap->data, sizeof(lookup)); } else error = ENOENT; } else { @@ -932,7 +932,7 @@ kldsym(struct kldsym_args *uap) lf->ops->symbol_values(lf, sym, &symval) == 0) { lookup.symvalue = (uintptr_t)symval.value; lookup.symsize = symval.size; - error = copyout(&lookup, SCARG(uap, data), sizeof(lookup)); + error = copyout(&lookup, uap->data, sizeof(lookup)); break; } } diff --git a/sys/kern/kern_module.c b/sys/kern/kern_module.c index 4a2640f27d..bd73858ffc 100644 --- a/sys/kern/kern_module.c +++ b/sys/kern/kern_module.c @@ -24,7 +24,7 @@ * SUCH DAMAGE. * * $FreeBSD: src/sys/kern/kern_module.c,v 1.21 1999/11/08 06:53:30 peter Exp $ - * $DragonFly: src/sys/kern/kern_module.c,v 1.8 2004/05/10 10:51:31 hmp Exp $ + * $DragonFly: src/sys/kern/kern_module.c,v 1.9 2005/03/29 00:35:55 drhodus Exp $ */ #include @@ -245,7 +245,7 @@ modnext(struct modnext_args *uap) module_t mod; uap->sysmsg_result = -1; - if (SCARG(uap, modid) == 0) { + if (uap->modid == 0) { mod = TAILQ_FIRST(&modules); if (mod) { uap->sysmsg_result = mod->id; @@ -254,7 +254,7 @@ modnext(struct modnext_args *uap) return ENOENT; } - mod = module_lookupbyid(SCARG(uap, modid)); + mod = module_lookupbyid(uap->modid); if (!mod) return ENOENT; @@ -272,7 +272,7 @@ modfnext(struct modfnext_args *uap) uap->sysmsg_result = -1; - mod = module_lookupbyid(SCARG(uap, modid)); + mod = module_lookupbyid(uap->modid); if (!mod) return ENOENT; @@ -299,11 +299,11 @@ modstat(struct modstat_args *uap) int version; struct module_stat* stat; - mod = module_lookupbyid(SCARG(uap, modid)); + mod = module_lookupbyid(uap->modid); if (!mod) return ENOENT; - stat = SCARG(uap, stat); + stat = uap->stat; /* * Check the version of the user's structure. @@ -348,7 +348,7 @@ modfind(struct modfind_args *uap) char name[MAXMODNAME]; module_t mod; - if ((error = copyinstr(SCARG(uap, name), name, sizeof name, 0)) != 0) + if ((error = copyinstr(uap->name, name, sizeof name, 0)) != 0) goto out; mod = module_lookupbyname(name); diff --git a/sys/kern/kern_time.c b/sys/kern/kern_time.c index 6188d69cf1..216f49141c 100644 --- a/sys/kern/kern_time.c +++ b/sys/kern/kern_time.c @@ -32,7 +32,7 @@ * * @(#)kern_time.c 8.1 (Berkeley) 6/10/93 * $FreeBSD: src/sys/kern/kern_time.c,v 1.68.2.1 2002/10/01 08:00:41 bde Exp $ - * $DragonFly: src/sys/kern/kern_time.c,v 1.18 2005/03/15 01:12:23 dillon Exp $ + * $DragonFly: src/sys/kern/kern_time.c,v 1.19 2005/03/29 00:35:55 drhodus Exp $ */ #include @@ -339,8 +339,8 @@ nanosleep(struct nanosleep_args *uap) * nanosleep was interrupted. */ error = nanosleep1(&smsleep->rqt, &smsleep->rmt); - if (error && SCARG(uap, rmtp)) - error = copyout(&smsleep->rmt, SCARG(uap, rmtp), sizeof(smsleep->rmt)); + if (error && uap->rmtp) + error = copyout(&smsleep->rmt, uap->rmtp, sizeof(smsleep->rmt)); } return (error); } diff --git a/sys/kern/sys_generic.c b/sys/kern/sys_generic.c index e8bf55eee0..ff4e17d01a 100644 --- a/sys/kern/sys_generic.c +++ b/sys/kern/sys_generic.c @@ -37,7 +37,7 @@ * * @(#)sys_generic.c 8.5 (Berkeley) 1/21/94 * $FreeBSD: src/sys/kern/sys_generic.c,v 1.55.2.10 2001/03/17 10:39:32 peter Exp $ - * $DragonFly: src/sys/kern/sys_generic.c,v 1.19 2005/03/01 00:43:02 corecode Exp $ + * $DragonFly: src/sys/kern/sys_generic.c,v 1.20 2005/03/29 00:35:55 drhodus Exp $ */ #include "opt_ktrace.h" @@ -805,7 +805,7 @@ poll(struct poll_args *uap) size_t ni; struct proc *p = curproc; - nfds = SCARG(uap, nfds); + nfds = uap->nfds; /* * This is kinda bogus. We have fd limits, but that is not * really related to the size of the pollfd array. Make sure @@ -820,12 +820,12 @@ poll(struct poll_args *uap) bits = malloc(ni, M_TEMP, M_WAITOK); else bits = smallbits; - error = copyin(SCARG(uap, fds), bits, ni); + error = copyin(uap->fds, bits, ni); if (error) goto done; - if (SCARG(uap, timeout) != INFTIM) { - atv.tv_sec = SCARG(uap, timeout) / 1000; - atv.tv_usec = (SCARG(uap, timeout) % 1000) * 1000; + if (uap->timeout != INFTIM) { + atv.tv_sec = uap->timeout / 1000; + atv.tv_usec = (uap->timeout % 1000) * 1000; if (itimerfix(&atv)) { error = EINVAL; goto done; @@ -870,7 +870,7 @@ done: if (error == EWOULDBLOCK) error = 0; if (error == 0) { - error = copyout(bits, SCARG(uap, fds), ni); + error = copyout(bits, uap->fds, ni); if (error) goto out; } diff --git a/sys/kern/vfs_syscalls.c b/sys/kern/vfs_syscalls.c index c00784aa10..5e24540f5b 100644 --- a/sys/kern/vfs_syscalls.c +++ b/sys/kern/vfs_syscalls.c @@ -37,7 +37,7 @@ * * @(#)vfs_syscalls.c 8.13 (Berkeley) 4/15/94 * $FreeBSD: src/sys/kern/vfs_syscalls.c,v 1.151.2.18 2003/04/04 20:35:58 tegge Exp $ - * $DragonFly: src/sys/kern/vfs_syscalls.c,v 1.59 2005/03/22 22:13:28 dillon Exp $ + * $DragonFly: src/sys/kern/vfs_syscalls.c,v 1.60 2005/03/29 00:35:55 drhodus Exp $ */ #include @@ -124,7 +124,7 @@ mount(struct mount_args *uap) /* * Do not allow NFS export by non-root users. */ - if (SCARG(uap, flags) & MNT_EXPORTED) { + if (uap->flags & MNT_EXPORTED) { error = suser(td); if (error) return (error); @@ -133,7 +133,7 @@ mount(struct mount_args *uap) * Silently enforce MNT_NOSUID and MNT_NODEV for non-root users */ if (suser(td)) - SCARG(uap, flags) |= MNT_NOSUID | MNT_NODEV; + uap->flags |= MNT_NOSUID | MNT_NODEV; /* * Lookup the requested path and extract the ncp and vnode. @@ -170,7 +170,7 @@ mount(struct mount_args *uap) /* * Now we have an unlocked ref'd ncp and a locked ref'd vp */ - if (SCARG(uap, flags) & MNT_UPDATE) { + if (uap->flags & MNT_UPDATE) { if ((vp->v_flag & VROOT) == 0) { cache_drop(ncp); vput(vp); @@ -183,7 +183,7 @@ mount(struct mount_args *uap) * We only allow the filesystem to be reloaded if it * is currently mounted read-only. */ - if ((SCARG(uap, flags) & MNT_RELOAD) && + if ((uap->flags & MNT_RELOAD) && ((mp->mnt_flag & MNT_RDONLY) == 0)) { cache_drop(ncp); vput(vp); @@ -213,7 +213,7 @@ mount(struct mount_args *uap) } vp->v_flag |= VMOUNT; mp->mnt_flag |= - SCARG(uap, flags) & (MNT_RELOAD | MNT_FORCE | MNT_UPDATE); + uap->flags & (MNT_RELOAD | MNT_FORCE | MNT_UPDATE); VOP_UNLOCK(vp, 0, td); goto update; } @@ -238,7 +238,7 @@ mount(struct mount_args *uap) vput(vp); return (ENOTDIR); } - if ((error = copyinstr(SCARG(uap, type), fstypename, MFSNAMELEN, NULL)) != 0) { + if ((error = copyinstr(uap->type, fstypename, MFSNAMELEN, NULL)) != 0) { cache_drop(ncp); vput(vp); return (error); @@ -310,7 +310,7 @@ update: /* * Set the mount level flags. */ - if (SCARG(uap, flags) & MNT_RDONLY) + if (uap->flags & MNT_RDONLY) mp->mnt_flag |= MNT_RDONLY; else if (mp->mnt_flag & MNT_RDONLY) mp->mnt_kern_flag |= MNTK_WANTRDWR; @@ -318,7 +318,7 @@ update: MNT_SYNCHRONOUS | MNT_UNION | MNT_ASYNC | MNT_NOATIME | MNT_NOSYMFOLLOW | MNT_IGNORE | MNT_NOCLUSTERR | MNT_NOCLUSTERW | MNT_SUIDDIR); - mp->mnt_flag |= SCARG(uap, flags) & (MNT_NOSUID | MNT_NOEXEC | + mp->mnt_flag |= uap->flags & (MNT_NOSUID | MNT_NOEXEC | MNT_NODEV | MNT_SYNCHRONOUS | MNT_UNION | MNT_ASYNC | MNT_FORCE | MNT_NOSYMFOLLOW | MNT_IGNORE | MNT_NOATIME | MNT_NOCLUSTERR | MNT_NOCLUSTERW | MNT_SUIDDIR); @@ -327,7 +327,7 @@ update: * XXX The final recipients of VFS_MOUNT just overwrite the ndp they * get. */ - error = VFS_MOUNT(mp, SCARG(uap, path), SCARG(uap, data), td); + error = VFS_MOUNT(mp, uap->path, uap->data, td); if (mp->mnt_flag & MNT_UPDATE) { if (mp->mnt_kern_flag & MNTK_WANTRDWR) mp->mnt_flag &= ~MNT_RDONLY; @@ -468,7 +468,7 @@ unmount(struct unmount_args *uap) return (error); vp = NULL; - error = nlookup_init(&nd, SCARG(uap, path), UIO_USERSPACE, NLC_FOLLOW); + error = nlookup_init(&nd, uap->path, UIO_USERSPACE, NLC_FOLLOW); if (error == 0) error = nlookup(&nd); if (error == 0) @@ -505,7 +505,7 @@ unmount(struct unmount_args *uap) return (EINVAL); } vput(vp); - return (dounmount(mp, SCARG(uap, flags), td)); + return (dounmount(mp, uap->flags, td)); } /* @@ -669,13 +669,13 @@ quotactl(struct quotactl_args *uap) if (p->p_ucred->cr_prison && !prison_quotas) return (EPERM); - error = nlookup_init(&nd, SCARG(uap, path), UIO_USERSPACE, NLC_FOLLOW); + error = nlookup_init(&nd, uap->path, UIO_USERSPACE, NLC_FOLLOW); if (error == 0) error = nlookup(&nd); if (error == 0) { mp = nd.nl_ncp->nc_mount; - error = VFS_QUOTACTL(mp, SCARG(uap, cmd), SCARG(uap, uid), - SCARG(uap, arg), nd.nl_td); + error = VFS_QUOTACTL(mp, uap->cmd, uap->uid, + uap->arg, nd.nl_td); } nlookup_done(&nd); return (error); @@ -1023,7 +1023,7 @@ fchdir(struct fchdir_args *uap) struct namecache *nct; int error; - if ((error = getvnode(fdp, SCARG(uap, fd), &fp)) != 0) + if ((error = getvnode(fdp, uap->fd, &fp)) != 0) return (error); vp = (struct vnode *)fp->f_data; vref(vp); @@ -1691,7 +1691,7 @@ undelete(struct undelete_args *uap) struct nlookupdata nd; int error; - error = nlookup_init(&nd, SCARG(uap, path), UIO_USERSPACE, 0); + error = nlookup_init(&nd, uap->path, UIO_USERSPACE, 0); bwillwrite(); nd.nl_flags |= NLC_DELETE; if (error == 0) @@ -1965,7 +1965,7 @@ nstat(struct nstat_args *uap) int error; vp = NULL; - error = nlookup_init(&nd, SCARG(uap, path), UIO_USERSPACE, NLC_FOLLOW); + error = nlookup_init(&nd, uap->path, UIO_USERSPACE, NLC_FOLLOW); if (error == 0) error = nlookup(&nd); if (error == 0) @@ -1976,7 +1976,7 @@ nstat(struct nstat_args *uap) vput(vp); if (error == 0) { cvtnstat(&sb, &nsb); - error = copyout(&nsb, SCARG(uap, ub), sizeof(nsb)); + error = copyout(&nsb, uap->ub, sizeof(nsb)); } } return (error); @@ -1999,7 +1999,7 @@ nlstat(struct nlstat_args *uap) int error; vp = NULL; - error = nlookup_init(&nd, SCARG(uap, path), UIO_USERSPACE, 0); + error = nlookup_init(&nd, uap->path, UIO_USERSPACE, 0); if (error == 0) error = nlookup(&nd); if (error == 0) @@ -2010,7 +2010,7 @@ nlstat(struct nlstat_args *uap) vput(vp); if (error == 0) { cvtnstat(&sb, &nsb); - error = copyout(&nsb, SCARG(uap, ub), sizeof(nsb)); + error = copyout(&nsb, uap->ub, sizeof(nsb)); } } return (error); @@ -2030,14 +2030,14 @@ pathconf(struct pathconf_args *uap) int error; vp = NULL; - error = nlookup_init(&nd, SCARG(uap, path), UIO_USERSPACE, NLC_FOLLOW); + error = nlookup_init(&nd, uap->path, UIO_USERSPACE, NLC_FOLLOW); if (error == 0) error = nlookup(&nd); if (error == 0) error = cache_vget(nd.nl_ncp, nd.nl_cred, LK_EXCLUSIVE, &vp); nlookup_done(&nd); if (error == 0) { - error = VOP_PATHCONF(vp, SCARG(uap, name), uap->sysmsg_fds); + error = VOP_PATHCONF(vp, uap->name, uap->sysmsg_fds); vput(vp); } return (error); @@ -2148,7 +2148,7 @@ chflags(struct chflags_args *uap) int error; vp = NULL; - error = nlookup_init(&nd, SCARG(uap, path), UIO_USERSPACE, NLC_FOLLOW); + error = nlookup_init(&nd, uap->path, UIO_USERSPACE, NLC_FOLLOW); /* XXX Add NLC flag indicating modifying operation? */ if (error == 0) error = nlookup(&nd); @@ -2156,7 +2156,7 @@ chflags(struct chflags_args *uap) error = cache_vref(nd.nl_ncp, nd.nl_cred, &vp); nlookup_done(&nd); if (error == 0) { - error = setfflags(vp, SCARG(uap, flags)); + error = setfflags(vp, uap->flags); vrele(vp); } return (error); @@ -2176,9 +2176,9 @@ fchflags(struct fchflags_args *uap) struct file *fp; int error; - if ((error = getvnode(p->p_fd, SCARG(uap, fd), &fp)) != 0) + if ((error = getvnode(p->p_fd, uap->fd, &fp)) != 0) return (error); - return setfflags((struct vnode *) fp->f_data, SCARG(uap, flags)); + return setfflags((struct vnode *) fp->f_data, uap->flags); } static int @@ -2271,9 +2271,9 @@ fchmod(struct fchmod_args *uap) struct file *fp; int error; - if ((error = getvnode(p->p_fd, SCARG(uap, fd), &fp)) != 0) + if ((error = getvnode(p->p_fd, uap->fd, &fp)) != 0) return (error); - return setfmode((struct vnode *)fp->f_data, SCARG(uap, mode)); + return setfmode((struct vnode *)fp->f_data, uap->mode); } static int @@ -2365,10 +2365,10 @@ fchown(struct fchown_args *uap) struct file *fp; int error; - if ((error = getvnode(p->p_fd, SCARG(uap, fd), &fp)) != 0) + if ((error = getvnode(p->p_fd, uap->fd, &fp)) != 0) return (error); return setfown((struct vnode *)fp->f_data, - SCARG(uap, uid), SCARG(uap, gid)); + uap->uid, uap->gid); } static int @@ -2630,7 +2630,7 @@ fsync(struct fsync_args *uap) vm_object_t obj; int error; - if ((error = getvnode(p->p_fd, SCARG(uap, fd), &fp)) != 0) + if ((error = getvnode(p->p_fd, uap->fd, &fp)) != 0) return (error); vp = (struct vnode *)fp->f_data; vn_lock(vp, LK_EXCLUSIVE | LK_RETRY, td); @@ -2986,7 +2986,7 @@ umask(struct umask_args *uap) fdp = p->p_fd; uap->sysmsg_result = fdp->fd_cmask; - fdp->fd_cmask = SCARG(uap, newmask) & ALLPERMS; + fdp->fd_cmask = uap->newmask & ALLPERMS; return (0); } @@ -3008,7 +3008,7 @@ revoke(struct revoke_args *uap) int error; vp = NULL; - error = nlookup_init(&nd, SCARG(uap, path), UIO_USERSPACE, NLC_FOLLOW); + error = nlookup_init(&nd, uap->path, UIO_USERSPACE, NLC_FOLLOW); if (error == 0) error = nlookup(&nd); if (error == 0) @@ -3121,11 +3121,11 @@ fhopen(struct fhopen_args *uap) if (error) return (error); - fmode = FFLAGS(SCARG(uap, flags)); + fmode = FFLAGS(uap->flags); /* why not allow a non-read/write open for our lockd? */ if (((fmode & (FREAD | FWRITE)) == 0) || (fmode & O_CREAT)) return (EINVAL); - error = copyin(SCARG(uap,u_fhp), &fhp, sizeof(fhp)); + error = copyin(uap->u_fhp, &fhp, sizeof(fhp)); if (error) return(error); /* find the mount point */ @@ -3307,7 +3307,7 @@ fhstat(struct fhstat_args *uap) if (error) return (error); - error = copyin(SCARG(uap, u_fhp), &fh, sizeof(fhandle_t)); + error = copyin(uap->u_fhp, &fh, sizeof(fhandle_t)); if (error) return (error); @@ -3319,7 +3319,7 @@ fhstat(struct fhstat_args *uap) vput(vp); if (error) return (error); - error = copyout(&sb, SCARG(uap, sb), sizeof(sb)); + error = copyout(&sb, uap->sb, sizeof(sb)); return (error); } @@ -3345,7 +3345,7 @@ fhstatfs(struct fhstatfs_args *uap) if ((error = suser(td))) return (error); - if ((error = copyin(SCARG(uap, u_fhp), &fh, sizeof(fhandle_t))) != 0) + if ((error = copyin(uap->u_fhp, &fh, sizeof(fhandle_t))) != 0) return (error); if ((mp = vfs_getvfs(&fh.fh_fsid)) == NULL) @@ -3376,7 +3376,7 @@ fhstatfs(struct fhstatfs_args *uap) sb.f_fsid.val[0] = sb.f_fsid.val[1] = 0; sp = &sb; } - return (copyout(sp, SCARG(uap, buf), sizeof(*sp))); + return (copyout(sp, uap->buf, sizeof(*sp))); } /* @@ -3404,8 +3404,8 @@ extattrctl(struct extattrctl_args *uap) error = nlookup(&nd); if (error == 0) { mp = nd.nl_ncp->nc_mount; - error = VFS_EXTATTRCTL(mp, SCARG(uap, cmd), - SCARG(uap, attrname), SCARG(uap, arg), + error = VFS_EXTATTRCTL(mp, uap->cmd, + uap->attrname, uap->arg, nd.nl_td); } nlookup_done(&nd); @@ -3433,7 +3433,7 @@ extattr_set_file(struct extattr_set_file_args *uap) int error; int i; - error = copyin(SCARG(uap, attrname), attrname, EXTATTR_MAXNAMELEN); + error = copyin(uap->attrname, attrname, EXTATTR_MAXNAMELEN); if (error) return (error); @@ -3510,7 +3510,7 @@ extattr_get_file(struct extattr_get_file_args *uap) int error; int i; - error = copyin(SCARG(uap, attrname), attrname, EXTATTR_MAXNAMELEN); + error = copyin(uap->attrname, attrname, EXTATTR_MAXNAMELEN); if (error) return (error); @@ -3578,7 +3578,7 @@ extattr_delete_file(struct extattr_delete_file_args *uap) struct vnode *vp; int error; - error = copyin(SCARG(uap, attrname), attrname, EXTATTR_MAXNAMELEN); + error = copyin(uap->attrname, attrname, EXTATTR_MAXNAMELEN); if (error) return(error);