|
|
1.1 ! root 1: #include "../h/param.h" ! 2: #include "../h/inode.h" ! 3: #include "../h/mba.h" ! 4: #include "saio.h" ! 5: ! 6: devread(io) ! 7: register struct iob *io; ! 8: { ! 9: ! 10: return( (*devsw[io->i_ino.i_dev].dv_strategy)(io,READ) ); ! 11: } ! 12: ! 13: devwrite(io) ! 14: register struct iob *io; ! 15: { ! 16: return( (*devsw[io->i_ino.i_dev].dv_strategy)(io, WRITE) ); ! 17: } ! 18: ! 19: devopen(io) ! 20: register struct iob *io; ! 21: { ! 22: (*devsw[io->i_ino.i_dev].dv_open)(io); ! 23: } ! 24: ! 25: devclose(io) ! 26: register struct iob *io; ! 27: { ! 28: (*devsw[io->i_ino.i_dev].dv_close)(io); ! 29: } ! 30: ! 31: nullsys() ! 32: { ; } ! 33: ! 34: int nullsys(); ! 35: int hpstrategy(), hpopen(); ! 36: int htstrategy(), htopen(), htclose(); ! 37: int upstrategy(), upopen(); ! 38: ! 39: struct devsw devsw[] = { ! 40: "hp", hpstrategy, hpopen, nullsys, ! 41: "ht", htstrategy, htopen, htclose, ! 42: "up", upstrategy, upopen, nullsys, ! 43: 0,0,0,0 ! 44: }; ! 45: ! 46: int mbanum[] = { /* mba number of major device */ ! 47: 0, /* disk */ ! 48: 1, /* tape */ ! 49: -1, /* unused */ ! 50: }; ! 51: ! 52: int *mbaloc[] = { /* physical location of mba */ ! 53: (int *)PHYSMBA0, ! 54: (int *)PHYSMBA1, ! 55: };
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.