diff options
Diffstat (limited to 'sys/kern/kern_sysctl.c')
-rw-r--r-- | sys/kern/kern_sysctl.c | 38 |
1 files changed, 4 insertions, 34 deletions
diff --git a/sys/kern/kern_sysctl.c b/sys/kern/kern_sysctl.c index b43c4ee..55e583b 100644 --- a/sys/kern/kern_sysctl.c +++ b/sys/kern/kern_sysctl.c @@ -37,7 +37,7 @@ * SUCH DAMAGE. * * @(#)kern_sysctl.c 8.4 (Berkeley) 4/14/94 - * $Id: kern_sysctl.c,v 1.79 1998/12/04 22:54:51 archie Exp $ + * $Id: kern_sysctl.c,v 1.80 1998/12/13 07:18:54 truckman Exp $ */ #include "opt_compat.h" @@ -497,7 +497,7 @@ SYSCTL_NODE(_sysctl, 4, oidfmt, CTLFLAG_RD, sysctl_sysctl_oidfmt, ""); */ /* - * Handle an integer, signed or unsigned. + * Handle an int, signed or unsigned. * Two cases: * a variable: point arg1 at it. * a constant: pass it in arg2. @@ -524,7 +524,7 @@ sysctl_handle_int SYSCTL_HANDLER_ARGS } /* - * Handle an integer, signed or unsigned. + * Handle a long, signed or unsigned. * Two cases: * a variable: point arg1 at it. * a constant: pass it in arg2. @@ -535,10 +535,7 @@ sysctl_handle_long SYSCTL_HANDLER_ARGS { int error = 0; - if (arg1) - error = SYSCTL_OUT(req, arg1, sizeof(long)); - else - error = SYSCTL_OUT(req, &arg2, sizeof(long)); + error = SYSCTL_OUT(req, arg1, sizeof(long)); if (error || !req->newptr) return (error); @@ -551,33 +548,6 @@ sysctl_handle_long SYSCTL_HANDLER_ARGS } /* - * Handle an integer, signed or unsigned. - * Two cases: - * a variable: point arg1 at it. - * a constant: pass it in arg2. - */ - -int -sysctl_handle_intptr SYSCTL_HANDLER_ARGS -{ - int error = 0; - - if (arg1) - error = SYSCTL_OUT(req, arg1, sizeof(intptr_t)); - else - error = SYSCTL_OUT(req, &arg2, sizeof(intptr_t)); - - if (error || !req->newptr) - return (error); - - if (!arg1) - error = EPERM; - else - error = SYSCTL_IN(req, arg1, sizeof(intptr_t)); - return (error); -} - -/* * Handle our generic '\0' terminated 'C' string. * Two cases: * a variable string: point arg1 at it, arg2 is max length. |