diff options
author | rwatson <rwatson@FreeBSD.org> | 2001-11-08 15:31:19 +0000 |
---|---|---|
committer | rwatson <rwatson@FreeBSD.org> | 2001-11-08 15:31:19 +0000 |
commit | 5d0ec904c031d528ea6d0da2ef6cb0a63db9f55a (patch) | |
tree | 078d3fced065d4dec3208e99fb8d97166436cf0a /sys/kern/kern_mib.c | |
parent | 2a6a10923a7b377899f5c9b08e23a53ddee36e46 (diff) | |
download | FreeBSD-src-5d0ec904c031d528ea6d0da2ef6cb0a63db9f55a.zip FreeBSD-src-5d0ec904c031d528ea6d0da2ef6cb0a63db9f55a.tar.gz |
o General style improvemnts.
Submitted by: bde
Diffstat (limited to 'sys/kern/kern_mib.c')
-rw-r--r-- | sys/kern/kern_mib.c | 21 |
1 files changed, 11 insertions, 10 deletions
diff --git a/sys/kern/kern_mib.c b/sys/kern/kern_mib.c index 1aacd19..9007922 100644 --- a/sys/kern/kern_mib.c +++ b/sys/kern/kern_mib.c @@ -41,6 +41,7 @@ */ #include "opt_global.h" +#include "opt_posix.h" #include <sys/param.h> #include <sys/kernel.h> @@ -75,6 +76,10 @@ SYSCTL_NODE(, CTL_P1003_1B, p1003_1b, CTLFLAG_RW, 0, SYSCTL_NODE(, OID_AUTO, compat, CTLFLAG_RW, 0, "Compatibility code"); +#ifdef REGRESSION +SYSCTL_NODE(, OID_AUTO, regression, CTLFLAG_RW, 0, + "Regression test MIB"); +#endif SYSCTL_STRING(_kern, KERN_OSRELEASE, osrelease, CTLFLAG_RD, osrelease, 0, "Operating system type"); @@ -144,10 +149,6 @@ static char machine_arch[] = MACHINE_ARCH; SYSCTL_STRING(_hw, HW_MACHINE_ARCH, machine_arch, CTLFLAG_RD, machine_arch, 0, "System architecture"); -#ifdef REGRESSION -SYSCTL_NODE(, OID_AUTO, regression, CTLFLAG_RW, 0, "Regression test MIB"); -#endif /* !REGRESSION */ - char hostname[MAXHOSTNAMELEN]; static int @@ -157,7 +158,7 @@ sysctl_hostname(SYSCTL_HANDLER_ARGS) if (jailed(req->td->td_proc->p_ucred)) { if (!jail_set_hostname_allowed && req->newptr) - return(EPERM); + return (EPERM); error = sysctl_handle_string(oidp, req->td->td_proc->p_ucred->cr_prison->pr_host, sizeof req->td->td_proc->p_ucred->cr_prison->pr_host, req); @@ -172,11 +173,11 @@ SYSCTL_PROC(_kern, KERN_HOSTNAME, hostname, 0, 0, sysctl_hostname, "A", "Hostname"); #ifdef REGRESSION -int regression_securelevel_nonmonotonic=0; +static int regression_securelevel_nonmonotonic = 0; SYSCTL_INT(_regression, OID_AUTO, securelevel_nonmonotonic, CTLFLAG_RW, ®ression_securelevel_nonmonotonic, 0, "securelevel may be lowered"); -#endif /* !REGRESSION */ +#endif int securelevel = -1; @@ -206,14 +207,14 @@ sysctl_kern_securelvl(SYSCTL_HANDLER_ARGS) if (pr != NULL) { #ifdef REGRESSION if (!regression_securelevel_nonmonotonic) -#endif /* !REGRESSION */ +#endif if (level < imax(securelevel, pr->pr_securelevel)) return (EPERM); pr->pr_securelevel = level; } else { #ifdef REGRESSION if (!regression_securelevel_nonmonotonic) -#endif /* !REGRESSION */ +#endif if (level < securelevel) return (EPERM); securelevel = level; @@ -229,7 +230,7 @@ char domainname[MAXHOSTNAMELEN]; SYSCTL_STRING(_kern, KERN_NISDOMAINNAME, domainname, CTLFLAG_RW, &domainname, sizeof(domainname), "Name of the current YP/NIS domain"); -unsigned long hostid; +u_long hostid; SYSCTL_ULONG(_kern, KERN_HOSTID, hostid, CTLFLAG_RW, &hostid, 0, "Host ID"); /* |