summaryrefslogtreecommitdiffstats
path: root/sys/kern/kern_linker.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/kern/kern_linker.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/kern/kern_linker.c')
-rw-r--r--sys/kern/kern_linker.c28
1 files changed, 14 insertions, 14 deletions
diff --git a/sys/kern/kern_linker.c b/sys/kern/kern_linker.c
index f387959..eab20b1 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(uap->file, pathname, MAXPATHLEN,
+ if ((error = copyinstr(SCARG(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(uap->fileid);
+ lf = linker_find_file_by_id(SCARG(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(uap->file, pathname, MAXPATHLEN,
+ if ((error = copyinstr(SCARG(uap, file), pathname, MAXPATHLEN,
NULL)) != 0)
goto out;
@@ -875,7 +875,7 @@ kldnext(struct thread *td, struct kldnext_args *uap)
mtx_lock(&Giant);
- if (uap->fileid == 0) {
+ if (SCARG(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(uap->fileid);
+ lf = linker_find_file_by_id(SCARG(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(uap->fileid);
+ lf = linker_find_file_by_id(SCARG(uap, fileid));
if (lf == NULL) {
error = ENOENT;
goto out;
}
- stat = uap->stat;
+ stat = SCARG(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(uap->fileid);
+ lf = linker_find_file_by_id(SCARG(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(uap->data, &lookup, sizeof(lookup))) != 0)
+ if ((error = copyin(SCARG(uap, data), &lookup, sizeof(lookup))) != 0)
goto out;
if (lookup.version != sizeof(lookup) ||
- uap->cmd != KLDSYM_LOOKUP) {
+ SCARG(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 (uap->fileid != 0) {
- lf = linker_find_file_by_id(uap->fileid);
+ if (SCARG(uap, fileid) != 0) {
+ lf = linker_find_file_by_id(SCARG(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, uap->data,
+ error = copyout(&lookup, SCARG(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, uap->data,
+ error = copyout(&lookup, SCARG(uap, data),
sizeof(lookup));
break;
}
OpenPOWER on IntegriCloud