summaryrefslogtreecommitdiffstats
path: root/sys/fs/devfs/devfs_devs.c
diff options
context:
space:
mode:
authormsmith <msmith@FreeBSD.org>2002-01-09 01:00:20 +0000
committermsmith <msmith@FreeBSD.org>2002-01-09 01:00:20 +0000
commit299ff2a7767d019dd465b29f6315329db13086fb (patch)
treee7cd252bd4a9e5ddd24e7c6875c2500f8c6d83b8 /sys/fs/devfs/devfs_devs.c
parenteecd48130b417db8749f726eff66c74df093f894 (diff)
downloadFreeBSD-src-299ff2a7767d019dd465b29f6315329db13086fb.zip
FreeBSD-src-299ff2a7767d019dd465b29f6315329db13086fb.tar.gz
Use a sysinit to initialise the devfs hooks in kern_conf.c rather than common
variables. Reviewed by: phk (in principle)
Diffstat (limited to 'sys/fs/devfs/devfs_devs.c')
-rw-r--r--sys/fs/devfs/devfs_devs.c13
1 files changed, 10 insertions, 3 deletions
diff --git a/sys/fs/devfs/devfs_devs.c b/sys/fs/devfs/devfs_devs.c
index f5951e6..4db217d 100644
--- a/sys/fs/devfs/devfs_devs.c
+++ b/sys/fs/devfs/devfs_devs.c
@@ -429,7 +429,14 @@ devfs_destroy(dev_t dev)
}
}
-devfs_create_t *devfs_create_hook = devfs_create;
-devfs_destroy_t *devfs_destroy_hook = devfs_destroy;
-int devfs_present = 1;
+static void
+devfs_init(void *junk)
+{
+ devfs_create_hook = devfs_create;
+ devfs_destroy_hook = devfs_destroy;
+ devfs_present = 1;
+}
+
+SYSINIT(devfs, SI_SUB_DRIVERS, SI_ORDER_FIRST, devfs_init, NULL);
+
#endif
OpenPOWER on IntegriCloud