handle var len names, sync with vax
[unix-history] / usr / src / sys / vax / stand / conf.c
CommitLineData
8ae0e4b4 1/*
a5d70e66
KB
2 * Copyright (c) 1982, 1986, 1988 Regents of the University of California.
3 * All rights reserved.
8ae0e4b4 4 *
a5d70e66 5 * Redistribution and use in source and binary forms are permitted
9c50374f
KB
6 * provided that the above copyright notice and this paragraph are
7 * duplicated in all such forms and that any documentation,
8 * advertising materials, and other materials related to such
9 * distribution and use acknowledge that the software was developed
10 * by the University of California, Berkeley. The name of the
11 * University may not be used to endorse or promote products derived
12 * from this software without specific prior written permission.
13 * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
14 * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
15 * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
a5d70e66 16 *
9c50374f 17 * @(#)conf.c 7.6 (Berkeley) %G%
8ae0e4b4 18 */
faeec66d 19
39c71180
MK
20#include "param.h"
21#include "inode.h"
22#include "fs.h"
c7ebcc4e
BJ
23#include "saio.h"
24
a5d70e66 25extern int nullsys(), nodev(), noioctl();
0839bdeb 26
d7046ad3 27#if defined(VAX780) || defined(VAX750) || defined(VAX8600)
80c81fbf 28#define HP "hp"
a5d70e66
KB
29int hpstrategy(), hpopen();
30#ifdef SMALL
31#define hpioctl noioctl
32#else
33int hpioctl();
34#endif
80c81fbf 35#else
39c71180 36#define HP 0
80c81fbf
MK
37#define hpstrategy nodev
38#define hpopen nodev
39#define hpioctl noioctl
eb741596 40#endif
a5d70e66
KB
41
42int upstrategy(), upopen();
43#ifdef SMALL
44#define upioctl noioctl
45#else
46int upioctl();
47#endif
48
49int rkstrategy(), rkopen();
50int rastrategy(), raopen();
51
d395330a 52#if defined(VAX730)
80c81fbf 53#define RB "rb"
a5d70e66 54int idcstrategy(), idcopen();
80c81fbf 55#else
39c71180 56#define RB 0
80c81fbf
MK
57#define idcstrategy nodev
58#define idcopen nodev
b0c3a8c4 59#endif
80c81fbf 60
a5d70e66 61int rlstrategy(), rlopen();
80c81fbf 62
a5d70e66 63#ifdef BOOT
39c71180 64#define TM 0
80c81fbf
MK
65#define tmstrategy nodev
66#define tmopen nodev
67#define tmclose nodev
39c71180 68#define TS 0
80c81fbf
MK
69#define tsstrategy nodev
70#define tsopen nodev
71#define tsclose nodev
39c71180 72#define HT 0
80c81fbf
MK
73#define htstrategy nodev
74#define htopen nodev
75#define htclose nodev
39c71180 76#define MT 0
80c81fbf
MK
77#define mtstrategy nodev
78#define mtopen nodev
79#define mtclose nodev
39c71180 80#define UT 0
80c81fbf
MK
81#define utstrategy nodev
82#define utopen nodev
83#define utclose nodev
39c71180
MK
84#define TMSCP 0
85#define tmscpstrategy nodev
86#define tmscpopen nodev
87#define tmscpclose nodev
a5d70e66
KB
88#else /* !BOOT */
89#define TM "tm"
90int tmstrategy(), tmopen(), tmclose();
91#define TS "ts"
92int tsstrategy(), tsopen(), tsclose();
93
94#if defined(VAX780) || defined(VAX750) || defined(VAX8600)
95#define HT "ht"
96int htstrategy(), htopen(), htclose();
97#define MT "mt"
98int mtstrategy(), mtopen(), mtclose();
99#else /* massbus vax */
100#define HT 0
101#define htstrategy nodev
102#define htopen nodev
103#define htclose nodev
104#define MT 0
105#define mtstrategy nodev
106#define mtopen nodev
107#define mtclose nodev
108#endif /* massbus vax */
109
110#define UT "ut"
111int utstrategy(), utopen(), utclose();
112#define TMSCP "tms"
113int tmscpstrategy(), tmscpopen(), tmscpclose();
114#endif /* BOOT */
39c71180
MK
115
116#ifdef VAX8200
117#define KRA "kra"
a5d70e66 118int krastrategy(), kraopen();
39c71180
MK
119#else
120#define KRA 0
121#define krastrategy nodev
122#define kraopen nodev
9c6e912e 123#endif
c7ebcc4e
BJ
124
125struct devsw devsw[] = {
a5d70e66
KB
126 { HP, hpstrategy, hpopen, nullsys, hpioctl }, /* 0 = hp */
127 { HT, htstrategy, htopen, htclose, noioctl }, /* 1 = ht */
128 { "up", upstrategy, upopen, nullsys, upioctl }, /* 2 = up */
129 { "hk", rkstrategy, rkopen, nullsys, noioctl }, /* 3 = hk */
130 { 0, nodev, nodev, nullsys, noioctl }, /* 4 = sw */
131 { TM, tmstrategy, tmopen, tmclose, noioctl }, /* 5 = tm */
132 { TS, tsstrategy, tsopen, tsclose, noioctl }, /* 6 = ts */
133 { MT, mtstrategy, mtopen, mtclose, noioctl }, /* 7 = mt */
134 { 0, nodev, nodev, nullsys, noioctl }, /* 8 = tu */
135 { "ra", rastrategy, raopen, nullsys, noioctl }, /* 9 = ra */
136 { UT, utstrategy, utopen, utclose, noioctl }, /* 10 = ut */
137 { RB, idcstrategy, idcopen,nullsys, noioctl }, /* 11 = rb */
138 { 0, nodev, nodev, nullsys, noioctl }, /* 12 = uu */
139 { 0, nodev, nodev, nullsys, noioctl }, /* 13 = rx */
140 { "rl", rlstrategy, rlopen, nullsys, noioctl }, /* 14 = rl */
141 { TMSCP,tmscpstrategy,tmscpopen,tmscpclose,noioctl}, /* 15 = tmscp */
142 { KRA, krastrategy, kraopen,nullsys, noioctl}, /* 16 = kra */
c7ebcc4e 143};
80c81fbf 144
a5d70e66 145int ndevs = (sizeof(devsw)/sizeof(devsw[0]));