diff options
author | julian <julian@FreeBSD.org> | 1998-07-04 22:30:26 +0000 |
---|---|---|
committer | julian <julian@FreeBSD.org> | 1998-07-04 22:30:26 +0000 |
commit | 0262543b5f83779b740399f4b8e107618d149997 (patch) | |
tree | 089ad4ebaec66b188dddc6918932d35b7dc8cb70 /sys/i386/isa/labpc.c | |
parent | 29cbc265b1c33cbb4deb6416d04fc45ac6d03869 (diff) | |
download | FreeBSD-src-0262543b5f83779b740399f4b8e107618d149997.zip FreeBSD-src-0262543b5f83779b740399f4b8e107618d149997.tar.gz |
There is no such thing any more as "struct bdevsw".
There is only cdevsw (which should be renamed in a later edit to deventry
or something). cdevsw contains the union of what were in both bdevsw an
cdevsw entries. The bdevsw[] table stiff exists and is a second pointer
to the cdevsw entry of the device. it's major is in d_bmaj rather than
d_maj. some cleanup still to happen (e.g. dsopen now gets two pointers
to the same cdevsw struct instead of one to a bdevsw and one to a cdevsw).
rawread()/rawwrite() went away as part of this though it's not strictly
the same patch, just that it involves all the same lines in the drivers.
cdroms no longer have write() entries (they did have rawwrite (?)).
tapes no longer have support for bdev operations.
Reviewed by: Eivind Eklund and Mike Smith
Changes suggested by eivind.
Diffstat (limited to 'sys/i386/isa/labpc.c')
-rw-r--r-- | sys/i386/isa/labpc.c | 21 |
1 files changed, 18 insertions, 3 deletions
diff --git a/sys/i386/isa/labpc.c b/sys/i386/isa/labpc.c index 3a5b0a6..c77d3fc 100644 --- a/sys/i386/isa/labpc.c +++ b/sys/i386/isa/labpc.c @@ -283,6 +283,8 @@ static int labpcprobe(struct isa_device *dev); struct isa_driver labpcdriver = { labpcprobe, labpcattach, "labpc", 0 }; +static d_read_t labpcread; +static d_write_t labpcwrite; static d_open_t labpcopen; static d_close_t labpcclose; static d_ioctl_t labpcioctl; @@ -290,8 +292,8 @@ static d_strategy_t labpcstrategy; #define CDEV_MAJOR 66 static struct cdevsw labpc_cdevsw = - { labpcopen, labpcclose, rawread, rawwrite, /*66*/ - labpcioctl, nostop, nullreset, nodevtotty,/* labpc */ + { labpcopen, labpcclose, labpcread, labpcwrite, + labpcioctl, nostop, nullreset, nodevtotty, seltrue, nommap, labpcstrategy, "labpc", NULL, -1 }; static void start(struct ctlr *ctlr); @@ -756,7 +758,20 @@ labpcclose(dev_t dev, int flags, int fmt, struct proc *p) return 0; } -/* Start: Start a frame going in or out. +static int +labpcread( dev_t dev, struct uio *uio, int ioflag) +{ + return (physio(labpcstrategy, NULL, dev, 1, minphys, uio)); +} + +static int +labpcwrite ( dev_t dev, struct uio *uio, int ioflag) +{ + return (physio(labpcstrategy, NULL, dev, 0, minphys, uio)); +} + +/* + * Start: Start a frame going in or out. */ static void start(struct ctlr *ctlr) |