summaryrefslogtreecommitdiff
path: root/sys/kern/subr_disk.c
diff options
context:
space:
mode:
authorPoul-Henning Kamp <phk@FreeBSD.org>2001-05-24 20:27:16 +0000
committerPoul-Henning Kamp <phk@FreeBSD.org>2001-05-24 20:27:16 +0000
commit8576c652b40506b960403757be2543b8d49f1af4 (patch)
treea296ee0d1d9834503bcfa44a8f726150d7c5ccfb /sys/kern/subr_disk.c
parent640f0e5d3c9057c5c6b1d4101ef2bee31ed2ad86 (diff)
Notes
Diffstat (limited to 'sys/kern/subr_disk.c')
-rw-r--r--sys/kern/subr_disk.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/sys/kern/subr_disk.c b/sys/kern/subr_disk.c
index 5e90426e1c36..c50c21aeea20 100644
--- a/sys/kern/subr_disk.c
+++ b/sys/kern/subr_disk.c
@@ -109,15 +109,13 @@ disk_create(int unit, struct disk *dp, int flags, struct cdevsw *cdevsw, struct
bzero(dp, sizeof(*dp));
- dev = makedev(cdevsw->d_maj, 0);
- if (!devsw(dev)) {
+ if (proto->d_open != diskopen) {
*proto = *cdevsw;
proto->d_open = diskopen;
proto->d_close = diskclose;
proto->d_ioctl = diskioctl;
proto->d_strategy = diskstrategy;
proto->d_psize = diskpsize;
- cdevsw_add(proto);
}
if (bootverbose)