Merged from sys/isa/fd.c revision 1.187.

Pointed out by:	nyan
This commit is contained in:
kato 2000-09-15 05:47:56 +00:00
parent 37dfc2d16a
commit 47e940e343
2 changed files with 10 additions and 2 deletions

View File

@ -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);

View File

@ -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);