Fri May 16 12:22:32 2014 UTC ()
Get rid of all sysc_init_field uses - initialize fields directly in C99
notation.


(martin)
diff -r1.33 -r1.34 src/lib/libc/gen/sysctl.c
diff -r1.10 -r1.11 src/lib/libc/gen/sysctlgetmibinfo.c
diff -r1.152 -r1.153 src/sbin/sysctl/sysctl.c
diff -r1.42 -r1.43 src/sys/compat/linux/common/linux_sysctl.c
diff -r1.15 -r1.16 src/sys/compat/linux32/common/linux32_sysctl.c
diff -r1.33 -r1.34 src/sys/compat/netbsd32/netbsd32_sysctl.c
diff -r1.249 -r1.250 src/sys/kern/kern_sysctl.c

cvs diff -r1.33 -r1.34 src/lib/libc/gen/sysctl.c (expand / switch to unified diff)

--- src/lib/libc/gen/sysctl.c 2014/05/16 09:41:42 1.33
+++ src/lib/libc/gen/sysctl.c 2014/05/16 12:22:32 1.34
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1/* $NetBSD: sysctl.c,v 1.33 2014/05/16 09:41:42 martin Exp $ */ 1/* $NetBSD: sysctl.c,v 1.34 2014/05/16 12:22:32 martin Exp $ */
2 2
3/*- 3/*-
4 * Copyright (c) 1993 4 * Copyright (c) 1993
5 * The Regents of the University of California. All rights reserved. 5 * The Regents of the University of California. All rights reserved.
6 * 6 *
7 * Redistribution and use in source and binary forms, with or without 7 * Redistribution and use in source and binary forms, with or without
8 * modification, are permitted provided that the following conditions 8 * modification, are permitted provided that the following conditions
9 * are met: 9 * are met:
10 * 1. Redistributions of source code must retain the above copyright 10 * 1. Redistributions of source code must retain the above copyright
11 * notice, this list of conditions and the following disclaimer. 11 * notice, this list of conditions and the following disclaimer.
12 * 2. Redistributions in binary form must reproduce the above copyright 12 * 2. Redistributions in binary form must reproduce the above copyright
13 * notice, this list of conditions and the following disclaimer in the 13 * notice, this list of conditions and the following disclaimer in the
14 * documentation and/or other materials provided with the distribution. 14 * documentation and/or other materials provided with the distribution.
@@ -24,27 +24,27 @@ @@ -24,27 +24,27 @@
24 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 24 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
25 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 25 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
26 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 26 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
27 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 27 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
28 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 28 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
29 * SUCH DAMAGE. 29 * SUCH DAMAGE.
30 */ 30 */
31 31
32#include <sys/cdefs.h> 32#include <sys/cdefs.h>
33#if defined(LIBC_SCCS) && !defined(lint) 33#if defined(LIBC_SCCS) && !defined(lint)
34#if 0 34#if 0
35static char sccsid[] = "@(#)sysctl.c 8.2 (Berkeley) 1/4/94"; 35static char sccsid[] = "@(#)sysctl.c 8.2 (Berkeley) 1/4/94";
36#else 36#else
37__RCSID("$NetBSD: sysctl.c,v 1.33 2014/05/16 09:41:42 martin Exp $"); 37__RCSID("$NetBSD: sysctl.c,v 1.34 2014/05/16 12:22:32 martin Exp $");
38#endif 38#endif
39#endif /* LIBC_SCCS and not lint */ 39#endif /* LIBC_SCCS and not lint */
40 40
41#include "namespace.h" 41#include "namespace.h"
42#include <sys/param.h> 42#include <sys/param.h>
43#define __COMPAT_SYSCTL 43#define __COMPAT_SYSCTL
44#include <sys/sysctl.h> 44#include <sys/sysctl.h>
45 45
46#include <assert.h> 46#include <assert.h>
47#include <errno.h> 47#include <errno.h>
48#include <paths.h> 48#include <paths.h>
49#include <stdio.h> 49#include <stdio.h>
50#include <string.h> 50#include <string.h>
@@ -99,62 +99,51 @@ sysctl(const int *name, unsigned int nam @@ -99,62 +99,51 @@ sysctl(const int *name, unsigned int nam
99 } 99 }
100 100
101 return (0); 101 return (0);
102} 102}
103 103
104static int 104static int
105user_sysctl(const int *name, unsigned int namelen, 105user_sysctl(const int *name, unsigned int namelen,
106 void *oldp, size_t *oldlenp, 106 void *oldp, size_t *oldlenp,
107 const void *newp, size_t newlen) 107 const void *newp, size_t newlen)
108{ 108{
109#define _INT(s, n, v, d) { \ 109#define _INT(s, n, v, d) { \
110 .sysctl_flags = CTLFLAG_IMMEDIATE|CTLFLAG_PERMANENT| \ 110 .sysctl_flags = CTLFLAG_IMMEDIATE|CTLFLAG_PERMANENT| \
111 CTLTYPE_INT|SYSCTL_VERSION, \ 111 CTLTYPE_INT|SYSCTL_VERSION, \
112 sysc_init_field(_sysctl_size, sizeof(int)), \ 112 .sysctl_size = sizeof(int), \
113 .sysctl_name = (s), \ 113 .sysctl_name = (s), \
114 .sysctl_num = (n), \ 114 .sysctl_num = (n), \
115 .sysctl_un = { .scu_idata = (v), }, \ 115 .sysctl_un.scu_idata = (v), \
116 sysc_init_field(_sysctl_desc, (d)), \ 116 .sysctl_desc = (d), \
117 } 117 }
118 118
119 /* 119 /*
120 * the nodes under the "user" node 120 * the nodes under the "user" node
121 */ 121 */
122 static const struct sysctlnode sysctl_usermib[] = { 122 static const struct sysctlnode sysctl_usermib[] = {
123#if defined(lint) 123#if defined(lint)
124 /* 124 /*
125 * lint doesn't like my initializers 125 * lint doesn't like my initializers
126 */ 126 */
127 0 127 0
128#else /* !lint */ 128#else /* !lint */
129 { 129 {
130 .sysctl_flags = SYSCTL_VERSION|CTLFLAG_PERMANENT| 130 .sysctl_flags = SYSCTL_VERSION|CTLFLAG_PERMANENT|
131 CTLTYPE_STRING, 131 CTLTYPE_STRING,
132 sysc_init_field(_sysctl_size, sizeof(_PATH_STDPATH)), 132 .sysctl_size = sizeof(_PATH_STDPATH),
133 .sysctl_name = "cs_path", 133 .sysctl_name = "cs_path",
134 .sysctl_num = USER_CS_PATH, 134 .sysctl_num = USER_CS_PATH,
135 /* 135 .sysctl_data = __UNCONST(_PATH_STDPATH),
136 * XXX these nasty initializers (and the one in 136 .sysctl_desc = __UNCONST(
137 * the _INT() macro) can go away once all ports 
138 * are using gcc3, and become 
139 * 
140 * .sysctl_data = _PATH_STDPATH, 
141 * .sysctl_desc = NULL, 
142 */ 
143 .sysctl_un = { .scu_data = {  
144 sysc_init_field(_sud_data, 
145 __UNCONST(_PATH_STDPATH)), 
146 }, }, 
147 sysc_init_field(_sysctl_desc, 
148 "A value for the PATH environment variable " 137 "A value for the PATH environment variable "
149 "that finds all the standard utilities"), 138 "that finds all the standard utilities"),
150 }, 139 },
151 _INT("bc_base_max", USER_BC_BASE_MAX, BC_BASE_MAX, 140 _INT("bc_base_max", USER_BC_BASE_MAX, BC_BASE_MAX,
152 "The maximum ibase/obase values in the bc(1) utility"), 141 "The maximum ibase/obase values in the bc(1) utility"),
153 _INT("bc_dim_max", USER_BC_DIM_MAX, BC_DIM_MAX, 142 _INT("bc_dim_max", USER_BC_DIM_MAX, BC_DIM_MAX,
154 "The maximum array size in the bc(1) utility"), 143 "The maximum array size in the bc(1) utility"),
155 _INT("bc_scale_max", USER_BC_SCALE_MAX, BC_SCALE_MAX, 144 _INT("bc_scale_max", USER_BC_SCALE_MAX, BC_SCALE_MAX,
156 "The maximum scale value in the bc(1) utility"), 145 "The maximum scale value in the bc(1) utility"),
157 _INT("bc_string_max", USER_BC_STRING_MAX, BC_STRING_MAX, 146 _INT("bc_string_max", USER_BC_STRING_MAX, BC_STRING_MAX,
158 "The maximum string length in the bc(1) utility"), 147 "The maximum string length in the bc(1) utility"),
159 _INT("coll_weights_max", USER_COLL_WEIGHTS_MAX, 148 _INT("coll_weights_max", USER_COLL_WEIGHTS_MAX,
160 COLL_WEIGHTS_MAX, "The maximum number of weights that can " 149 COLL_WEIGHTS_MAX, "The maximum number of weights that can "

cvs diff -r1.10 -r1.11 src/lib/libc/gen/sysctlgetmibinfo.c (expand / switch to unified diff)

--- src/lib/libc/gen/sysctlgetmibinfo.c 2012/03/13 21:13:37 1.10
+++ src/lib/libc/gen/sysctlgetmibinfo.c 2014/05/16 12:22:32 1.11
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1/* $NetBSD: sysctlgetmibinfo.c,v 1.10 2012/03/13 21:13:37 christos Exp $ */ 1/* $NetBSD: sysctlgetmibinfo.c,v 1.11 2014/05/16 12:22:32 martin Exp $ */
2 2
3/*- 3/*-
4 * Copyright (c) 2003,2004 The NetBSD Foundation, Inc. 4 * Copyright (c) 2003,2004 The NetBSD Foundation, Inc.
5 * All rights reserved. 5 * All rights reserved.
6 * 6 *
7 * This code is derived from software contributed to The NetBSD Foundation 7 * This code is derived from software contributed to The NetBSD Foundation
8 * by Andrew Brown. 8 * by Andrew Brown.
9 * 9 *
10 * Redistribution and use in source and binary forms, with or without 10 * Redistribution and use in source and binary forms, with or without
11 * modification, are permitted provided that the following conditions 11 * modification, are permitted provided that the following conditions
12 * are met: 12 * are met:
13 * 1. Redistributions of source code must retain the above copyright 13 * 1. Redistributions of source code must retain the above copyright
14 * notice, this list of conditions and the following disclaimer. 14 * notice, this list of conditions and the following disclaimer.
@@ -21,27 +21,27 @@ @@ -21,27 +21,27 @@
21 * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 21 * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
22 * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS 22 * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
23 * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 23 * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
24 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 24 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
25 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 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 26 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
27 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 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 28 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
29 * POSSIBILITY OF SUCH DAMAGE. 29 * POSSIBILITY OF SUCH DAMAGE.
30 */ 30 */
31 31
32#include <sys/cdefs.h> 32#include <sys/cdefs.h>
33#if defined(LIBC_SCCS) && !defined(lint) 33#if defined(LIBC_SCCS) && !defined(lint)
34__RCSID("$NetBSD: sysctlgetmibinfo.c,v 1.10 2012/03/13 21:13:37 christos Exp $"); 34__RCSID("$NetBSD: sysctlgetmibinfo.c,v 1.11 2014/05/16 12:22:32 martin Exp $");
35#endif /* LIBC_SCCS and not lint */ 35#endif /* LIBC_SCCS and not lint */
36 36
37#ifndef RUMP_ACTION 37#ifndef RUMP_ACTION
38#include "namespace.h" 38#include "namespace.h"
39#ifdef _REENTRANT 39#ifdef _REENTRANT
40#include "reentrant.h" 40#include "reentrant.h"
41#endif /* _REENTRANT */ 41#endif /* _REENTRANT */
42#endif /* RUMP_ACTION */ 42#endif /* RUMP_ACTION */
43#include <sys/param.h> 43#include <sys/param.h>
44#include <sys/sysctl.h> 44#include <sys/sysctl.h>
45 45
46#include <assert.h> 46#include <assert.h>
47#include <errno.h> 47#include <errno.h>
@@ -61,27 +61,27 @@ __weak_alias(sysctlgetmibinfo,_sysctlget @@ -61,27 +61,27 @@ __weak_alias(sysctlgetmibinfo,_sysctlget
61 61
62/* 62/*
63 * the place where we attach stuff we learn on the fly, not 63 * the place where we attach stuff we learn on the fly, not
64 * necessarily used. 64 * necessarily used.
65 */ 65 */
66static struct sysctlnode sysctl_mibroot = { 66static struct sysctlnode sysctl_mibroot = {
67#if defined(lint) 67#if defined(lint)
68 /* 68 /*
69 * lint doesn't like my initializers 69 * lint doesn't like my initializers
70 */ 70 */
71 0 71 0
72#else /* !lint */ 72#else /* !lint */
73 .sysctl_flags = SYSCTL_VERSION|CTLFLAG_ROOT|CTLTYPE_NODE, 73 .sysctl_flags = SYSCTL_VERSION|CTLFLAG_ROOT|CTLTYPE_NODE,
74 sysc_init_field(_sysctl_size, sizeof(struct sysctlnode)), 74 .sysctl_size = sizeof(struct sysctlnode),
75 .sysctl_name = "(root)", 75 .sysctl_name = "(root)",
76#endif /* !lint */ 76#endif /* !lint */
77}; 77};
78 78
79/* 79/*
80 * routines to handle learning and cleanup 80 * routines to handle learning and cleanup
81 */ 81 */
82static int compar(const void *, const void *); 82static int compar(const void *, const void *);
83static void free_children(struct sysctlnode *); 83static void free_children(struct sysctlnode *);
84static void relearnhead(void); 84static void relearnhead(void);
85 85
86/* 86/*
87 * specifically not static since sysctl(8) "borrows" it. 87 * specifically not static since sysctl(8) "borrows" it.

cvs diff -r1.152 -r1.153 src/sbin/sysctl/sysctl.c (expand / switch to unified diff)

--- src/sbin/sysctl/sysctl.c 2014/05/16 08:59:24 1.152
+++ src/sbin/sysctl/sysctl.c 2014/05/16 12:22:32 1.153
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1/* $NetBSD: sysctl.c,v 1.152 2014/05/16 08:59:24 martin Exp $ */ 1/* $NetBSD: sysctl.c,v 1.153 2014/05/16 12:22:32 martin Exp $ */
2 2
3/*- 3/*-
4 * Copyright (c) 2003 The NetBSD Foundation, Inc. 4 * Copyright (c) 2003 The NetBSD Foundation, Inc.
5 * All rights reserved. 5 * All rights reserved.
6 * 6 *
7 * This code is derived from software contributed to The NetBSD Foundation 7 * This code is derived from software contributed to The NetBSD Foundation
8 * by Andrew Brown. 8 * by Andrew Brown.
9 * 9 *
10 * Redistribution and use in source and binary forms, with or without 10 * Redistribution and use in source and binary forms, with or without
11 * modification, are permitted provided that the following conditions 11 * modification, are permitted provided that the following conditions
12 * are met: 12 * are met:
13 * 1. Redistributions of source code must retain the above copyright 13 * 1. Redistributions of source code must retain the above copyright
14 * notice, this list of conditions and the following disclaimer. 14 * notice, this list of conditions and the following disclaimer.
@@ -58,27 +58,27 @@ @@ -58,27 +58,27 @@
58 * SUCH DAMAGE. 58 * SUCH DAMAGE.
59 */ 59 */
60 60
61#include <sys/cdefs.h> 61#include <sys/cdefs.h>
62#ifndef lint 62#ifndef lint
63__COPYRIGHT("@(#) Copyright (c) 1993\ 63__COPYRIGHT("@(#) Copyright (c) 1993\
64 The Regents of the University of California. All rights reserved."); 64 The Regents of the University of California. All rights reserved.");
65#endif /* not lint */ 65#endif /* not lint */
66 66
67#ifndef lint 67#ifndef lint
68#if 0 68#if 0
69static char sccsid[] = "@(#)sysctl.c 8.1 (Berkeley) 6/6/93"; 69static char sccsid[] = "@(#)sysctl.c 8.1 (Berkeley) 6/6/93";
70#else 70#else
71__RCSID("$NetBSD: sysctl.c,v 1.152 2014/05/16 08:59:24 martin Exp $"); 71__RCSID("$NetBSD: sysctl.c,v 1.153 2014/05/16 12:22:32 martin Exp $");
72#endif 72#endif
73#endif /* not lint */ 73#endif /* not lint */
74 74
75#include <sys/types.h> 75#include <sys/types.h>
76#include <sys/param.h> 76#include <sys/param.h>
77#include <sys/sysctl.h> 77#include <sys/sysctl.h>
78#include <sys/mount.h> 78#include <sys/mount.h>
79#include <sys/resource.h> 79#include <sys/resource.h>
80#include <sys/stat.h> 80#include <sys/stat.h>
81#include <sys/sched.h> 81#include <sys/sched.h>
82#include <sys/socket.h> 82#include <sys/socket.h>
83#include <sys/bitops.h> 83#include <sys/bitops.h>
84#include <netinet/in.h> 84#include <netinet/in.h>
@@ -232,27 +232,27 @@ static const struct handlespec { @@ -232,27 +232,27 @@ static const struct handlespec {
232 /* 232 /*
233 * these will only be called when the given node has no children 233 * these will only be called when the given node has no children
234 */ 234 */
235 { "/net/[^/]+", printother, NULL, NULL }, 235 { "/net/[^/]+", printother, NULL, NULL },
236 { "/debug", printother, NULL, NULL }, 236 { "/debug", printother, NULL, NULL },
237 { "/ddb", printother, NULL, NULL }, 237 { "/ddb", printother, NULL, NULL },
238 { "/vendor", printother, NULL, NULL }, 238 { "/vendor", printother, NULL, NULL },
239 239
240 { NULL, NULL, NULL, NULL }, 240 { NULL, NULL, NULL, NULL },
241}; 241};
242 242
243struct sysctlnode my_root = { 243struct sysctlnode my_root = {
244 .sysctl_flags = SYSCTL_VERSION|CTLFLAG_ROOT|CTLTYPE_NODE, 244 .sysctl_flags = SYSCTL_VERSION|CTLFLAG_ROOT|CTLTYPE_NODE,
245 sysc_init_field(_sysctl_size, sizeof(struct sysctlnode)), 245 .sysctl_size = sizeof(struct sysctlnode),
246 .sysctl_num = 0, 246 .sysctl_num = 0,
247 .sysctl_name = "(prog_root)", 247 .sysctl_name = "(prog_root)",
248}; 248};
249 249
250int Aflag, aflag, dflag, Mflag, nflag, qflag, rflag, wflag, xflag; 250int Aflag, aflag, dflag, Mflag, nflag, qflag, rflag, wflag, xflag;
251size_t nr; 251size_t nr;
252char *fn; 252char *fn;
253int req, stale, errs; 253int req, stale, errs;
254FILE *warnfp = stderr; 254FILE *warnfp = stderr;
255 255
256#define MAXPORTS 0x10000 256#define MAXPORTS 0x10000
257 257
258/* 258/*

cvs diff -r1.42 -r1.43 src/sys/compat/linux/common/linux_sysctl.c (expand / switch to unified diff)

--- src/sys/compat/linux/common/linux_sysctl.c 2014/02/25 18:30:09 1.42
+++ src/sys/compat/linux/common/linux_sysctl.c 2014/05/16 12:22:32 1.43
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1/* $NetBSD: linux_sysctl.c,v 1.42 2014/02/25 18:30:09 pooka Exp $ */ 1/* $NetBSD: linux_sysctl.c,v 1.43 2014/05/16 12:22:32 martin Exp $ */
2 2
3/*- 3/*-
4 * Copyright (c) 2003, 2008 The NetBSD Foundation, Inc. 4 * Copyright (c) 2003, 2008 The NetBSD Foundation, Inc.
5 * All rights reserved. 5 * All rights reserved.
6 * 6 *
7 * This code is derived from software contributed to The NetBSD Foundation 7 * This code is derived from software contributed to The NetBSD Foundation
8 * by Andrew Brown. 8 * by Andrew Brown.
9 * 9 *
10 * Redistribution and use in source and binary forms, with or without 10 * Redistribution and use in source and binary forms, with or without
11 * modification, are permitted provided that the following conditions 11 * modification, are permitted provided that the following conditions
12 * are met: 12 * are met:
13 * 1. Redistributions of source code must retain the above copyright 13 * 1. Redistributions of source code must retain the above copyright
14 * notice, this list of conditions and the following disclaimer. 14 * notice, this list of conditions and the following disclaimer.
@@ -24,27 +24,27 @@ @@ -24,27 +24,27 @@
24 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 24 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
25 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 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 26 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
27 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 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 28 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
29 * POSSIBILITY OF SUCH DAMAGE. 29 * POSSIBILITY OF SUCH DAMAGE.
30 */ 30 */
31 31
32/* 32/*
33 * sysctl system call. 33 * sysctl system call.
34 */ 34 */
35 35
36#include <sys/cdefs.h> 36#include <sys/cdefs.h>
37__KERNEL_RCSID(0, "$NetBSD: linux_sysctl.c,v 1.42 2014/02/25 18:30:09 pooka Exp $"); 37__KERNEL_RCSID(0, "$NetBSD: linux_sysctl.c,v 1.43 2014/05/16 12:22:32 martin Exp $");
38 38
39#include <sys/param.h> 39#include <sys/param.h>
40#include <sys/systm.h> 40#include <sys/systm.h>
41#include <sys/errno.h> 41#include <sys/errno.h>
42#include <sys/proc.h> 42#include <sys/proc.h>
43#include <sys/mount.h> 43#include <sys/mount.h>
44#include <sys/sysctl.h> 44#include <sys/sysctl.h>
45#include <sys/sched.h> 45#include <sys/sched.h>
46#include <sys/syscallargs.h> 46#include <sys/syscallargs.h>
47#include <sys/ktrace.h> 47#include <sys/ktrace.h>
48 48
49#include <compat/linux/common/linux_types.h> 49#include <compat/linux/common/linux_types.h>
50#include <compat/linux/common/linux_signal.h> 50#include <compat/linux/common/linux_signal.h>
@@ -55,27 +55,27 @@ __KERNEL_RCSID(0, "$NetBSD: linux_sysctl @@ -55,27 +55,27 @@ __KERNEL_RCSID(0, "$NetBSD: linux_sysctl
55#include <compat/linux/common/linux_sysctl.h> 55#include <compat/linux/common/linux_sysctl.h>
56#include <compat/linux/common/linux_exec.h> 56#include <compat/linux/common/linux_exec.h>
57#include <compat/linux/common/linux_machdep.h> 57#include <compat/linux/common/linux_machdep.h>
58 58
59char linux_sysname[128] = "Linux"; 59char linux_sysname[128] = "Linux";
60char linux_release[128] = "3.11.6"; 60char linux_release[128] = "3.11.6";
61char linux_version[128] = "#1 SMP PREEMPT Thu Oct 24 16:23:02 UTC 2013"; 61char linux_version[128] = "#1 SMP PREEMPT Thu Oct 24 16:23:02 UTC 2013";
62 62
63struct sysctlnode linux_sysctl_root = { 63struct sysctlnode linux_sysctl_root = {
64 .sysctl_flags = SYSCTL_VERSION| 64 .sysctl_flags = SYSCTL_VERSION|
65 CTLFLAG_ROOT|CTLTYPE_NODE|CTLFLAG_READWRITE, 65 CTLFLAG_ROOT|CTLTYPE_NODE|CTLFLAG_READWRITE,
66 .sysctl_num = 0, 66 .sysctl_num = 0,
67 .sysctl_name = "(linux_root)", 67 .sysctl_name = "(linux_root)",
68 sysc_init_field(_sysctl_size, sizeof(struct sysctlnode)), 68 .sysctl_size = sizeof(struct sysctlnode),
69}; 69};
70 70
71static struct sysctllog *linux_clog1; 71static struct sysctllog *linux_clog1;
72static struct sysctllog *linux_clog2; 72static struct sysctllog *linux_clog2;
73 73
74void 74void
75linux_sysctl_fini(void) 75linux_sysctl_fini(void)
76{ 76{
77 77
78 sysctl_teardown(&linux_clog2); 78 sysctl_teardown(&linux_clog2);
79 sysctl_teardown(&linux_clog1); 79 sysctl_teardown(&linux_clog1);
80 sysctl_free(&linux_sysctl_root); 80 sysctl_free(&linux_sysctl_root);
81} 81}

cvs diff -r1.15 -r1.16 src/sys/compat/linux32/common/linux32_sysctl.c (expand / switch to unified diff)

--- src/sys/compat/linux32/common/linux32_sysctl.c 2014/02/25 18:30:09 1.15
+++ src/sys/compat/linux32/common/linux32_sysctl.c 2014/05/16 12:22:32 1.16
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1/* $NetBSD: linux32_sysctl.c,v 1.15 2014/02/25 18:30:09 pooka Exp $ */ 1/* $NetBSD: linux32_sysctl.c,v 1.16 2014/05/16 12:22:32 martin Exp $ */
2 2
3/*- 3/*-
4 * Copyright (c) 2006 Emmanuel Dreyfus, all rights reserved. 4 * Copyright (c) 2006 Emmanuel Dreyfus, all rights reserved.
5 * 5 *
6 * Redistribution and use in source and binary forms, with or without 6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions 7 * modification, are permitted provided that the following conditions
8 * are met: 8 * are met:
9 * 1. Redistributions of source code must retain the above copyright 9 * 1. Redistributions of source code must retain the above copyright
10 * notice, this list of conditions and the following disclaimer. 10 * notice, this list of conditions and the following disclaimer.
11 * 2. Redistributions in binary form must reproduce the above copyright 11 * 2. Redistributions in binary form must reproduce the above copyright
12 * notice, this list of conditions and the following disclaimer in the 12 * notice, this list of conditions and the following disclaimer in the
13 * documentation and/or other materials provided with the distribution. 13 * documentation and/or other materials provided with the distribution.
14 * 3. All advertising materials mentioning features or use of this software 14 * 3. All advertising materials mentioning features or use of this software
@@ -21,27 +21,27 @@ @@ -21,27 +21,27 @@
21 * THIS SOFTWARE IS PROVIDED BY THE THE AUTHOR AND CONTRIBUTORS ``AS IS''  21 * THIS SOFTWARE IS PROVIDED BY THE THE AUTHOR AND CONTRIBUTORS ``AS IS''
22 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,  22 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
23 * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 23 * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
24 * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS  24 * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS
25 * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 25 * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
26 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 26 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
27 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 27 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
28 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 28 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
29 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 29 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
30 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 30 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
31 * POSSIBILITY OF SUCH DAMAGE. 31 * POSSIBILITY OF SUCH DAMAGE.
32 */ 32 */
33#include <sys/cdefs.h> 33#include <sys/cdefs.h>
34__KERNEL_RCSID(0, "$NetBSD: linux32_sysctl.c,v 1.15 2014/02/25 18:30:09 pooka Exp $"); 34__KERNEL_RCSID(0, "$NetBSD: linux32_sysctl.c,v 1.16 2014/05/16 12:22:32 martin Exp $");
35 35
36#include <sys/param.h> 36#include <sys/param.h>
37#include <sys/systm.h> 37#include <sys/systm.h>
38#include <sys/errno.h> 38#include <sys/errno.h>
39#include <sys/proc.h> 39#include <sys/proc.h>
40#include <sys/mount.h> 40#include <sys/mount.h>
41#include <sys/sysctl.h> 41#include <sys/sysctl.h>
42#include <sys/syscallargs.h> 42#include <sys/syscallargs.h>
43#include <sys/ktrace.h> 43#include <sys/ktrace.h>
44 44
45#include <compat/netbsd32/netbsd32.h> 45#include <compat/netbsd32/netbsd32.h>
46 46
47#include <compat/linux/common/linux_types.h> 47#include <compat/linux/common/linux_types.h>
@@ -55,27 +55,27 @@ __KERNEL_RCSID(0, "$NetBSD: linux32_sysc @@ -55,27 +55,27 @@ __KERNEL_RCSID(0, "$NetBSD: linux32_sysc
55#include <compat/linux32/common/linux32_signal.h> 55#include <compat/linux32/common/linux32_signal.h>
56#include <compat/linux32/common/linux32_sysctl.h> 56#include <compat/linux32/common/linux32_sysctl.h>
57#include <compat/linux32/linux32_syscallargs.h> 57#include <compat/linux32/linux32_syscallargs.h>
58 58
59char linux32_sysname[128] = "Linux"; 59char linux32_sysname[128] = "Linux";
60char linux32_release[128] = "3.11.6"; 60char linux32_release[128] = "3.11.6";
61char linux32_version[128] = "#1 SMP PREEMPT Thu Oct 24 16:23:02 UTC 2013"; 61char linux32_version[128] = "#1 SMP PREEMPT Thu Oct 24 16:23:02 UTC 2013";
62 62
63struct sysctlnode linux32_sysctl_root = { 63struct sysctlnode linux32_sysctl_root = {
64 .sysctl_flags = SYSCTL_VERSION| 64 .sysctl_flags = SYSCTL_VERSION|
65 CTLFLAG_ROOT|CTLTYPE_NODE|CTLFLAG_READWRITE, 65 CTLFLAG_ROOT|CTLTYPE_NODE|CTLFLAG_READWRITE,
66 .sysctl_num = 0, 66 .sysctl_num = 0,
67 .sysctl_name = "(linux32_root)", 67 .sysctl_name = "(linux32_root)",
68 sysc_init_field(_sysctl_size, sizeof(struct sysctlnode)), 68 .sysctl_size = sizeof(struct sysctlnode),
69}; 69};
70 70
71static struct sysctllog *linux32_clog1; 71static struct sysctllog *linux32_clog1;
72static struct sysctllog *linux32_clog2; 72static struct sysctllog *linux32_clog2;
73 73
74void 74void
75linux32_sysctl_fini(void) 75linux32_sysctl_fini(void)
76{ 76{
77 77
78 sysctl_teardown(&linux32_clog2); 78 sysctl_teardown(&linux32_clog2);
79 sysctl_teardown(&linux32_clog1); 79 sysctl_teardown(&linux32_clog1);
80 sysctl_free(&linux32_sysctl_root); 80 sysctl_free(&linux32_sysctl_root);
81} 81}

cvs diff -r1.33 -r1.34 src/sys/compat/netbsd32/netbsd32_sysctl.c (expand / switch to unified diff)

--- src/sys/compat/netbsd32/netbsd32_sysctl.c 2012/01/20 14:08:07 1.33
+++ src/sys/compat/netbsd32/netbsd32_sysctl.c 2014/05/16 12:22:32 1.34
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1/* $NetBSD: netbsd32_sysctl.c,v 1.33 2012/01/20 14:08:07 joerg Exp $ */ 1/* $NetBSD: netbsd32_sysctl.c,v 1.34 2014/05/16 12:22:32 martin Exp $ */
2 2
3/* 3/*
4 * Copyright (c) 2003 The NetBSD Foundation, Inc. 4 * Copyright (c) 2003 The NetBSD Foundation, Inc.
5 * All rights reserved. 5 * All rights reserved.
6 * 6 *
7 * This code is derived from software contributed to The NetBSD Foundation 7 * This code is derived from software contributed to The NetBSD Foundation
8 * by Andrew Brown. 8 * by Andrew Brown.
9 * 9 *
10 * Redistribution and use in source and binary forms, with or without 10 * Redistribution and use in source and binary forms, with or without
11 * modification, are permitted provided that the following conditions 11 * modification, are permitted provided that the following conditions
12 * are met: 12 * are met:
13 * 1. Redistributions of source code must retain the above copyright 13 * 1. Redistributions of source code must retain the above copyright
14 * notice, this list of conditions and the following disclaimer. 14 * notice, this list of conditions and the following disclaimer.
@@ -22,27 +22,27 @@ @@ -22,27 +22,27 @@
22 * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES 22 * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
23 * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 23 * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
24 * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, 24 * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
25 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, 25 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
26 * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 26 * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
27 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED 27 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
28 * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, 28 * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
29 * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 29 * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
30 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 30 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
31 * SUCH DAMAGE. 31 * SUCH DAMAGE.
32 */ 32 */
33 33
34#include <sys/cdefs.h> 34#include <sys/cdefs.h>
35__KERNEL_RCSID(0, "$NetBSD: netbsd32_sysctl.c,v 1.33 2012/01/20 14:08:07 joerg Exp $"); 35__KERNEL_RCSID(0, "$NetBSD: netbsd32_sysctl.c,v 1.34 2014/05/16 12:22:32 martin Exp $");
36 36
37#if defined(_KERNEL_OPT) 37#if defined(_KERNEL_OPT)
38#include "opt_ddb.h" 38#include "opt_ddb.h"
39#endif 39#endif
40 40
41#include <sys/param.h> 41#include <sys/param.h>
42#include <sys/systm.h> 42#include <sys/systm.h>
43#include <sys/kernel.h> 43#include <sys/kernel.h>
44#include <sys/mount.h> 44#include <sys/mount.h>
45#include <sys/stat.h> 45#include <sys/stat.h>
46#include <sys/time.h> 46#include <sys/time.h>
47#include <sys/vnode.h> 47#include <sys/vnode.h>
48#include <sys/syscallargs.h> 48#include <sys/syscallargs.h>
@@ -57,27 +57,27 @@ __KERNEL_RCSID(0, "$NetBSD: netbsd32_sys @@ -57,27 +57,27 @@ __KERNEL_RCSID(0, "$NetBSD: netbsd32_sys
57#include <compat/netbsd32/netbsd32_syscall.h> 57#include <compat/netbsd32/netbsd32_syscall.h>
58#include <compat/netbsd32/netbsd32_syscallargs.h> 58#include <compat/netbsd32/netbsd32_syscallargs.h>
59#include <compat/netbsd32/netbsd32_conv.h> 59#include <compat/netbsd32/netbsd32_conv.h>
60#include <compat/netbsd32/netbsd32_sysctl.h> 60#include <compat/netbsd32/netbsd32_sysctl.h>
61 61
62#if defined(DDB) 62#if defined(DDB)
63#include <ddb/ddbvar.h> 63#include <ddb/ddbvar.h>
64#endif 64#endif
65 65
66struct sysctlnode netbsd32_sysctl_root = { 66struct sysctlnode netbsd32_sysctl_root = {
67 .sysctl_flags = SYSCTL_VERSION|CTLFLAG_ROOT|CTLTYPE_NODE, 67 .sysctl_flags = SYSCTL_VERSION|CTLFLAG_ROOT|CTLTYPE_NODE,
68 .sysctl_num = 0, 68 .sysctl_num = 0,
69 .sysctl_name = "(netbsd32_root)", 69 .sysctl_name = "(netbsd32_root)",
70 sysc_init_field(_sysctl_size, sizeof(struct sysctlnode)), 70 .sysctl_size = sizeof(struct sysctlnode),
71}; 71};
72 72
73static struct sysctllog *netbsd32_clog; 73static struct sysctllog *netbsd32_clog;
74 74
75/* 75/*
76 * sysctl helper routine for netbsd32's kern.boottime node 76 * sysctl helper routine for netbsd32's kern.boottime node
77 */ 77 */
78static int 78static int
79netbsd32_sysctl_kern_boottime(SYSCTLFN_ARGS) 79netbsd32_sysctl_kern_boottime(SYSCTLFN_ARGS)
80{ 80{
81 struct sysctlnode node; 81 struct sysctlnode node;
82 struct netbsd32_timespec bt32; 82 struct netbsd32_timespec bt32;
83 83

cvs diff -r1.249 -r1.250 src/sys/kern/kern_sysctl.c (expand / switch to unified diff)

--- src/sys/kern/kern_sysctl.c 2014/03/27 21:09:33 1.249
+++ src/sys/kern/kern_sysctl.c 2014/05/16 12:22:32 1.250
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1/* $NetBSD: kern_sysctl.c,v 1.249 2014/03/27 21:09:33 christos Exp $ */ 1/* $NetBSD: kern_sysctl.c,v 1.250 2014/05/16 12:22:32 martin Exp $ */
2 2
3/*- 3/*-
4 * Copyright (c) 2003, 2007, 2008 The NetBSD Foundation, Inc. 4 * Copyright (c) 2003, 2007, 2008 The NetBSD Foundation, Inc.
5 * All rights reserved. 5 * All rights reserved.
6 * 6 *
7 * This code is derived from software contributed to The NetBSD Foundation 7 * This code is derived from software contributed to The NetBSD Foundation
8 * by Andrew Brown. 8 * by Andrew Brown.
9 * 9 *
10 * Redistribution and use in source and binary forms, with or without 10 * Redistribution and use in source and binary forms, with or without
11 * modification, are permitted provided that the following conditions 11 * modification, are permitted provided that the following conditions
12 * are met: 12 * are met:
13 * 1. Redistributions of source code must retain the above copyright 13 * 1. Redistributions of source code must retain the above copyright
14 * notice, this list of conditions and the following disclaimer. 14 * notice, this list of conditions and the following disclaimer.
@@ -58,27 +58,27 @@ @@ -58,27 +58,27 @@
58 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 58 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
59 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 59 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
60 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 60 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
61 * SUCH DAMAGE. 61 * SUCH DAMAGE.
62 * 62 *
63 * @(#)kern_sysctl.c 8.9 (Berkeley) 5/20/95 63 * @(#)kern_sysctl.c 8.9 (Berkeley) 5/20/95
64 */ 64 */
65 65
66/* 66/*
67 * sysctl system call. 67 * sysctl system call.
68 */ 68 */
69 69
70#include <sys/cdefs.h> 70#include <sys/cdefs.h>
71__KERNEL_RCSID(0, "$NetBSD: kern_sysctl.c,v 1.249 2014/03/27 21:09:33 christos Exp $"); 71__KERNEL_RCSID(0, "$NetBSD: kern_sysctl.c,v 1.250 2014/05/16 12:22:32 martin Exp $");
72 72
73#include "opt_defcorename.h" 73#include "opt_defcorename.h"
74#include "ksyms.h" 74#include "ksyms.h"
75 75
76#include <sys/param.h> 76#include <sys/param.h>
77#define __COMPAT_SYSCTL 77#define __COMPAT_SYSCTL
78#include <sys/sysctl.h> 78#include <sys/sysctl.h>
79#include <sys/systm.h> 79#include <sys/systm.h>
80#include <sys/buf.h> 80#include <sys/buf.h>
81#include <sys/ksyms.h> 81#include <sys/ksyms.h>
82#include <sys/malloc.h> 82#include <sys/malloc.h>
83#include <sys/mount.h> 83#include <sys/mount.h>
84#include <sys/syscallargs.h> 84#include <sys/syscallargs.h>
@@ -113,33 +113,27 @@ struct sysctllog { @@ -113,33 +113,27 @@ struct sysctllog {
113 const struct sysctlnode *log_root; 113 const struct sysctlnode *log_root;
114 int *log_num; 114 int *log_num;
115 int log_size, log_left; 115 int log_size, log_left;
116}; 116};
117 117
118/* 118/*
119 * the "root" of the new sysctl tree 119 * the "root" of the new sysctl tree
120 */ 120 */
121struct sysctlnode sysctl_root = { 121struct sysctlnode sysctl_root = {
122 .sysctl_flags = SYSCTL_VERSION| 122 .sysctl_flags = SYSCTL_VERSION|
123 CTLFLAG_ROOT|CTLFLAG_READWRITE| 123 CTLFLAG_ROOT|CTLFLAG_READWRITE|
124 CTLTYPE_NODE, 124 CTLTYPE_NODE,
125 .sysctl_num = 0, 125 .sysctl_num = 0,
126 /* 126 .sysctl_size = sizeof(struct sysctlnode),
127 * XXX once all ports are on gcc3, we can get rid of this 
128 * ugliness and simply make it into 
129 * 
130 * .sysctl_size = sizeof(struct sysctlnode), 
131 */ 
132 sysc_init_field(_sysctl_size, sizeof(struct sysctlnode)), 
133 .sysctl_name = "(root)", 127 .sysctl_name = "(root)",
134}; 128};
135 129
136/* 130/*
137 * link set of functions that add nodes at boot time (see also 131 * link set of functions that add nodes at boot time (see also
138 * sysctl_buildtree()) 132 * sysctl_buildtree())
139 */ 133 */
140__link_set_decl(sysctl_funcs, sysctl_setup_func); 134__link_set_decl(sysctl_funcs, sysctl_setup_func);
141 135
142/* 136/*
143 * The `sysctl_treelock' is intended to serialize access to the sysctl 137 * The `sysctl_treelock' is intended to serialize access to the sysctl
144 * tree. XXX This has serious problems; allocating memory and 138 * tree. XXX This has serious problems; allocating memory and
145 * copying data out with the lock held is insane. 139 * copying data out with the lock held is insane.