Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/kern When KERN_SA is not defined, kern.no_sa_support is ...



details:   https://anonhg.NetBSD.org/src/rev/a71153065878
branches:  trunk
changeset: 767583:a71153065878
user:      jym <jym%NetBSD.org@localhost>
date:      Sat Jul 23 11:38:28 2011 +0000

description:
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:

 sys/kern/init_sysctl.c |  13 ++++++++-----
 1 files changed, 8 insertions(+), 5 deletions(-)

diffs (40 lines):

diff -r 1fb3daad73ce -r a71153065878 sys/kern/init_sysctl.c
--- a/sys/kern/init_sysctl.c    Sat Jul 23 09:59:14 2011 +0000
+++ b/sys/kern/init_sysctl.c    Sat Jul 23 11:38:28 2011 +0000
@@ -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 @@
                       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
+#ifndef KERN_SA
+                      1, NULL,
+#else
                       0, &sa_system_disabled,
-#else
-                      1, NULL,
 #endif
                       0,
                       CTL_KERN, CTL_CREATE, CTL_EOL);



Home | Main Index | Thread Index | Old Index