|
|
1.1 ! root 1: /* conf.c 6.1 83/07/29 */ ! 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: #if defined(VAX780) || defined(VAX750) ! 83: int upstrategy(), upopen(), upioctl(); ! 84: #endif ! 85: int rkstrategy(), rkopen(), rkioctl(); ! 86: int rastrategy(), raopen(), raioctl(); ! 87: #if defined(VAX730) ! 88: int idcstrategy(), idcopen(), idcioctl(); ! 89: #endif ! 90: int rlstrategy(), rlopen(), rlioctl(); ! 91: #ifndef BOOT ! 92: int tmstrategy(), tmopen(), tmclose(); ! 93: int tsstrategy(), tsopen(), tsclose(); ! 94: #if defined(VAX780) || defined(VAX750) ! 95: int htstrategy(), htopen(), htclose(); ! 96: int mtstrategy(), mtopen(), mtclose(); ! 97: #endif ! 98: int utstrategy(), utopen(), utclose(); ! 99: #endif ! 100: ! 101: struct devsw devsw[] = { ! 102: #if defined(VAX780) || defined(VAX750) ! 103: { "hp", hpstrategy, hpopen, nullsys, hpioctl }, ! 104: #endif ! 105: #if defined(VAX780) || defined(VAX750) ! 106: { "up", upstrategy, upopen, nullsys, upioctl }, ! 107: #endif ! 108: { "hk", rkstrategy, rkopen, nullsys, rkioctl }, ! 109: { "ra", rastrategy, raopen, nullsys, raioctl }, ! 110: #if defined(VAX730) ! 111: { "rb", idcstrategy, idcopen, nullsys, idcioctl }, ! 112: #endif ! 113: { "rl", rlstrategy, rlopen, nullsys, rlioctl }, ! 114: #ifndef BOOT ! 115: { "ts", tsstrategy, tsopen, tsclose, nullioctl }, ! 116: #if defined(VAX780) || defined(VAX750) ! 117: { "ht", htstrategy, htopen, htclose, nullioctl }, ! 118: { "mt", mtstrategy, mtopen, mtclose, nullioctl }, ! 119: #endif ! 120: { "tm", tmstrategy, tmopen, tmclose, nullioctl }, ! 121: { "ut", utstrategy, utopen, utclose, nullioctl }, ! 122: #endif ! 123: { 0, 0, 0, 0, 0 }, ! 124: };
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.