kern_mib.c (242b24828472137ec4411826b86e753d49bd2c39) | kern_mib.c (53dc58f2dc1d59aeba38407f997fdfbaffcffd45) |
---|---|
1/*- 2 * Copyright (c) 1982, 1986, 1989, 1993 3 * The Regents of the University of California. All rights reserved. 4 * 5 * This code is derived from software contributed to Berkeley by 6 * Mike Karels at Berkeley Software Design, Inc. 7 * 8 * Quite extensively rewritten by Poul-Henning Kamp of the FreeBSD --- 121 unchanged lines hidden (view full) --- 130 SYSCTL_NULL_INT_PTR, 1, "Whether saved set-group/user ID is available"); 131#else 132SYSCTL_INT(_kern, KERN_SAVED_IDS, saved_ids, CTLFLAG_RD|CTLFLAG_CAPRD, 133 SYSCTL_NULL_INT_PTR, 0, "Whether saved set-group/user ID is available"); 134#endif 135 136char kernelname[MAXPATHLEN] = "/kernel"; /* XXX bloat */ 137 | 1/*- 2 * Copyright (c) 1982, 1986, 1989, 1993 3 * The Regents of the University of California. All rights reserved. 4 * 5 * This code is derived from software contributed to Berkeley by 6 * Mike Karels at Berkeley Software Design, Inc. 7 * 8 * Quite extensively rewritten by Poul-Henning Kamp of the FreeBSD --- 121 unchanged lines hidden (view full) --- 130 SYSCTL_NULL_INT_PTR, 1, "Whether saved set-group/user ID is available"); 131#else 132SYSCTL_INT(_kern, KERN_SAVED_IDS, saved_ids, CTLFLAG_RD|CTLFLAG_CAPRD, 133 SYSCTL_NULL_INT_PTR, 0, "Whether saved set-group/user ID is available"); 134#endif 135 136char kernelname[MAXPATHLEN] = "/kernel"; /* XXX bloat */ 137 |
138SYSCTL_STRING(_kern, KERN_BOOTFILE, bootfile, CTLFLAG_RW, | 138SYSCTL_STRING(_kern, KERN_BOOTFILE, bootfile, CTLFLAG_RW | CTLFLAG_MPSAFE, |
139 kernelname, sizeof kernelname, "Name of kernel file booted"); 140 141SYSCTL_INT(_kern, KERN_MAXPHYS, maxphys, CTLFLAG_RD | CTLFLAG_CAPRD, 142 SYSCTL_NULL_INT_PTR, MAXPHYS, "Maximum block I/O access size"); 143 144SYSCTL_INT(_hw, HW_NCPU, ncpu, CTLFLAG_RD|CTLFLAG_CAPRD, 145 &mp_ncpus, 0, "Number of active CPUs"); 146 --- 105 unchanged lines hidden (view full) --- 252 if ((req->flags & SCTL_MASK32) != 0 && adaptive_machine_arch) 253 error = SYSCTL_OUT(req, machine_arch32, sizeof(machine_arch32)); 254 else 255#endif 256 error = SYSCTL_OUT(req, machine_arch, sizeof(machine_arch)); 257 return (error); 258 259} | 139 kernelname, sizeof kernelname, "Name of kernel file booted"); 140 141SYSCTL_INT(_kern, KERN_MAXPHYS, maxphys, CTLFLAG_RD | CTLFLAG_CAPRD, 142 SYSCTL_NULL_INT_PTR, MAXPHYS, "Maximum block I/O access size"); 143 144SYSCTL_INT(_hw, HW_NCPU, ncpu, CTLFLAG_RD|CTLFLAG_CAPRD, 145 &mp_ncpus, 0, "Number of active CPUs"); 146 --- 105 unchanged lines hidden (view full) --- 252 if ((req->flags & SCTL_MASK32) != 0 && adaptive_machine_arch) 253 error = SYSCTL_OUT(req, machine_arch32, sizeof(machine_arch32)); 254 else 255#endif 256 error = SYSCTL_OUT(req, machine_arch, sizeof(machine_arch)); 257 return (error); 258 259} |
260SYSCTL_PROC(_hw, HW_MACHINE_ARCH, machine_arch, CTLTYPE_STRING | CTLFLAG_RD, 261 NULL, 0, sysctl_hw_machine_arch, "A", "System architecture"); | 260SYSCTL_PROC(_hw, HW_MACHINE_ARCH, machine_arch, CTLTYPE_STRING | CTLFLAG_RD | 261 CTLFLAG_MPSAFE, NULL, 0, sysctl_hw_machine_arch, "A", 262 "System architecture"); |
262 263SYSCTL_STRING(_kern, OID_AUTO, supported_archs, CTLFLAG_RD | CTLFLAG_MPSAFE, 264#ifdef COMPAT_FREEBSD32 265 MACHINE_ARCH " " MACHINE_ARCH32, 0, "Supported architectures for binaries"); 266#else 267 MACHINE_ARCH, 0, "Supported architectures for binaries"); 268#endif 269 --- 111 unchanged lines hidden (view full) --- 381SYSCTL_PROC(_kern, KERN_SECURELVL, securelevel, 382 CTLTYPE_INT|CTLFLAG_RW|CTLFLAG_PRISON, 0, 0, sysctl_kern_securelvl, 383 "I", "Current secure level"); 384 385#ifdef INCLUDE_CONFIG_FILE 386/* Actual kernel configuration options. */ 387extern char kernconfstring[]; 388 | 263 264SYSCTL_STRING(_kern, OID_AUTO, supported_archs, CTLFLAG_RD | CTLFLAG_MPSAFE, 265#ifdef COMPAT_FREEBSD32 266 MACHINE_ARCH " " MACHINE_ARCH32, 0, "Supported architectures for binaries"); 267#else 268 MACHINE_ARCH, 0, "Supported architectures for binaries"); 269#endif 270 --- 111 unchanged lines hidden (view full) --- 382SYSCTL_PROC(_kern, KERN_SECURELVL, securelevel, 383 CTLTYPE_INT|CTLFLAG_RW|CTLFLAG_PRISON, 0, 0, sysctl_kern_securelvl, 384 "I", "Current secure level"); 385 386#ifdef INCLUDE_CONFIG_FILE 387/* Actual kernel configuration options. */ 388extern char kernconfstring[]; 389 |
389SYSCTL_STRING(_kern, OID_AUTO, conftxt, CTLFLAG_RD, kernconfstring, 0, 390 "Kernel configuration file"); | 390SYSCTL_STRING(_kern, OID_AUTO, conftxt, CTLFLAG_RD | CTLFLAG_MPSAFE, 391 kernconfstring, 0, "Kernel configuration file"); |
391#endif 392 393static int 394sysctl_hostid(SYSCTL_HANDLER_ARGS) 395{ 396 struct prison *pr, *cpr; 397 u_long tmpid; 398 int descend, error; --- 198 unchanged lines hidden --- | 392#endif 393 394static int 395sysctl_hostid(SYSCTL_HANDLER_ARGS) 396{ 397 struct prison *pr, *cpr; 398 u_long tmpid; 399 int descend, error; --- 198 unchanged lines hidden --- |