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