summaryrefslogtreecommitdiffstats
path: root/sys/dev
diff options
context:
space:
mode:
authorgrog <grog@FreeBSD.org>1999-06-22 05:36:13 +0000
committergrog <grog@FreeBSD.org>1999-06-22 05:36:13 +0000
commit1cfd386cb0165015cee5a81d0f2fb02d04c9dc1f (patch)
tree1a8b75da9329195c9bbaca6e5fbe3be08b1e64d4 /sys/dev
parent9cb4fddb16a3a4a2f3ef1786650adf682c34b4af (diff)
downloadFreeBSD-src-1cfd386cb0165015cee5a81d0f2fb02d04c9dc1f.zip
FreeBSD-src-1cfd386cb0165015cee5a81d0f2fb02d04c9dc1f.tar.gz
Modify to work with phk's latest mods to cdevsw. This is a temporary
fix; it doesn't address the problem of removing the module. If you do the following: vinum stop fsck /dev/vinum/VOLUME you *will* get a system crash. What we need is a cdevsw_remove corresponding to cdevsw_add, but that hasn't been written yet. Submitted-by: phk
Diffstat (limited to 'sys/dev')
-rw-r--r--sys/dev/vinum/vinum.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/sys/dev/vinum/vinum.c b/sys/dev/vinum/vinum.c
index 902b10b..b9aee95 100644
--- a/sys/dev/vinum/vinum.c
+++ b/sys/dev/vinum/vinum.c
@@ -52,10 +52,10 @@ extern struct mc malloced[];
STATIC struct cdevsw vinum_cdevsw =
{
vinumopen, vinumclose, physread, physwrite,
- vinumioctl, nostop, nullreset, nodevtotty,
+ vinumioctl, nostop, noreset, nodevtotty,
seltrue, nommap, vinumstrategy, "vinum",
- NULL, -1, vinumdump, vinumsize,
- D_DISK, 0, -1
+ NULL, CDEV_MAJOR, vinumdump, vinumsize,
+ D_DISK, 0, BDEV_MAJOR
};
/* Called by main() during pseudo-device attachment. */
@@ -85,7 +85,7 @@ vinumattach(void *dummy)
daemonq = NULL; /* initialize daemon's work queue */
dqend = NULL;
- cdevsw_add_generic(BDEV_MAJOR, CDEV_MAJOR, &vinum_cdevsw);
+ cdevsw_add(&vinum_cdevsw); /* add the cdevsw entry */
#ifdef DEVFS
#error DEVFS not finished yet
#endif
@@ -236,7 +236,6 @@ vinum_modevent(module_t mod, modeventtype_t type, void *unused)
}
}
#endif
- cdevsw[CDEV_MAJOR] = NULL; /* no cdevsw any more */
log(LOG_INFO, "vinum: unloaded\n"); /* tell the world */
return 0;
default:
OpenPOWER on IntegriCloud