| 1 | #include <sys/param.h> |
| 2 | #include <sys/inode.h> |
| 3 | #include "saio.h" |
| 4 | |
| 5 | devread(io) |
| 6 | register struct iob *io; |
| 7 | { |
| 8 | |
| 9 | return( (*devsw[io->i_ino.i_dev].dv_strategy)(io,READ) ); |
| 10 | } |
| 11 | |
| 12 | devwrite(io) |
| 13 | register struct iob *io; |
| 14 | { |
| 15 | return( (*devsw[io->i_ino.i_dev].dv_strategy)(io, WRITE) ); |
| 16 | } |
| 17 | |
| 18 | devopen(io) |
| 19 | register struct iob *io; |
| 20 | { |
| 21 | (*devsw[io->i_ino.i_dev].dv_open)(io); |
| 22 | } |
| 23 | |
| 24 | devclose(io) |
| 25 | register struct iob *io; |
| 26 | { |
| 27 | (*devsw[io->i_ino.i_dev].dv_close)(io); |
| 28 | } |
| 29 | |
| 30 | nullsys() |
| 31 | { ; } |
| 32 | |
| 33 | int rpstrategy(); |
| 34 | int rkstrategy(); |
| 35 | int nullsys(); |
| 36 | int tmstrategy(), tmrew(), tmopen(); |
| 37 | int htstrategy(), htopen(),htclose(); |
| 38 | int hpstrategy(); |
| 39 | struct devsw devsw[] { |
| 40 | "rp", rpstrategy, nullsys, nullsys, |
| 41 | "hp", hpstrategy, nullsys, nullsys, |
| 42 | "rk", rkstrategy, nullsys, nullsys, |
| 43 | "tm", tmstrategy, tmopen, tmrew, |
| 44 | "ht", htstrategy, htopen, htclose, |
| 45 | 0,0,0,0 |
| 46 | }; |