123221Smckusick /* 2*33523Sbostic * Copyright (c) 1982, 1986, 1988 Regents of the University of California. 3*33523Sbostic * All rights reserved. 423221Smckusick * 5*33523Sbostic * Redistribution and use in source and binary forms are permitted 6*33523Sbostic * provided that this notice is preserved and that due credit is given 7*33523Sbostic * to the University of California at Berkeley. The name of the University 8*33523Sbostic * may not be used to endorse or promote products derived from this 9*33523Sbostic * software without specific prior written permission. This software 10*33523Sbostic * is provided ``as is'' without express or implied warranty. 11*33523Sbostic * 12*33523Sbostic * @(#)conf.c 7.5 (Berkeley) 02/22/88 1323221Smckusick */ 14318Sbill 1533408Skarels #include "param.h" 1633408Skarels #include "inode.h" 1733408Skarels #include "fs.h" 18318Sbill #include "saio.h" 19318Sbill 20*33523Sbostic extern int nullsys(), nodev(), noioctl(); 21318Sbill 2224152Sbloom #if defined(VAX780) || defined(VAX750) || defined(VAX8600) 2330547Skarels #define HP "hp" 24*33523Sbostic int hpstrategy(), hpopen(); 25*33523Sbostic #ifdef SMALL 26*33523Sbostic #define hpioctl noioctl 2730547Skarels #else 28*33523Sbostic int hpioctl(); 29*33523Sbostic #endif 30*33523Sbostic #else 3133408Skarels #define HP 0 3230547Skarels #define hpstrategy nodev 3330547Skarels #define hpopen nodev 3430547Skarels #define hpioctl noioctl 356970Ssam #endif 36*33523Sbostic 37*33523Sbostic int upstrategy(), upopen(); 38*33523Sbostic #ifdef SMALL 39*33523Sbostic #define upioctl noioctl 40*33523Sbostic #else 41*33523Sbostic int upioctl(); 42*33523Sbostic #endif 43*33523Sbostic 44*33523Sbostic int rkstrategy(), rkopen(); 45*33523Sbostic int rastrategy(), raopen(); 46*33523Sbostic 4713812Ssam #if defined(VAX730) 4830547Skarels #define RB "rb" 49*33523Sbostic int idcstrategy(), idcopen(); 5030547Skarels #else 5133408Skarels #define RB 0 5230547Skarels #define idcstrategy nodev 5330547Skarels #define idcopen nodev 5413812Ssam #endif 5530547Skarels 56*33523Sbostic int rlstrategy(), rlopen(); 5730547Skarels 58*33523Sbostic #ifdef BOOT 5933408Skarels #define TM 0 6030547Skarels #define tmstrategy nodev 6130547Skarels #define tmopen nodev 6230547Skarels #define tmclose nodev 6333408Skarels #define TS 0 6430547Skarels #define tsstrategy nodev 6530547Skarels #define tsopen nodev 6630547Skarels #define tsclose nodev 6733408Skarels #define HT 0 6830547Skarels #define htstrategy nodev 6930547Skarels #define htopen nodev 7030547Skarels #define htclose nodev 7133408Skarels #define MT 0 7230547Skarels #define mtstrategy nodev 7330547Skarels #define mtopen nodev 7430547Skarels #define mtclose nodev 7533408Skarels #define UT 0 7630547Skarels #define utstrategy nodev 7730547Skarels #define utopen nodev 7830547Skarels #define utclose nodev 7933408Skarels #define TMSCP 0 8033408Skarels #define tmscpstrategy nodev 8133408Skarels #define tmscpopen nodev 8233408Skarels #define tmscpclose nodev 83*33523Sbostic #else /* !BOOT */ 84*33523Sbostic #define TM "tm" 85*33523Sbostic int tmstrategy(), tmopen(), tmclose(); 86*33523Sbostic #define TS "ts" 87*33523Sbostic int tsstrategy(), tsopen(), tsclose(); 8833408Skarels 89*33523Sbostic #if defined(VAX780) || defined(VAX750) || defined(VAX8600) 90*33523Sbostic #define HT "ht" 91*33523Sbostic int htstrategy(), htopen(), htclose(); 92*33523Sbostic #define MT "mt" 93*33523Sbostic int mtstrategy(), mtopen(), mtclose(); 94*33523Sbostic #else /* massbus vax */ 95*33523Sbostic #define HT 0 96*33523Sbostic #define htstrategy nodev 97*33523Sbostic #define htopen nodev 98*33523Sbostic #define htclose nodev 99*33523Sbostic #define MT 0 100*33523Sbostic #define mtstrategy nodev 101*33523Sbostic #define mtopen nodev 102*33523Sbostic #define mtclose nodev 103*33523Sbostic #endif /* massbus vax */ 104*33523Sbostic 105*33523Sbostic #define UT "ut" 106*33523Sbostic int utstrategy(), utopen(), utclose(); 107*33523Sbostic #define TMSCP "tms" 108*33523Sbostic int tmscpstrategy(), tmscpopen(), tmscpclose(); 109*33523Sbostic #endif /* BOOT */ 110*33523Sbostic 11133408Skarels #ifdef VAX8200 11233408Skarels #define KRA "kra" 113*33523Sbostic int krastrategy(), kraopen(); 11433408Skarels #else 11533408Skarels #define KRA 0 11633408Skarels #define krastrategy nodev 11733408Skarels #define kraopen nodev 1187277Swnj #endif 119318Sbill 120318Sbill struct devsw devsw[] = { 121*33523Sbostic { HP, hpstrategy, hpopen, nullsys, hpioctl }, /* 0 = hp */ 122*33523Sbostic { HT, htstrategy, htopen, htclose, noioctl }, /* 1 = ht */ 123*33523Sbostic { "up", upstrategy, upopen, nullsys, upioctl }, /* 2 = up */ 124*33523Sbostic { "hk", rkstrategy, rkopen, nullsys, noioctl }, /* 3 = hk */ 125*33523Sbostic { 0, nodev, nodev, nullsys, noioctl }, /* 4 = sw */ 126*33523Sbostic { TM, tmstrategy, tmopen, tmclose, noioctl }, /* 5 = tm */ 127*33523Sbostic { TS, tsstrategy, tsopen, tsclose, noioctl }, /* 6 = ts */ 128*33523Sbostic { MT, mtstrategy, mtopen, mtclose, noioctl }, /* 7 = mt */ 129*33523Sbostic { 0, nodev, nodev, nullsys, noioctl }, /* 8 = tu */ 130*33523Sbostic { "ra", rastrategy, raopen, nullsys, noioctl }, /* 9 = ra */ 131*33523Sbostic { UT, utstrategy, utopen, utclose, noioctl }, /* 10 = ut */ 132*33523Sbostic { RB, idcstrategy, idcopen,nullsys, noioctl }, /* 11 = rb */ 133*33523Sbostic { 0, nodev, nodev, nullsys, noioctl }, /* 12 = uu */ 134*33523Sbostic { 0, nodev, nodev, nullsys, noioctl }, /* 13 = rx */ 135*33523Sbostic { "rl", rlstrategy, rlopen, nullsys, noioctl }, /* 14 = rl */ 136*33523Sbostic { TMSCP,tmscpstrategy,tmscpopen,tmscpclose,noioctl}, /* 15 = tmscp */ 137*33523Sbostic { KRA, krastrategy, kraopen,nullsys, noioctl}, /* 16 = kra */ 138318Sbill }; 13930547Skarels 140*33523Sbostic int ndevs = (sizeof(devsw)/sizeof(devsw[0])); 141