diff options
author | Alfred Perlstein <alfred@FreeBSD.org> | 2002-12-14 01:56:26 +0000 |
---|---|---|
committer | Alfred Perlstein <alfred@FreeBSD.org> | 2002-12-14 01:56:26 +0000 |
commit | d1e405c5ce42fef2970847769c8017b952b5d318 (patch) | |
tree | f2f1c63d7a3acfeb3493534ac55908632c5769ee /sys/kern/kern_linker.c | |
parent | 0db138a6b0df9d7ae412c29a0d3ed4fa094d01ed (diff) | |
download | src-d1e405c5ce42fef2970847769c8017b952b5d318.tar.gz src-d1e405c5ce42fef2970847769c8017b952b5d318.zip |
SCARGS removal take II.
Notes
Notes:
svn path=/head/; revision=107849
Diffstat (limited to 'sys/kern/kern_linker.c')
-rw-r--r-- | sys/kern/kern_linker.c | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/sys/kern/kern_linker.c b/sys/kern/kern_linker.c index eab20b115fc0..f387959b979e 100644 --- a/sys/kern/kern_linker.c +++ b/sys/kern/kern_linker.c @@ -754,7 +754,7 @@ kldload(struct thread *td, struct kldload_args *uap) goto out; pathname = malloc(MAXPATHLEN, M_TEMP, M_WAITOK); - if ((error = copyinstr(SCARG(uap, file), pathname, MAXPATHLEN, + if ((error = copyinstr(uap->file, pathname, MAXPATHLEN, NULL)) != 0) goto out; @@ -800,7 +800,7 @@ kldunload(struct thread *td, struct kldunload_args *uap) if ((error = suser(td)) != 0) goto out; - 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) { @@ -841,7 +841,7 @@ kldfind(struct thread *td, struct kldfind_args *uap) td->td_retval[0] = -1; pathname = malloc(MAXPATHLEN, M_TEMP, M_WAITOK); - if ((error = copyinstr(SCARG(uap, file), pathname, MAXPATHLEN, + if ((error = copyinstr(uap->file, pathname, MAXPATHLEN, NULL)) != 0) goto out; @@ -875,7 +875,7 @@ kldnext(struct thread *td, struct kldnext_args *uap) mtx_lock(&Giant); - if (SCARG(uap, fileid) == 0) { + if (uap->fileid == 0) { mtx_lock(&kld_mtx); if (TAILQ_FIRST(&linker_files)) td->td_retval[0] = TAILQ_FIRST(&linker_files)->id; @@ -884,7 +884,7 @@ kldnext(struct thread *td, struct kldnext_args *uap) mtx_unlock(&kld_mtx); goto out; } - lf = linker_find_file_by_id(SCARG(uap, fileid)); + lf = linker_find_file_by_id(uap->fileid); if (lf) { if (TAILQ_NEXT(lf, link)) td->td_retval[0] = TAILQ_NEXT(lf, link)->id; @@ -916,12 +916,12 @@ kldstat(struct thread *td, struct kldstat_args *uap) mtx_lock(&Giant); - lf = linker_find_file_by_id(SCARG(uap, fileid)); + lf = linker_find_file_by_id(uap->fileid); if (lf == NULL) { error = ENOENT; goto out; } - stat = SCARG(uap, stat); + stat = uap->stat; /* * Check the version of the user's structure. @@ -970,7 +970,7 @@ kldfirstmod(struct thread *td, struct kldfirstmod_args *uap) #endif mtx_lock(&Giant); - lf = linker_find_file_by_id(SCARG(uap, fileid)); + lf = linker_find_file_by_id(uap->fileid); if (lf) { MOD_SLOCK; mp = TAILQ_FIRST(&lf->modules); @@ -1006,18 +1006,18 @@ kldsym(struct thread *td, struct kldsym_args *uap) mtx_lock(&Giant); - 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) { + uap->cmd != KLDSYM_LOOKUP) { error = EINVAL; goto out; } symstr = malloc(MAXPATHLEN, M_TEMP, M_WAITOK); 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; @@ -1026,7 +1026,7 @@ kldsym(struct thread *td, struct kldsym_args *uap) LINKER_SYMBOL_VALUES(lf, sym, &symval) == 0) { lookup.symvalue = (uintptr_t) symval.value; lookup.symsize = symval.size; - error = copyout(&lookup, SCARG(uap, data), + error = copyout(&lookup, uap->data, sizeof(lookup)); } else error = ENOENT; @@ -1037,7 +1037,7 @@ kldsym(struct thread *td, struct kldsym_args *uap) LINKER_SYMBOL_VALUES(lf, sym, &symval) == 0) { lookup.symvalue = (uintptr_t)symval.value; lookup.symsize = symval.size; - error = copyout(&lookup, SCARG(uap, data), + error = copyout(&lookup, uap->data, sizeof(lookup)); break; } |