Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/miscfs/genfs When built as module, track sysctl node cre...
details: https://anonhg.NetBSD.org/src/rev/e61ddb5dfe09
branches: trunk
changeset: 779498:e61ddb5dfe09
user: pgoyette <pgoyette%NetBSD.org@localhost>
date: Thu May 31 15:07:29 2012 +0000
description:
When built as module, track sysctl node creations, and destroy them on
module exit.
diffstat:
sys/miscfs/genfs/layer_vfsops.c | 15 +++++++++++++--
1 files changed, 13 insertions(+), 2 deletions(-)
diffs (46 lines):
diff -r 0b220cad319c -r e61ddb5dfe09 sys/miscfs/genfs/layer_vfsops.c
--- a/sys/miscfs/genfs/layer_vfsops.c Thu May 31 13:16:39 2012 +0000
+++ b/sys/miscfs/genfs/layer_vfsops.c Thu May 31 15:07:29 2012 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: layer_vfsops.c,v 1.39 2012/02/01 05:34:42 dholland Exp $ */
+/* $NetBSD: layer_vfsops.c,v 1.40 2012/05/31 15:07:29 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.39 2012/02/01 05:34:42 dholland Exp $");
+__KERNEL_RCSID(0, "$NetBSD: layer_vfsops.c,v 1.40 2012/05/31 15:07:29 pgoyette Exp $");
#include <sys/param.h>
#include <sys/sysctl.h>
@@ -89,16 +89,27 @@
#include <miscfs/genfs/layer.h>
#include <miscfs/genfs/layer_extern.h>
+SYSCTL_SETUP_PROTO(sysctl_vfs_layerfs_setup);
+
MODULE(MODULE_CLASS_MISC, layerfs, NULL);
static int
layerfs_modcmd(modcmd_t cmd, void *arg)
{
+#ifdef _MODULE
+ static struct sysctllog *layerfs_clog = NULL;
+#endif
switch (cmd) {
case MODULE_CMD_INIT:
+#ifdef _MODULE
+ sysctl_vfs_layerfs_setup(&layerfs_clog);
+#endif
return 0;
case MODULE_CMD_FINI:
+#ifdef _MODULE
+ sysctl_teardown(&layerfs_clog);
+#endif
return 0;
default:
return ENOTTY;
Home |
Main Index |
Thread Index |
Old Index