Commit | Line | Data |
---|---|---|
bfa061f4 | 1 | /* conf.c 4.2 %G% */ |
c7ebcc4e BJ |
2 | |
3 | #include "../h/param.h" | |
4 | #include "../h/inode.h" | |
f7acbdcc | 5 | #include "../h/pte.h" |
c7ebcc4e BJ |
6 | #include "../h/mba.h" |
7 | #include "saio.h" | |
8 | ||
9 | devread(io) | |
10 | register struct iob *io; | |
11 | { | |
12 | ||
13 | return( (*devsw[io->i_ino.i_dev].dv_strategy)(io,READ) ); | |
14 | } | |
15 | ||
16 | devwrite(io) | |
17 | register struct iob *io; | |
18 | { | |
19 | return( (*devsw[io->i_ino.i_dev].dv_strategy)(io, WRITE) ); | |
20 | } | |
21 | ||
22 | devopen(io) | |
23 | register struct iob *io; | |
24 | { | |
25 | (*devsw[io->i_ino.i_dev].dv_open)(io); | |
26 | } | |
27 | ||
28 | devclose(io) | |
29 | register struct iob *io; | |
30 | { | |
31 | (*devsw[io->i_ino.i_dev].dv_close)(io); | |
32 | } | |
33 | ||
34 | nullsys() | |
35 | { ; } | |
36 | ||
37 | int nullsys(); | |
38 | int hpstrategy(), hpopen(); | |
39 | int htstrategy(), htopen(), htclose(); | |
40 | int upstrategy(), upopen(); | |
bfa061f4 | 41 | int tmstragety(), tmopen(), tmclose(); |
c7ebcc4e BJ |
42 | |
43 | struct devsw devsw[] = { | |
44 | "hp", hpstrategy, hpopen, nullsys, | |
45 | "ht", htstrategy, htopen, htclose, | |
46 | "up", upstrategy, upopen, nullsys, | |
bfa061f4 | 47 | "tm", tmstragety, tmopen, tmclose, |
c7ebcc4e BJ |
48 | 0,0,0,0 |
49 | }; | |
50 | ||
51 | int mbanum[] = { /* mba number of major device */ | |
52 | 0, /* disk */ | |
53 | 1, /* tape */ | |
54 | -1, /* unused */ | |
55 | }; | |
56 | ||
57 | int *mbaloc[] = { /* physical location of mba */ | |
58 | (int *)PHYSMBA0, | |
59 | (int *)PHYSMBA1, | |
60 | }; |