diff options
| author | jym <jym@NetBSD.org> | 2011-07-23 11:38:28 +0000 |
|---|---|---|
| committer | jym <jym@NetBSD.org> | 2011-07-23 11:38:28 +0000 |
| commit | 0d3ffa323ef8013f70efc20f1966815f672dd816 (patch) | |
| tree | c28dc5c1e7f599d565c928e054edcdb9176c80ff /sys/kern/init_sysctl.c | |
| parent | 55b641c3e3d9d97d0af21130360291324698c64c (diff) | |
When KERN_SA is not defined, kern.no_sa_support is a constant (1). So
add CTLFLAG_IMMEDIATE to flags. Make the macro block logically reversed so
it looks more natural when reading.
Reported by Peter Tworek on tech-kern@.
Diffstat (limited to 'sys/kern/init_sysctl.c')
| -rw-r--r-- | sys/kern/init_sysctl.c | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/sys/kern/init_sysctl.c b/sys/kern/init_sysctl.c index fe7b38efca2..babf7d74779 100644 --- a/sys/kern/init_sysctl.c +++ b/sys/kern/init_sysctl.c @@ -1,4 +1,4 @@ -/* $NetBSD: init_sysctl.c,v 1.181 2011/05/24 16:39:56 joerg Exp $ */ +/* $NetBSD: init_sysctl.c,v 1.182 2011/07/23 11:38:28 jym 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.181 2011/05/24 16:39:56 joerg Exp $"); +__KERNEL_RCSID(0, "$NetBSD: init_sysctl.c,v 1.182 2011/07/23 11:38:28 jym Exp $"); #include "opt_sysv.h" #include "opt_compat_netbsd.h" @@ -735,15 +735,18 @@ SYSCTL_SETUP(sysctl_kern_setup, "sysctl kern subtree setup") 0, CTL_CREATE, CTL_EOL); sysctl_createv(clog, 0, NULL, NULL, +#ifndef KERN_SA + CTLFLAG_IMMEDIATE| +#endif CTLFLAG_PERMANENT|CTLFLAG_READWRITE, CTLTYPE_INT, "no_sa_support", SYSCTL_DESCR("0 if the kernel supports SA, otherwise " "it doesn't"), NULL, -#ifdef KERN_SA - 0, &sa_system_disabled, -#else +#ifndef KERN_SA 1, NULL, +#else + 0, &sa_system_disabled, #endif 0, CTL_KERN, CTL_CREATE, CTL_EOL); |
