No empty .Rs/.Re
[netbsd-mini2440.git] / sys / kern / init_sysctl_base.c
blobf3a3082b180b161245ce0dfee744ee850295881d
1 /* $NetBSD: init_sysctl.c,v 1.166 2009/09/11 18:14:58 apb Exp $ */
3 /*-
4 * Copyright (c) 2003, 2007, 2008, 2009 The NetBSD Foundation, Inc.
5 * All rights reserved.
7 * This code is derived from software contributed to The NetBSD Foundation
8 * by Andrew Brown, and by Andrew Doran.
10 * Redistribution and use in source and binary forms, with or without
11 * modification, are permitted provided that the following conditions
12 * are met:
13 * 1. Redistributions of source code must retain the above copyright
14 * notice, this list of conditions and the following disclaimer.
15 * 2. Redistributions in binary form must reproduce the above copyright
16 * notice, this list of conditions and the following disclaimer in the
17 * documentation and/or other materials provided with the distribution.
19 * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
20 * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
21 * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
22 * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
23 * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
24 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
25 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
26 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
27 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
28 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
29 * POSSIBILITY OF SUCH DAMAGE.
32 #include <sys/cdefs.h>
33 __KERNEL_RCSID(0, "$NetBSD: init_sysctl.c,v 1.166 2009/09/11 18:14:58 apb Exp $");
35 #include <sys/param.h>
36 #include <sys/sysctl.h>
39 * sets up the base nodes...
41 SYSCTL_SETUP(sysctl_root_setup, "sysctl base setup")
44 sysctl_createv(clog, 0, NULL, NULL,
45 CTLFLAG_PERMANENT,
46 CTLTYPE_NODE, "kern",
47 SYSCTL_DESCR("High kernel"),
48 NULL, 0, NULL, 0,
49 CTL_KERN, CTL_EOL);
50 sysctl_createv(clog, 0, NULL, NULL,
51 CTLFLAG_PERMANENT,
52 CTLTYPE_NODE, "vm",
53 SYSCTL_DESCR("Virtual memory"),
54 NULL, 0, NULL, 0,
55 CTL_VM, CTL_EOL);
56 sysctl_createv(clog, 0, NULL, NULL,
57 CTLFLAG_PERMANENT,
58 CTLTYPE_NODE, "vfs",
59 SYSCTL_DESCR("Filesystem"),
60 NULL, 0, NULL, 0,
61 CTL_VFS, CTL_EOL);
62 sysctl_createv(clog, 0, NULL, NULL,
63 CTLFLAG_PERMANENT,
64 CTLTYPE_NODE, "net",
65 SYSCTL_DESCR("Networking"),
66 NULL, 0, NULL, 0,
67 CTL_NET, CTL_EOL);
68 sysctl_createv(clog, 0, NULL, NULL,
69 CTLFLAG_PERMANENT,
70 CTLTYPE_NODE, "debug",
71 SYSCTL_DESCR("Debugging"),
72 NULL, 0, NULL, 0,
73 CTL_DEBUG, CTL_EOL);
74 sysctl_createv(clog, 0, NULL, NULL,
75 CTLFLAG_PERMANENT,
76 CTLTYPE_NODE, "hw",
77 SYSCTL_DESCR("Generic CPU, I/O"),
78 NULL, 0, NULL, 0,
79 CTL_HW, CTL_EOL);
80 sysctl_createv(clog, 0, NULL, NULL,
81 CTLFLAG_PERMANENT,
82 CTLTYPE_NODE, "machdep",
83 SYSCTL_DESCR("Machine dependent"),
84 NULL, 0, NULL, 0,
85 CTL_MACHDEP, CTL_EOL);
87 * this node is inserted so that the sysctl nodes in libc can
88 * operate.
90 sysctl_createv(clog, 0, NULL, NULL,
91 CTLFLAG_PERMANENT,
92 CTLTYPE_NODE, "user",
93 SYSCTL_DESCR("User-level"),
94 NULL, 0, NULL, 0,
95 CTL_USER, CTL_EOL);
96 sysctl_createv(clog, 0, NULL, NULL,
97 CTLFLAG_PERMANENT,
98 CTLTYPE_NODE, "ddb",
99 SYSCTL_DESCR("In-kernel debugger"),
100 NULL, 0, NULL, 0,
101 CTL_DDB, CTL_EOL);
102 sysctl_createv(clog, 0, NULL, NULL,
103 CTLFLAG_PERMANENT,
104 CTLTYPE_NODE, "proc",
105 SYSCTL_DESCR("Per-process"),
106 NULL, 0, NULL, 0,
107 CTL_PROC, CTL_EOL);
108 sysctl_createv(clog, 0, NULL, NULL,
109 CTLFLAG_PERMANENT|CTLFLAG_READWRITE,
110 CTLTYPE_NODE, "vendor",
111 SYSCTL_DESCR("Vendor specific"),
112 NULL, 0, NULL, 0,
113 CTL_VENDOR, CTL_EOL);
114 sysctl_createv(clog, 0, NULL, NULL,
115 CTLFLAG_PERMANENT,
116 CTLTYPE_NODE, "emul",
117 SYSCTL_DESCR("Emulation settings"),
118 NULL, 0, NULL, 0,
119 CTL_EMUL, CTL_EOL);
120 sysctl_createv(clog, 0, NULL, NULL,
121 CTLFLAG_PERMANENT,
122 CTLTYPE_NODE, "security",
123 SYSCTL_DESCR("Security"),
124 NULL, 0, NULL, 0,
125 CTL_SECURITY, CTL_EOL);