1 /* conf.c 4.15 82/12/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 error; 17 18 io->i_flgs |= F_RDDATA; 19 error = (*devsw[io->i_ino.i_dev].dv_strategy)(io, READ); 20 io->i_flgs &= ~F_TYPEMASK; 21 return (error); 22 } 23 24 devwrite(io) 25 register struct iob *io; 26 { 27 int error; 28 29 io->i_flgs |= F_WRDATA; 30 error = (*devsw[io->i_ino.i_dev].dv_strategy)(io, WRITE); 31 io->i_flgs &= ~F_TYPEMASK; 32 return (error); 33 } 34 35 devopen(io) 36 register struct iob *io; 37 { 38 39 (*devsw[io->i_ino.i_dev].dv_open)(io); 40 } 41 42 devclose(io) 43 register struct iob *io; 44 { 45 46 (*devsw[io->i_ino.i_dev].dv_close)(io); 47 } 48 49 devioctl(io, cmd, arg) 50 register struct iob *io; 51 int cmd; 52 caddr_t arg; 53 { 54 55 return ((*devsw[io->i_ino.i_dev].dv_ioctl)(io, cmd, arg)); 56 } 57 58 /*ARGSUSED*/ 59 nullsys(io) 60 struct iob *io; 61 { 62 63 ; 64 } 65 66 /*ARGSUSED*/ 67 nullioctl(io, cmd, arg) 68 struct iob *io; 69 int cmd; 70 caddr_t arg; 71 { 72 73 return (ECMD); 74 } 75 76 int nullsys(), nullioctl(); 77 #if defined(VAX780) || defined(VAX750) 78 int hpstrategy(), hpopen(), hpioctl(); 79 #endif 80 int upstrategy(), upopen(), upioctl(); 81 int rkstrategy(), rkopen(), rkioctl(); 82 int udstrategy(), udopen(), udioctl(); 83 int idcstrategy(), idcopen(), idcioctl(); 84 #ifndef BOOT 85 int tmstrategy(), tmopen(), tmclose(); 86 int tsstrategy(), tsopen(), tsclose(); 87 #if defined(VAX780) || defined(VAX750) 88 int htstrategy(), htopen(), htclose(); 89 int mtstrategy(), mtopen(), mtclose(); 90 #endif 91 int utstrategy(), utopen(), utclose(); 92 #endif 93 94 struct devsw devsw[] = { 95 #if defined(VAX780) || defined(VAX750) 96 { "hp", hpstrategy, hpopen, nullsys, hpioctl }, 97 #endif 98 { "up", upstrategy, upopen, nullsys, upioctl }, 99 { "hk", rkstrategy, rkopen, nullsys, rkioctl }, 100 { "ra", udstrategy, udopen, nullsys, udioctl }, 101 #if defined(VAX730) 102 { "rb", idcstrategy, idcopen, nullsys, idcioctl }, 103 #endif 104 #ifndef BOOT 105 { "ts", tsstrategy, tsopen, tsclose, nullioctl }, 106 #if defined(VAX780) || defined(VAX750) 107 { "ht", htstrategy, htopen, htclose, nullioctl }, 108 { "mt", mtstrategy, mtopen, mtclose, nullioctl }, 109 #endif 110 { "tm", tmstrategy, tmopen, tmclose, nullioctl }, 111 { "ut", utstrategy, utopen, utclose, nullioctl }, 112 #endif 113 { 0, 0, 0, 0, 0 }, 114 }; 115