1 /* conf.c 4.18 83/04/30 */ 2 3 #include "../machine/pte.h" 4 5 #include "../h/param.h" 6 #include "../h/inode.h" 7 #include "../h/fs.h" 8 9 #include "../vaxmba/mbareg.h" 10 11 #include "saio.h" 12 13 devread(io) 14 register struct iob *io; 15 { 16 int cc; 17 18 io->i_flgs |= F_RDDATA; 19 io->i_error = 0; 20 cc = (*devsw[io->i_ino.i_dev].dv_strategy)(io, READ); 21 io->i_flgs &= ~F_TYPEMASK; 22 return (cc); 23 } 24 25 devwrite(io) 26 register struct iob *io; 27 { 28 int cc; 29 30 io->i_flgs |= F_WRDATA; 31 io->i_error = 0; 32 cc = (*devsw[io->i_ino.i_dev].dv_strategy)(io, WRITE); 33 io->i_flgs &= ~F_TYPEMASK; 34 return (cc); 35 } 36 37 devopen(io) 38 register struct iob *io; 39 { 40 41 (*devsw[io->i_ino.i_dev].dv_open)(io); 42 } 43 44 devclose(io) 45 register struct iob *io; 46 { 47 48 (*devsw[io->i_ino.i_dev].dv_close)(io); 49 } 50 51 devioctl(io, cmd, arg) 52 register struct iob *io; 53 int cmd; 54 caddr_t arg; 55 { 56 57 return ((*devsw[io->i_ino.i_dev].dv_ioctl)(io, cmd, arg)); 58 } 59 60 /*ARGSUSED*/ 61 nullsys(io) 62 struct iob *io; 63 { 64 65 ; 66 } 67 68 /*ARGSUSED*/ 69 nullioctl(io, cmd, arg) 70 struct iob *io; 71 int cmd; 72 caddr_t arg; 73 { 74 75 return (ECMD); 76 } 77 78 int nullsys(), nullioctl(); 79 #if defined(VAX780) || defined(VAX750) 80 int hpstrategy(), hpopen(), hpioctl(); 81 #endif 82 int upstrategy(), upopen(), upioctl(); 83 int rkstrategy(), rkopen(), rkioctl(); 84 int rastrategy(), raopen(), raioctl(); 85 int idcstrategy(), idcopen(), idcioctl(); 86 #if defined(VAX780) || defined(VAX750) 87 int rlstrategy(), rlopen(), rlioctl(); 88 #endif 89 #ifndef BOOT 90 int tmstrategy(), tmopen(), tmclose(); 91 int tsstrategy(), tsopen(), tsclose(); 92 #if defined(VAX780) || defined(VAX750) 93 int htstrategy(), htopen(), htclose(); 94 int mtstrategy(), mtopen(), mtclose(); 95 #endif 96 int utstrategy(), utopen(), utclose(); 97 #endif 98 99 struct devsw devsw[] = { 100 #if defined(VAX780) || defined(VAX750) 101 { "hp", hpstrategy, hpopen, nullsys, hpioctl }, 102 #endif 103 { "up", upstrategy, upopen, nullsys, upioctl }, 104 { "hk", rkstrategy, rkopen, nullsys, rkioctl }, 105 { "ra", rastrategy, raopen, nullsys, raioctl }, 106 #if defined(VAX730) 107 { "rb", idcstrategy, idcopen, nullsys, idcioctl }, 108 #endif 109 #if defined(VAX780) || defined(VAX750) 110 { "rl", rlstrategy, rlopen, nullsys, rlioctl }, 111 #endif 112 #ifndef BOOT 113 { "ts", tsstrategy, tsopen, tsclose, nullioctl }, 114 #if defined(VAX780) || defined(VAX750) 115 { "ht", htstrategy, htopen, htclose, nullioctl }, 116 { "mt", mtstrategy, mtopen, mtclose, nullioctl }, 117 #endif 118 { "tm", tmstrategy, tmopen, tmclose, nullioctl }, 119 { "ut", utstrategy, utopen, utclose, nullioctl }, 120 #endif 121 { 0, 0, 0, 0, 0 }, 122 }; 123