From 455a963ec150b2cddcf73e3b988a6961062dfeb5 Mon Sep 17 00:00:00 2001 From: christos Date: Sat, 5 Feb 2011 01:22:12 +0000 Subject: [PATCH] avoid code duplication. --- sys/kern/init_sysctl.c | 23 ++++++++++------------- 1 file changed, 10 insertions(+), 13 deletions(-) diff --git a/sys/kern/init_sysctl.c b/sys/kern/init_sysctl.c index 21b03611f0d1..d0fb3cddfc94 100644 --- a/sys/kern/init_sysctl.c +++ b/sys/kern/init_sysctl.c @@ -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 -__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_SETUP(sysctl_kern_setup, "sysctl kern subtree setup") 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,