aboutsummaryrefslogtreecommitdiff
path: root/sys/dev
diff options
context:
space:
mode:
authorJoerg Wunsch <joerg@FreeBSD.org>2003-02-11 21:12:43 +0000
committerJoerg Wunsch <joerg@FreeBSD.org>2003-02-11 21:12:43 +0000
commit1e35598c3acca1a40d1852bfb4a8d3db6ecf194b (patch)
tree0f365a3bdb69f4247d688d0cc12ce63b4bea9d0c /sys/dev
parent00ad14c702e4e3b192886282baef794aed071060 (diff)
Notes
Diffstat (limited to 'sys/dev')
-rw-r--r--sys/dev/vinum/vinum.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/sys/dev/vinum/vinum.c b/sys/dev/vinum/vinum.c
index 84056ff324b4e..d202442346614 100644
--- a/sys/dev/vinum/vinum.c
+++ b/sys/dev/vinum/vinum.c
@@ -73,6 +73,8 @@ struct _vinum_conf vinum_conf; /* configuration information */
dev_t vinum_daemon_dev;
dev_t vinum_super_dev;
+static eventhandler_tag dev_clone_tag;
+
/*
* Called by main() during pseudo-device attachment. All we need
* to do is allocate enough space for devices to be configured later, and
@@ -142,7 +144,7 @@ vinumattach(void *dummy)
vinum_conf.subdisks_allocated = INITIAL_SUBDISKS; /* number of sd slots allocated */
vinum_conf.subdisks_used = 0; /* and number in use */
- EVENTHANDLER_REGISTER(dev_clone, vinum_clone, 0, 1000);
+ dev_clone_tag = EVENTHANDLER_REGISTER(dev_clone, vinum_clone, 0, 1000);
/*
* See if the loader has passed us any of the
@@ -240,6 +242,8 @@ free_vinum(int cleardrive)
int i;
int drives_allocated = vinum_conf.drives_allocated;
+ EVENTHANDLER_DEREGISTER(dev_clone, dev_clone_tag);
+
if (DRIVE != NULL) {
if (cleardrive) { /* remove the vinum config */
for (i = 0; i < drives_allocated; i++)