BSD 4_1_snap release
[unix-history] / sys / stand / conf.c.sam
CommitLineData
74a5ba06
C
1/* conf.c 4.9 81/12/01 */
2
3#include "../h/param.h"
4#include "../h/inode.h"
5#include "../h/pte.h"
6#include "../h/mbareg.h"
7#include "saio.h"
8
9devread(io)
10 register struct iob *io;
11{
12
13 return( (*devsw[io->i_ino.i_dev].dv_strategy)(io, READ) );
14}
15
16devwrite(io)
17 register struct iob *io;
18{
19
20 return( (*devsw[io->i_ino.i_dev].dv_strategy)(io, WRITE) );
21}
22
23devopen(io)
24 register struct iob *io;
25{
26
27 (*devsw[io->i_ino.i_dev].dv_open)(io);
28}
29
30devclose(io)
31 register struct iob *io;
32{
33
34 (*devsw[io->i_ino.i_dev].dv_close)(io);
35}
36
37nullsys()
38{
39
40 ;
41}
42
43int nullsys();
44int hpstrategy(), hpopen();
45int htstrategy(), htopen(), htclose();
46int upstrategy(), upopen();
47int tmstrategy(), tmopen(), tmclose();
48int tsstrategy(), tsopen(), tsclose();
49int mtstrategy(), mtopen(), mtclose();
50int rkstrategy(), rkopen();
51int udstrategy(), udopen();
52
53struct devsw devsw[] = {
54 "hp", hpstrategy, hpopen, nullsys,
55 "ht", htstrategy, htopen, htclose,
56 "up", upstrategy, upopen, nullsys,
57 "tm", tmstrategy, tmopen, tmclose,
58 "hk", rkstrategy, rkopen, nullsys,
59 "ts", tsstrategy, tsopen, tsclose,
60 "mt", mtstrategy, mtopen, mtclose,
61 "ra", udstrategy, udopen, nullsys,
62 0,0,0,0
63};