Module Name: src
Committed By: christos
Date: Sat Feb 5 01:22:13 UTC 2011
Modified Files:
src/sys/kern: init_sysctl.c
Log Message:
avoid code duplication.
To generate a diff of this commit:
cvs rdiff -u -r1.178 -r1.179 src/sys/kern/init_sysctl.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/sys/kern/init_sysctl.c
diff -u src/sys/kern/init_sysctl.c:1.178 src/sys/kern/init_sysctl.c:1.179
--- src/sys/kern/init_sysctl.c:1.178 Fri Jan 28 15:31:10 2011
+++ src/sys/kern/init_sysctl.c Fri Feb 4 20:22:12 2011
@@ -1,4 +1,4 @@
-/* $NetBSD: init_sysctl.c,v 1.178 2011/01/28 20:31:10 pooka Exp $ */
+/* $NetBSD: init_sysctl.c,v 1.179 2011/02/05 01:22:12 christos Exp $ */
/*-
* Copyright (c) 2003, 2007, 2008, 2009 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: init_sysctl.c,v 1.178 2011/01/28 20:31:10 pooka Exp $");
+__KERNEL_RCSID(0, "$NetBSD: init_sysctl.c,v 1.179 2011/02/05 01:22:12 christos Exp $");
#include "opt_sysv.h"
#include "opt_compat_netbsd.h"
@@ -734,22 +734,19 @@
sysctl_security_setidcore, 0, &security_setidcore_mode,
0,
CTL_CREATE, CTL_EOL);
-#ifdef KERN_SA
sysctl_createv(clog, 0, NULL, NULL,
CTLFLAG_PERMANENT|CTLFLAG_READWRITE,
CTLTYPE_INT, "no_sa_support",
- SYSCTL_DESCR("0 if the kernel supports SA, otherwise it doesn't"),
- NULL, 0, &sa_system_disabled, 0,
- CTL_KERN, CTL_CREATE, CTL_EOL);
+ SYSCTL_DESCR("0 if the kernel supports SA, otherwise "
+ "it doesn't"),
+ NULL,
+#ifdef KERN_SA
+ 0, &sa_system_disabled,
#else
- sysctl_createv(clog, 0, NULL, NULL,
- CTLFLAG_PERMANENT|CTLFLAG_IMMEDIATE,
- CTLTYPE_INT, "no_sa_support",
- SYSCTL_DESCR("0 if the kernel supports SA, otherwise it doesn't"),
- NULL, 1, NULL, 0,
- CTL_KERN, CTL_CREATE, CTL_EOL);
+ 1, NULL,
#endif
-
+ 0,
+ CTL_KERN, CTL_CREATE, CTL_EOL);
/* kern.posix. */
sysctl_createv(clog, 0, NULL, &rnode,
CTLFLAG_PERMANENT,