diff options
| author | Poul-Henning Kamp <phk@FreeBSD.org> | 1996-07-24 13:35:34 +0000 |
|---|---|---|
| committer | Poul-Henning Kamp <phk@FreeBSD.org> | 1996-07-24 13:35:34 +0000 |
| commit | fe1624a4ffa87e2b3678f303390dd96434a5040d (patch) | |
| tree | e67c61c1cefd6d196ad088e4501f783a577c0a2d /sys | |
| parent | 57948c0b54ffac4d92c3d9b153172b1d1c2bb05b (diff) | |
Notes
Diffstat (limited to 'sys')
| -rw-r--r-- | sys/i386/isa/wcd.c | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/sys/i386/isa/wcd.c b/sys/i386/isa/wcd.c index ea040986d9d82..2723204a95ba8 100644 --- a/sys/i386/isa/wcd.c +++ b/sys/i386/isa/wcd.c @@ -47,11 +47,17 @@ static d_strategy_t wcdstrategy; #define CDEV_MAJOR 69 #define BDEV_MAJOR 19 -static struct cdevsw wcd_cdevsw; +extern struct cdevsw wcd_cdevsw; static struct bdevsw wcd_bdevsw = { wcdbopen, wcdbclose, wcdstrategy, wcdioctl, /*19*/ nodump, nopsize, 0, "wcd", &wcd_cdevsw, -1 }; +static struct cdevsw wcd_cdevsw = + { wcdropen, wcdrclose, rawread, nowrite, /*69*/ + wcdioctl, nostop, nullreset, nodevtotty,/* atapi */ + seltrue, nommap, wcdstrategy, "wcd", + &wcd_bdevsw, -1 }; + #ifndef ATAPI_STATIC static #endif @@ -1226,9 +1232,13 @@ static wcd_devsw_installed = 0; static void wcd_drvinit(void *unused) { + dev_t dev; if( ! wcd_devsw_installed ) { - bdevsw_add_generic(BDEV_MAJOR,CDEV_MAJOR, &wcd_bdevsw); + dev = makedev(CDEV_MAJOR, 0); + cdevsw_add(&dev,&wcd_cdevsw, NULL); + dev = makedev(BDEV_MAJOR, 0); + bdevsw_add(&dev,&wcd_bdevsw, NULL); wcd_devsw_installed = 1; } } |
