xref: /original-bsd/sys/vax/stand/conf.c (revision 1b4ef7de)
1 /*
2  * Copyright (c) 1982, 1986, 1988 Regents of the University of California.
3  * All rights reserved.
4  *
5  * %sccs.include.redist.c%
6  *
7  *	@(#)conf.c	7.9 (Berkeley) 12/16/90
8  */
9 
10 #include "sys/param.h"
11 #include "stand/saio.h"
12 
13 extern int	nullsys(), nodev(), noioctl();
14 
15 #if defined(VAX780) || defined(VAX750) || defined(VAX8600)
16 #define	HP		"hp"
17 int	hpstrategy(), hpopen();
18 #ifdef SMALL
19 #define	hpioctl		noioctl
20 #else
21 int	hpioctl();
22 #endif
23 #else
24 #define	HP		0
25 #define	hpstrategy	nodev
26 #define	hpopen		nodev
27 #define	hpioctl		noioctl
28 #endif
29 
30 int	upstrategy(), upopen();
31 #ifdef SMALL
32 #define	upioctl		noioctl
33 #else
34 int	upioctl();
35 #endif
36 
37 int	rkstrategy(), rkopen();
38 int	rastrategy(), raopen();
39 
40 #if defined(VAX730)
41 #define	RB		"rb"
42 int	idcstrategy(), idcopen();
43 #else
44 #define	RB		0
45 #define	idcstrategy	nodev
46 #define	idcopen		nodev
47 #endif
48 
49 int	rlstrategy(), rlopen();
50 
51 #ifdef BOOT
52 #define	TM		0
53 #define	tmstrategy	nodev
54 #define	tmopen		nodev
55 #define	tmclose		nodev
56 #define	TS		0
57 #define	tsstrategy	nodev
58 #define	tsopen		nodev
59 #define	tsclose		nodev
60 #define	HT		0
61 #define	htstrategy	nodev
62 #define	htopen		nodev
63 #define	htclose		nodev
64 #define	MT		0
65 #define	mtstrategy	nodev
66 #define	mtopen		nodev
67 #define	mtclose		nodev
68 #define	UT		0
69 #define	utstrategy	nodev
70 #define	utopen		nodev
71 #define	utclose		nodev
72 #define	TMSCP		0
73 #define	tmscpstrategy	nodev
74 #define	tmscpopen	nodev
75 #define	tmscpclose	nodev
76 #else /* !BOOT */
77 #define	TM		"tm"
78 int	tmstrategy(), tmopen(), tmclose();
79 #define	TS		"ts"
80 int	tsstrategy(), tsopen(), tsclose();
81 
82 #if defined(VAX780) || defined(VAX750) || defined(VAX8600)
83 #define	HT		"ht"
84 int	htstrategy(), htopen(), htclose();
85 #define	MT		"mt"
86 int	mtstrategy(), mtopen(), mtclose();
87 #else /* massbus vax */
88 #define	HT		0
89 #define	htstrategy	nodev
90 #define	htopen		nodev
91 #define	htclose		nodev
92 #define	MT		0
93 #define	mtstrategy	nodev
94 #define	mtopen		nodev
95 #define	mtclose		nodev
96 #endif /* massbus vax */
97 
98 #define	UT		"ut"
99 int	utstrategy(), utopen(), utclose();
100 #define	TMSCP		"tms"
101 int	tmscpstrategy(), tmscpopen(), tmscpclose();
102 #endif /* BOOT */
103 
104 #ifdef VAX8200
105 #define	KRA		"kra"
106 int	krastrategy(), kraopen();
107 #else
108 #define	KRA		0
109 #define	krastrategy	nodev
110 #define	kraopen		nodev
111 #endif
112 
113 struct devsw devsw[] = {
114 	{ HP,	hpstrategy,	hpopen,	nullsys, hpioctl },  /*  0 = hp */
115 	{ HT,	htstrategy,	htopen,	htclose, noioctl },  /*  1 = ht */
116 	{ "up",	upstrategy,	upopen,	nullsys, upioctl },  /*  2 = up */
117 	{ "hk",	rkstrategy,	rkopen,	nullsys, noioctl },  /*  3 = hk */
118 	{ 0,	nodev,		nodev,	nullsys, noioctl },  /*  4 = sw */
119 	{ TM,	tmstrategy,	tmopen,	tmclose, noioctl },  /*  5 = tm */
120 	{ TS,	tsstrategy,	tsopen,	tsclose, noioctl },  /*  6 = ts */
121 	{ MT,	mtstrategy,	mtopen,	mtclose, noioctl },  /*  7 = mt */
122 	{ 0,	nodev,		nodev,	nullsys, noioctl },  /*  8 = tu */
123 	{ "ra",	rastrategy,	raopen,	nullsys, noioctl },  /*  9 = ra */
124 	{ UT,	utstrategy,	utopen,	utclose, noioctl },  /* 10 = ut */
125 	{ RB,	idcstrategy,	idcopen,nullsys, noioctl },  /* 11 = rb */
126 	{ 0,	nodev,		nodev,	nullsys, noioctl },  /* 12 = uu */
127 	{ 0,	nodev,		nodev,	nullsys, noioctl },  /* 13 = rx */
128 	{ "rl",	rlstrategy,	rlopen,	nullsys, noioctl },  /* 14 = rl */
129 	{ TMSCP,tmscpstrategy,tmscpopen,tmscpclose,noioctl}, /* 15 = tmscp */
130 	{ KRA,	krastrategy,	kraopen,nullsys, noioctl},   /* 16 = kra */
131 };
132 
133 int	ndevs = (sizeof(devsw)/sizeof(devsw[0]));
134