merge with latest Utah version
[unix-history] / usr / src / sys / hp300 / stand / conf.c
CommitLineData
a8fd2d0d
KM
1/*
2 * Copyright (c) 1982, 1986, 1990 The Regents of the University of California.
3 * All rights reserved.
4 *
5 * %sccs.include.redist.c%
6 *
33583b53 7 * @(#)conf.c 7.4 (Berkeley) %G%
a8fd2d0d
KM
8 */
9
33583b53 10#include "sys/param.h"
a8fd2d0d
KM
11#include "saio.h"
12
ffc8acfc 13extern int nullsys(), nodev(), noioctl();
a8fd2d0d 14
33583b53
MH
15#ifdef BOOT
16#define ctstrategy nullsys
17#define ctopen nodev
18#define ctclose nullsys
19#else
a8fd2d0d
KM
20int ctstrategy(), ctopen(), ctclose();
21#endif
33583b53 22#define ctioctl noioctl
a8fd2d0d 23
ffc8acfc
KB
24int rdstrategy(), rdopen();
25#define rdioctl noioctl
26
27int sdstrategy(), sdopen();
28#define sdioctl noioctl
29
30
a8fd2d0d 31struct devsw devsw[] = {
33583b53
MH
32 { "ct", ctstrategy, ctopen, ctclose, ctioctl }, /*0*/
33 { "??", nullsys, nodev, nullsys, noioctl }, /*1*/
34 { "rd", rdstrategy, rdopen, nullsys, rdioctl }, /*2*/
35 { "??", nullsys, nodev, nullsys, noioctl }, /*3*/
36 { "sd", sdstrategy, sdopen, nullsys, sdioctl }, /*4*/
a8fd2d0d 37};
ffc8acfc
KB
38
39int ndevs = (sizeof(devsw)/sizeof(devsw[0]));
33583b53
MH
40
41/*
42 * Convert old style unit syntax into adaptor/controller/unit
43 */
44devconvert(io)
45 register struct iob *io;
46{
47 if (io->i_unit == 0 || io->i_adapt || io->i_ctlr)
48 return;
49 io->i_adapt = io->i_unit / 8;
50 io->i_ctlr = io->i_unit % 8;
51 io->i_unit = 0;
52}