diff options
| author | Poul-Henning Kamp <phk@FreeBSD.org> | 2001-05-24 20:27:16 +0000 |
|---|---|---|
| committer | Poul-Henning Kamp <phk@FreeBSD.org> | 2001-05-24 20:27:16 +0000 |
| commit | 8576c652b40506b960403757be2543b8d49f1af4 (patch) | |
| tree | a296ee0d1d9834503bcfa44a8f726150d7c5ccfb /sys/kern/subr_disk.c | |
| parent | 640f0e5d3c9057c5c6b1d4101ef2bee31ed2ad86 (diff) | |
Notes
Diffstat (limited to 'sys/kern/subr_disk.c')
| -rw-r--r-- | sys/kern/subr_disk.c | 4 |
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) |
