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