diff options
| author | Peter Wemm <peter@FreeBSD.org> | 2004-10-11 22:04:16 +0000 |
|---|---|---|
| committer | Peter Wemm <peter@FreeBSD.org> | 2004-10-11 22:04:16 +0000 |
| commit | a7bc3102c474e06cee479c0474f8815bd54bf994 (patch) | |
| tree | 1829b174800facf808eb5d32c6e9b155f798a0f6 /sys/compat | |
| parent | 731239920fb7702a4710c231d842457bb77bf069 (diff) | |
Notes
Diffstat (limited to 'sys/compat')
| -rw-r--r-- | sys/compat/freebsd32/freebsd32_misc.c | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/sys/compat/freebsd32/freebsd32_misc.c b/sys/compat/freebsd32/freebsd32_misc.c index b78f552dbff52..0326242ecd2e5 100644 --- a/sys/compat/freebsd32/freebsd32_misc.c +++ b/sys/compat/freebsd32/freebsd32_misc.c @@ -1203,25 +1203,21 @@ freebsd32_sysctl(struct thread *td, struct freebsd32_sysctl_args *uap) if (uap->namelen > CTL_MAXNAME || uap->namelen < 2) return (EINVAL); - - error = copyin(uap->name, &name, uap->namelen * sizeof(int)); + error = copyin(uap->name, name, uap->namelen * sizeof(int)); if (error) return (error); - mtx_lock(&Giant); - if (uap->oldlenp) oldlen = fuword32(uap->oldlenp); else oldlen = 0; error = userland_sysctl(td, name, uap->namelen, uap->old, &oldlen, 1, - uap->new, uap->newlen, &j); + uap->new, uap->newlen, &j, SCTL_MASK32); if (error && error != ENOMEM) goto done2; - if (uap->oldlenp) { + if (uap->oldlenp) suword32(uap->oldlenp, j); - } done2: mtx_unlock(&Giant); return (error); |
