kern_mib.c (e477abf734cc777a55286bfbd6b80a6760c96acf) kern_mib.c (d06cadae1ea2efc587b4ccde9ef433b14aa74a64)
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

--- 127 unchanged lines hidden (view full) ---

136 0, 1, "Whether saved set-group/user ID is available");
137#else
138SYSCTL_INT(_kern, KERN_SAVED_IDS, saved_ids, CTLFLAG_RD|CTLFLAG_CAPRD,
139 0, 0, "Whether saved set-group/user ID is available");
140#endif
141
142char kernelname[MAXPATHLEN] = "/kernel"; /* XXX bloat */
143
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

--- 127 unchanged lines hidden (view full) ---

136 0, 1, "Whether saved set-group/user ID is available");
137#else
138SYSCTL_INT(_kern, KERN_SAVED_IDS, saved_ids, CTLFLAG_RD|CTLFLAG_CAPRD,
139 0, 0, "Whether saved set-group/user ID is available");
140#endif
141
142char kernelname[MAXPATHLEN] = "/kernel"; /* XXX bloat */
143
144SYSCTL_STRING(_kern, KERN_BOOTFILE, bootfile, CTLFLAG_RW,
144SYSCTL_STRING(_kern, KERN_BOOTFILE, bootfile, CTLFLAG_RD,
145 kernelname, sizeof kernelname, "Name of kernel file booted");
146
147SYSCTL_INT(_hw, HW_NCPU, ncpu, CTLFLAG_RD|CTLFLAG_CAPRD,
148 &mp_ncpus, 0, "Number of active CPUs");
149
150SYSCTL_INT(_hw, HW_BYTEORDER, byteorder, CTLFLAG_RD|CTLFLAG_CAPRD,
151 0, BYTE_ORDER, "System byte order");
152

--- 219 unchanged lines hidden (view full) ---

372SYSCTL_PROC(_kern, KERN_SECURELVL, securelevel,
373 CTLTYPE_INT|CTLFLAG_RW|CTLFLAG_PRISON, 0, 0, sysctl_kern_securelvl,
374 "I", "Current secure level");
375
376#ifdef INCLUDE_CONFIG_FILE
377/* Actual kernel configuration options. */
378extern char kernconfstring[];
379
145 kernelname, sizeof kernelname, "Name of kernel file booted");
146
147SYSCTL_INT(_hw, HW_NCPU, ncpu, CTLFLAG_RD|CTLFLAG_CAPRD,
148 &mp_ncpus, 0, "Number of active CPUs");
149
150SYSCTL_INT(_hw, HW_BYTEORDER, byteorder, CTLFLAG_RD|CTLFLAG_CAPRD,
151 0, BYTE_ORDER, "System byte order");
152

--- 219 unchanged lines hidden (view full) ---

372SYSCTL_PROC(_kern, KERN_SECURELVL, securelevel,
373 CTLTYPE_INT|CTLFLAG_RW|CTLFLAG_PRISON, 0, 0, sysctl_kern_securelvl,
374 "I", "Current secure level");
375
376#ifdef INCLUDE_CONFIG_FILE
377/* Actual kernel configuration options. */
378extern char kernconfstring[];
379
380static int
381sysctl_kern_config(SYSCTL_HANDLER_ARGS)
382{
383 return (sysctl_handle_string(oidp, kernconfstring,
384 strlen(kernconfstring), req));
385}
386
387SYSCTL_PROC(_kern, OID_AUTO, conftxt, CTLTYPE_STRING|CTLFLAG_RW,
388 0, 0, sysctl_kern_config, "", "Kernel configuration file");
380SYSCTL_STRING(_kern, OID_AUTO, conftxt, CTLFLAG_RD, kernconfstring, 0,
381 "Kernel configuration file");
389#endif
390
391static int
392sysctl_hostid(SYSCTL_HANDLER_ARGS)
393{
394 struct prison *pr, *cpr;
395 u_long tmpid;
396 int descend, error;

--- 150 unchanged lines hidden ---
382#endif
383
384static int
385sysctl_hostid(SYSCTL_HANDLER_ARGS)
386{
387 struct prison *pr, *cpr;
388 u_long tmpid;
389 int descend, error;

--- 150 unchanged lines hidden ---