drop dopey "chrtab" sitting in main.c not used by anybody
[unix-history] / usr / src / sys / vax / stand / conf.c
CommitLineData
b0c3a8c4 1/* conf.c 4.18 83/04/30 */
faeec66d
SL
2
3#include "../machine/pte.h"
c7ebcc4e
BJ
4
5#include "../h/param.h"
6#include "../h/inode.h"
b5d17f4d 7#include "../h/fs.h"
a031a31b
SL
8
9#include "../vaxmba/mbareg.h"
10
c7ebcc4e
BJ
11#include "saio.h"
12
13devread(io)
2d19f71b 14 register struct iob *io;
c7ebcc4e 15{
d69d4250 16 int cc;
c7ebcc4e 17
0839bdeb 18 io->i_flgs |= F_RDDATA;
d69d4250
SL
19 io->i_error = 0;
20 cc = (*devsw[io->i_ino.i_dev].dv_strategy)(io, READ);
0839bdeb 21 io->i_flgs &= ~F_TYPEMASK;
d69d4250 22 return (cc);
c7ebcc4e
BJ
23}
24
25devwrite(io)
2d19f71b 26 register struct iob *io;
c7ebcc4e 27{
d69d4250 28 int cc;
2d19f71b 29
0839bdeb 30 io->i_flgs |= F_WRDATA;
d69d4250
SL
31 io->i_error = 0;
32 cc = (*devsw[io->i_ino.i_dev].dv_strategy)(io, WRITE);
0839bdeb 33 io->i_flgs &= ~F_TYPEMASK;
d69d4250 34 return (cc);
c7ebcc4e
BJ
35}
36
37devopen(io)
2d19f71b 38 register struct iob *io;
c7ebcc4e 39{
2d19f71b 40
c7ebcc4e
BJ
41 (*devsw[io->i_ino.i_dev].dv_open)(io);
42}
43
44devclose(io)
2d19f71b 45 register struct iob *io;
c7ebcc4e 46{
2d19f71b 47
c7ebcc4e
BJ
48 (*devsw[io->i_ino.i_dev].dv_close)(io);
49}
50
0839bdeb
SL
51devioctl(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*/
61nullsys(io)
62 struct iob *io;
2d19f71b
BJ
63{
64
65 ;
66}
c7ebcc4e 67
0839bdeb
SL
68/*ARGSUSED*/
69nullioctl(io, cmd, arg)
70 struct iob *io;
71 int cmd;
72 caddr_t arg;
73{
74
75 return (ECMD);
76}
77
78int nullsys(), nullioctl();
eb741596 79#if defined(VAX780) || defined(VAX750)
0839bdeb 80int hpstrategy(), hpopen(), hpioctl();
eb741596 81#endif
0839bdeb
SL
82int upstrategy(), upopen(), upioctl();
83int rkstrategy(), rkopen(), rkioctl();
76780d43 84int rastrategy(), raopen(), raioctl();
0839bdeb 85int idcstrategy(), idcopen(), idcioctl();
b0c3a8c4 86#if defined(VAX780) || defined(VAX750)
76780d43 87int rlstrategy(), rlopen(), rlioctl();
b0c3a8c4 88#endif
9c6e912e 89#ifndef BOOT
5cb41021 90int tmstrategy(), tmopen(), tmclose();
2d19f71b 91int tsstrategy(), tsopen(), tsclose();
eb741596 92#if defined(VAX780) || defined(VAX750)
9c6e912e 93int htstrategy(), htopen(), htclose();
3486ee81 94int mtstrategy(), mtopen(), mtclose();
eb741596 95#endif
e843bebd 96int utstrategy(), utopen(), utclose();
9c6e912e 97#endif
c7ebcc4e
BJ
98
99struct devsw devsw[] = {
eb741596 100#if defined(VAX780) || defined(VAX750)
0839bdeb
SL
101 { "hp", hpstrategy, hpopen, nullsys, hpioctl },
102#endif
103 { "up", upstrategy, upopen, nullsys, upioctl },
104 { "hk", rkstrategy, rkopen, nullsys, rkioctl },
76780d43 105 { "ra", rastrategy, raopen, nullsys, raioctl },
0839bdeb
SL
106#if defined(VAX730)
107 { "rb", idcstrategy, idcopen, nullsys, idcioctl },
eb741596 108#endif
b0c3a8c4 109#if defined(VAX780) || defined(VAX750)
76780d43 110 { "rl", rlstrategy, rlopen, nullsys, rlioctl },
b0c3a8c4 111#endif
9c6e912e 112#ifndef BOOT
0839bdeb 113 { "ts", tsstrategy, tsopen, tsclose, nullioctl },
eb741596 114#if defined(VAX780) || defined(VAX750)
0839bdeb
SL
115 { "ht", htstrategy, htopen, htclose, nullioctl },
116 { "mt", mtstrategy, mtopen, mtclose, nullioctl },
eb741596 117#endif
0839bdeb
SL
118 { "tm", tmstrategy, tmopen, tmclose, nullioctl },
119 { "ut", utstrategy, utopen, utclose, nullioctl },
9c6e912e 120#endif
0839bdeb 121 { 0, 0, 0, 0, 0 },
c7ebcc4e 122};