diff options
author | peter <peter@FreeBSD.org> | 1999-05-02 20:38:08 +0000 |
---|---|---|
committer | peter <peter@FreeBSD.org> | 1999-05-02 20:38:08 +0000 |
commit | 88ade5bec861a56d13a88a0dfb5363c29641fbbc (patch) | |
tree | c4a919ccd0378b61bce3b10b644792fecda2ddd6 /sys/isa | |
parent | 54dfe89d2e5426032857ba5ebb1f4fb5eba823af (diff) | |
download | FreeBSD-src-88ade5bec861a56d13a88a0dfb5363c29641fbbc.zip FreeBSD-src-88ade5bec861a56d13a88a0dfb5363c29641fbbc.tar.gz |
Disable FDC_YE - it's broken at present (breaking LINT) and awaiting some
pccard fixups.
Make DEVFS compile, it breaks LINT.
Diffstat (limited to 'sys/isa')
-rw-r--r-- | sys/isa/fd.c | 43 |
1 files changed, 26 insertions, 17 deletions
diff --git a/sys/isa/fd.c b/sys/isa/fd.c index d465911..5ffa489 100644 --- a/sys/isa/fd.c +++ b/sys/isa/fd.c @@ -47,7 +47,7 @@ * SUCH DAMAGE. * * from: @(#)fd.c 7.4 (Berkeley) 5/25/91 - * $Id: fd.c,v 1.135 1999/04/16 21:22:19 peter Exp $ + * $Id: fd.c,v 1.136 1999/04/27 11:14:56 phk Exp $ * */ @@ -91,6 +91,11 @@ #include <i386/isa/fdc.h> #include <i386/isa/rtc.h> +#ifdef FDC_YE +#undef FDC_YE +#warning "fix FDC_YE! - newbus casualty" +#endif + /* misuse a flag to identify format operation */ #define B_FORMAT B_XXX @@ -374,7 +379,13 @@ static d_close_t fdclose; static d_ioctl_t fdioctl; static d_strategy_t fdstrategy; -/* even if SLICE defined, these are needed for the ft support. */ +static struct cdevsw fd_cdevsw = { + Fdopen, fdclose, fdread, fdwrite, + fdioctl, nostop, nullreset, nodevtotty, + seltrue, nommap, fdstrategy, "fd", + NULL, -1, nodump, nopsize, + D_DISK, 0, -1 +}; #define CDEV_MAJOR 9 #define BDEV_MAJOR 2 @@ -884,17 +895,23 @@ static int fd_attach(device_t dev) { struct fd_data *fd; +#ifdef DEVFS + int i; + int mynor; + int typemynor; + int typesize; +#endif fd = device_get_softc(dev); #ifdef DEVFS /* XXX bitrot */ - mynor = fdu << 6; + mynor = fd->fdu << 6; fd->bdevs[0] = devfs_add_devswf(&fd_cdevsw, mynor, DV_BLK, UID_ROOT, GID_OPERATOR, 0640, - "fd%d", fdu); + "fd%d", fd->fdu); fd->cdevs[0] = devfs_add_devswf(&fd_cdevsw, mynor, DV_CHR, UID_ROOT, GID_OPERATOR, 0640, - "rfd%d", fdu); + "rfd%d", fd->fdu); for (i = 1; i < 1 + NUMDENS; i++) { /* * XXX this and the lookup in Fdopen() should be @@ -935,19 +952,19 @@ fd_attach(device_t dev) fd->bdevs[i] = devfs_add_devswf(&fd_cdevsw, typemynor, DV_BLK, UID_ROOT, GID_OPERATOR, 0640, - "fd%d.%d", fdu, typesize); + "fd%d.%d", fd->fdu, typesize); fd->cdevs[i] = devfs_add_devswf(&fd_cdevsw, typemynor, DV_CHR, UID_ROOT, GID_OPERATOR, 0640, - "rfd%d.%d", fdu, typesize); + "rfd%d.%d", fd->fdu, typesize); } for (i = 0; i < MAXPARTITIONS; i++) { fd->bdevs[1 + NUMDENS + i] = devfs_makelink(fd->bdevs[0], - "fd%d%c", fdu, 'a' + i); + "fd%d%c", fd->fdu, 'a' + i); fd->cdevs[1 + NUMDENS + i] = devfs_makelink(fd->cdevs[0], - "rfd%d%c", fdu, 'a' + i); + "rfd%d%c", fd->fdu, 'a' + i); } #endif /* DEVFS */ /* @@ -2363,14 +2380,6 @@ static driver_t fd_driver = { sizeof(struct fd_data) }; -static struct cdevsw fd_cdevsw = { - Fdopen, fdclose, fdread, fdwrite, - fdioctl, nostop, nullreset, nodevtotty, - seltrue, nommap, fdstrategy, "fd", - NULL, -1, nodump, nopsize, - D_DISK, 0, -1 -}; - BDEV_DRIVER_MODULE(fd, fdc, fd_driver, fd_devclass, BDEV_MAJOR, CDEV_MAJOR, fd_cdevsw, 0, 0); |