1*1913Swnj /* conf.c 4.4 12/17/80 */ 2318Sbill 3318Sbill #include "../h/param.h" 4318Sbill #include "../h/inode.h" 5421Sbill #include "../h/pte.h" 6318Sbill #include "../h/mba.h" 7318Sbill #include "saio.h" 8318Sbill 9318Sbill devread(io) 10318Sbill register struct iob *io; 11318Sbill { 12318Sbill 13318Sbill return( (*devsw[io->i_ino.i_dev].dv_strategy)(io,READ) ); 14318Sbill } 15318Sbill 16318Sbill devwrite(io) 17318Sbill register struct iob *io; 18318Sbill { 19318Sbill return( (*devsw[io->i_ino.i_dev].dv_strategy)(io, WRITE) ); 20318Sbill } 21318Sbill 22318Sbill devopen(io) 23318Sbill register struct iob *io; 24318Sbill { 25318Sbill (*devsw[io->i_ino.i_dev].dv_open)(io); 26318Sbill } 27318Sbill 28318Sbill devclose(io) 29318Sbill register struct iob *io; 30318Sbill { 31318Sbill (*devsw[io->i_ino.i_dev].dv_close)(io); 32318Sbill } 33318Sbill 34318Sbill nullsys() 35318Sbill { ; } 36318Sbill 37318Sbill int nullsys(); 38*1913Swnj #if VAX==780 39318Sbill int hpstrategy(), hpopen(); 40318Sbill int htstrategy(), htopen(), htclose(); 41*1913Swnj #endif 42318Sbill int upstrategy(), upopen(); 431812Sbill int tmstrategy(), tmopen(), tmclose(); 44*1913Swnj int rkopen(),rkstrategy(); 45318Sbill 46318Sbill struct devsw devsw[] = { 47*1913Swnj #if VAX==780 48318Sbill "hp", hpstrategy, hpopen, nullsys, 49318Sbill "ht", htstrategy, htopen, htclose, 50*1913Swnj #endif 51318Sbill "up", upstrategy, upopen, nullsys, 521812Sbill "tm", tmstrategy, tmopen, tmclose, 53*1913Swnj "rk", rkstrategy, rkopen, ullsys, 54318Sbill 0,0,0,0 55318Sbill }; 56318Sbill 57*1913Swnj #if VAX==780 58318Sbill int mbanum[] = { /* mba number of major device */ 59318Sbill 0, /* disk */ 60318Sbill 1, /* tape */ 61318Sbill -1, /* unused */ 62318Sbill }; 63318Sbill 64318Sbill int *mbaloc[] = { /* physical location of mba */ 65318Sbill (int *)PHYSMBA0, 66318Sbill (int *)PHYSMBA1, 67318Sbill }; 68*1913Swnj #endif 69