diff options
| author | Greg Lehey <grog@FreeBSD.org> | 1999-03-13 07:22:00 +0000 |
|---|---|---|
| committer | Greg Lehey <grog@FreeBSD.org> | 1999-03-13 07:22:00 +0000 |
| commit | e80e86a3020947ae3847ae0fa6d77d6e5c858528 (patch) | |
| tree | da8db3a90f2c29b12e660023c5ef13cda9b5d82f | |
| parent | 4cc4752c03beed3300ccfddfaa593d02254c2e98 (diff) | |
Notes
| -rw-r--r-- | sys/dev/vinum/vinum.c | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/sys/dev/vinum/vinum.c b/sys/dev/vinum/vinum.c index 273a0d1d46c88..01a2a9cf9ef2d 100644 --- a/sys/dev/vinum/vinum.c +++ b/sys/dev/vinum/vinum.c @@ -145,16 +145,19 @@ vinumattach(void *dummy) } /* - * Check if we have anything open. If so, return 0 (not inactive), - * otherwise 1 (inactive) + * Check if we have anything open. If confopen is != 0, + * that goes for the super device as well, otherwise + * only for volumes. + * + * Return 0 if not inactive, 1 if inactive. */ int -vinum_inactive(void) +vinum_inactive(int confopen) { int i; int can_do = 1; /* assume we can do it */ - if (vinum_conf.flags & VF_OPEN) /* open by vinum(8)? */ + if (confopen && (vinum_conf.flags & VF_OPEN)) /* open by vinum(8)? */ return 0; /* can't do it while we're open */ lock_config(); for (i = 0; i < vinum_conf.volumes_used; i++) { @@ -223,7 +226,7 @@ vinum_modevent(module_t mod, modeventtype_t type, void *unused) vinumattach(NULL); return 0; /* OK */ case MOD_UNLOAD: - if (!vinum_inactive()) /* is anything open? */ + if (!vinum_inactive(1)) /* is anything open? */ return EBUSY; /* yes, we can't do it */ vinum_conf.flags |= VF_STOPPING; /* note that we want to stop */ sync(curproc, &dummyarg); /* write out buffers */ |
