Module Name: src Committed By: jym Date: Sat Jul 23 11:38:28 UTC 2011
Modified Files: src/sys/kern: init_sysctl.c Log Message: 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@. To generate a diff of this commit: cvs rdiff -u -r1.181 -r1.182 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.181 src/sys/kern/init_sysctl.c:1.182 --- src/sys/kern/init_sysctl.c:1.181 Tue May 24 16:39:56 2011 +++ src/sys/kern/init_sysctl.c Sat Jul 23 11:38:28 2011 @@ -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 - 0, &sa_system_disabled, -#else +#ifndef KERN_SA 1, NULL, +#else + 0, &sa_system_disabled, #endif 0, CTL_KERN, CTL_CREATE, CTL_EOL);