Source-Changes-HG archive

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

[src/trunk]: src/sys/miscfs/genfs Ooopppsss! sysctl nodes created during mod...



details:   https://anonhg.NetBSD.org/src/rev/a92920894928
branches:  trunk
changeset: 779499:a92920894928
user:      pgoyette <pgoyette%NetBSD.org@localhost>
date:      Thu May 31 16:08:14 2012 +0000

description:
Ooopppsss!  sysctl nodes created during module load time cannot be
PERMANENT

diffstat:

 sys/miscfs/genfs/layer_vfsops.c |  17 ++++++++++++++---
 1 files changed, 14 insertions(+), 3 deletions(-)

diffs (51 lines):

diff -r e61ddb5dfe09 -r a92920894928 sys/miscfs/genfs/layer_vfsops.c
--- a/sys/miscfs/genfs/layer_vfsops.c   Thu May 31 15:07:29 2012 +0000
+++ b/sys/miscfs/genfs/layer_vfsops.c   Thu May 31 16:08:14 2012 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: layer_vfsops.c,v 1.40 2012/05/31 15:07:29 pgoyette Exp $       */
+/*     $NetBSD: layer_vfsops.c,v 1.41 2012/05/31 16:08:14 pgoyette Exp $       */
 
 /*
  * Copyright (c) 1999 National Aeronautics & Space Administration
@@ -74,7 +74,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: layer_vfsops.c,v 1.40 2012/05/31 15:07:29 pgoyette Exp $");
+__KERNEL_RCSID(0, "$NetBSD: layer_vfsops.c,v 1.41 2012/05/31 16:08:14 pgoyette Exp $");
 
 #include <sys/param.h>
 #include <sys/sysctl.h>
@@ -275,12 +275,20 @@
        const struct sysctlnode *layerfs_node = NULL;
 
        sysctl_createv(clog, 0, NULL, NULL,
+#ifdef _MODULE
+                      0,
+#else
                       CTLFLAG_PERMANENT,
+#endif
                       CTLTYPE_NODE, "vfs", NULL,
                       NULL, 0, NULL, 0,
                       CTL_VFS, CTL_EOL);
        sysctl_createv(clog, 0, NULL, &layerfs_node,
+#ifdef _MODULE
+                      0,
+#else
                       CTLFLAG_PERMANENT,
+#endif
                       CTLTYPE_NODE, "layerfs",
                       SYSCTL_DESCR("Generic layered file system"),
                       NULL, 0, NULL, 0,
@@ -288,7 +296,10 @@
 
 #ifdef LAYERFS_DIAGNOSTIC
        sysctl_createv(clog, 0, &layerfs_node, NULL,
-                      CTLFLAG_PERMANENT|CTLFLAG_READWRITE,
+#ifndef _MODULE
+                      CTLFLAG_PERMANENT |
+#endif
+                      CTLFLAG_READWRITE,
                       CTLTYPE_INT,
                       "debug",
                       SYSCTL_DESCR("Verbose debugging messages"),



Home | Main Index | Thread Index | Old Index