diff options
author | kato <kato@FreeBSD.org> | 2000-09-15 05:47:56 +0000 |
---|---|---|
committer | kato <kato@FreeBSD.org> | 2000-09-15 05:47:56 +0000 |
commit | e80d3b3345449a2d662e3084e55cab1c2bb8afde (patch) | |
tree | ee50462350f8b75a3d8092aff05c7a223c05a64c /sys | |
parent | 650d266497403254d9f2b1bd744c1977c5773acb (diff) | |
download | FreeBSD-src-e80d3b3345449a2d662e3084e55cab1c2bb8afde.zip FreeBSD-src-e80d3b3345449a2d662e3084e55cab1c2bb8afde.tar.gz |
Merged from sys/isa/fd.c revision 1.187.
Pointed out by: nyan
Diffstat (limited to 'sys')
-rw-r--r-- | sys/pc98/cbus/fdc.c | 6 | ||||
-rw-r--r-- | sys/pc98/pc98/fd.c | 6 |
2 files changed, 10 insertions, 2 deletions
diff --git a/sys/pc98/cbus/fdc.c b/sys/pc98/cbus/fdc.c index beb2c98..a21cb8a 100644 --- a/sys/pc98/cbus/fdc.c +++ b/sys/pc98/cbus/fdc.c @@ -1385,10 +1385,14 @@ fd_attach(device_t dev) int typemynor; int typesize; #endif + static int cdevsw_add_done = 0; fd = device_get_softc(dev); - cdevsw_add(&fd_cdevsw); /* XXX */ + if (!cdevsw_add_done) { + cdevsw_add(&fd_cdevsw); /* XXX */ + cdevsw_add_done++; + } make_dev(&fd_cdevsw, (fd->fdu << 6), UID_ROOT, GID_OPERATOR, 0640, "rfd%d", fd->fdu); diff --git a/sys/pc98/pc98/fd.c b/sys/pc98/pc98/fd.c index beb2c98..a21cb8a 100644 --- a/sys/pc98/pc98/fd.c +++ b/sys/pc98/pc98/fd.c @@ -1385,10 +1385,14 @@ fd_attach(device_t dev) int typemynor; int typesize; #endif + static int cdevsw_add_done = 0; fd = device_get_softc(dev); - cdevsw_add(&fd_cdevsw); /* XXX */ + if (!cdevsw_add_done) { + cdevsw_add(&fd_cdevsw); /* XXX */ + cdevsw_add_done++; + } make_dev(&fd_cdevsw, (fd->fdu << 6), UID_ROOT, GID_OPERATOR, 0640, "rfd%d", fd->fdu); |