* Copyright (c) 1990 The Regents of the University of California.
* This code is derived from software contributed to Berkeley by
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* 3. All advertising materials mentioning features or use of this software
* must display the following acknowledgement:
* This product includes software developed by the University of
* California, Berkeley and its contributors.
* 4. Neither the name of the University nor the names of its contributors
* may be used to endorse or promote products derived from this software
* without specific prior written permission.
* THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* @(#)conf.c 5.8 (Berkeley) 5/12/91
* PATCHES MAGIC LEVEL PATCH THAT GOT US HERE
* -------------------- ----- ----------------------
* CURRENT PATCH LEVEL: 5 00160
* -------------------- ----- ----------------------
* 10 Feb 93 Jordan K. Hubbard Added select entry for com driver
* 10 Feb 93 Julian Elischer Add empty table entries
* so we can allocate numbers
* 15 Feb 93 Julian Elischer Add basic SCSI device entries
* 16 Feb 93 Julian Elischer add entries for scsi media changer
* 01 Mar 93 Jordan K. Hubbard Reserve major numbers for codrv, fd, bpf
* 10 Mar 83 Rodney W. Grimes General clean up of the above patches
* 06 Apr 93 Rodney W. Grimes Fixed NLPT for LPA driver case, added
* 23 Apr 93 Holger Veit added codrv
* 25 May 93 Bruce Evans New fast interrupt serial driver (sio)
* Gene Stark Xten power controller info added (tw)
* Rick Macklem Bus mouse driver (mse)
static char rcsid
[] = "$Header: /usr/src/sys.386bsd/i386/i386/RCS/conf.c,v 1.2 92/01/21 14:21:57 william Exp Locker: toor $";
int nullop(), enxio(), enodev(), rawread(), rawwrite(), swstrategy();
int rawread(), rawwrite(), swstrategy();
int wdopen(),wdclose(),wdstrategy(),wdioctl();
int asopen(),asclose(),asstrategy(),asioctl();
int /*asdump(),*/assize();
int sdopen(),sdclose(),sdstrategy(),sdioctl();
int /*sddump(),*/sdsize();
int stopen(),stclose(),ststrategy(),stioctl();
/*int stdump(),stsize();*/
int cdopen(),cdclose(),cdstrategy(),cdioctl();
int /*cddump(),*/cdsize();
int chopen(),chclose(),chioctl();
int wtopen(),wtclose(),wtstrategy(),wtioctl();
int Fdopen(),fdclose(),fdstrategy();
int swstrategy(),swread(),swwrite();
{ wdopen
, wdclose
, wdstrategy
, wdioctl
, /*0*/
{ enodev
, enodev
, swstrategy
, enodev
, /*1*/
{ Fdopen
, fdclose
, fdstrategy
, fdioctl
, /*2*/
{ wtopen
, wtclose
, wtstrategy
, wtioctl
, /*3*/
wtdump
, wtsize
, B_TAPE
},
{ sdopen
, sdclose
, sdstrategy
, sdioctl
, /*4*/
{ asopen
, asclose
, asstrategy
, asioctl
, /*4*/
{ stopen
, stclose
, ststrategy
, stioctl
, /*5*/
{ cdopen
, cdclose
, cdstrategy
, cdioctl
, /*6*/
* If you need a bdev major number, please contact the 386bsd patchkit
* coordinator by sending mail to "patches@cs.montana.edu".
* If you assign one yourself it may conflict with someone else.
int nblkdev
= sizeof (bdevsw
) / sizeof (bdevsw
[0]);
int cnopen(),cnclose(),cnread(),cnwrite(),cnioctl(),cnselect();
int pcopen(),pcclose(),pcread(),pcwrite(),pcioctl(),pcmmap();
extern struct tty pccons
;
int cttyopen(), cttyread(), cttywrite(), cttyioctl(), cttyselect();
int ptsopen(),ptsclose(),ptsread(),ptswrite(),ptsstop();
int ptcopen(),ptcclose(),ptcread(),ptcwrite(),ptcselect();
int comopen(),comclose(),comread(),comwrite(),comioctl(),comselect();
extern struct tty com_tty
[];
int logopen(),logclose(),logread(),logioctl(),logselect();
int ttselect(), seltrue();
int lptopen(),lptclose(),lptwrite(),lptioctl();
int coopen(),coclose(),coread(),coioctl(),coselect(),comap();
int twopen(),twclose(),twread(),twwrite(),twselect();
int bpfopen(),bpfclose(),bpfread(),bpfwrite(),bpfselect(),bpfioctl();
int dcfclkopen(),dcfclkclose(),dcfclkread(),dcfclkioctl(),dcfclkselect();
#define dcfclkclose enxio
#define dcfclkioctl enxio
#define dcfclkselect enxio
int lpaopen(),lpaclose(),lpawrite(),lpaioctl();
int spkropen(),spkrclose(),spkrwrite(),spkrioctl();
int mseopen(),mseclose(),mseread(),mseselect();
int sioopen(),sioclose(),sioread(),siowrite(),sioioctl(),sioselect(),
extern struct tty sio_tty
[];
{ cnopen
, cnclose
, cnread
, cnwrite
, /*0*/
cnioctl
, nullop
, nullop
, NULL
, /* console */
cnselect
, enodev
, NULL
},
{ cttyopen
, nullop
, cttyread
, cttywrite
, /*1*/
cttyioctl
, nullop
, nullop
, NULL
, /* tty */
cttyselect
, enodev
, NULL
},
{ nullop
, nullop
, mmrw
, mmrw
, /*2*/
enodev
, nullop
, nullop
, NULL
, /* memory */
mmselect
, enodev
, NULL
},
{ wdopen
, wdclose
, rawread
, rawwrite
, /*3*/
wdioctl
, enodev
, nullop
, NULL
, /* wd */
seltrue
, enodev
, wdstrategy
},
{ nullop
, nullop
, rawread
, rawwrite
, /*4*/
enodev
, enodev
, nullop
, NULL
, /* swap */
enodev
, enodev
, swstrategy
},
{ ptsopen
, ptsclose
, ptsread
, ptswrite
, /*5*/
ptyioctl
, ptsstop
, nullop
, pt_tty
, /* ttyp */
ttselect
, enodev
, NULL
},
{ ptcopen
, ptcclose
, ptcread
, ptcwrite
, /*6*/
ptyioctl
, nullop
, nullop
, pt_tty
, /* ptyp */
ptcselect
, enodev
, NULL
},
{ logopen
, logclose
, logread
, enodev
, /*7*/
logioctl
, enodev
, nullop
, NULL
, /* klog */
logselect
, enodev
, NULL
},
{ comopen
, comclose
, comread
, comwrite
, /*8*/
comioctl
, enodev
, comreset
, com_tty
, /* com */
comselect
, enodev
, NULL
},
{ Fdopen
, fdclose
, rawread
, rawwrite
, /*9*/
fdioctl
, enodev
, nullop
, NULL
, /* Fd (!=fd) */
seltrue
, enodev
, fdstrategy
},
{ wtopen
, wtclose
, rawread
, rawwrite
, /*10*/
wtioctl
, enodev
, nullop
, NULL
, /* wt */
seltrue
, enodev
, wtstrategy
},
{ enodev
, enodev
, enodev
, enodev
, /*11*/
enodev
, enodev
, nullop
, NULL
,
seltrue
, enodev
, enodev
},
{ pcopen
, pcclose
, pcread
, pcwrite
, /*12*/
pcioctl
, nullop
, nullop
, &pccons
, /* pc */
ttselect
, pcmmap
, NULL
},
{ sdopen
, sdclose
, rawread
, rawwrite
, /*13*/
sdioctl
, enodev
, nullop
, NULL
, /* sd */
seltrue
, enodev
, sdstrategy
},
{ asopen
, asclose
, rawread
, rawwrite
, /*13*/
asioctl
, enodev
, nullop
, NULL
, /* as */
seltrue
, enodev
, asstrategy
},
{ stopen
, stclose
, rawread
, rawwrite
, /*14*/
stioctl
, enodev
, nullop
, NULL
, /* st */
seltrue
, enodev
, ststrategy
},
{ cdopen
, cdclose
, rawread
, enodev
, /*15*/
cdioctl
, enodev
, nullop
, NULL
, /* cd */
seltrue
, enodev
, cdstrategy
},
{ lptopen
, lptclose
, nullop
, lptwrite
, /*16*/
lptioctl
, nullop
, nullop
, NULL
, /* lpt */
seltrue
, enodev
, enodev
},
{ chopen
, chclose
, enxio
, enxio
, /*17*/
chioctl
, enxio
, enxio
, NULL
, /* ch */
{ enxio
, enxio
, enxio
, enxio
, /*18*/
enxio
, enxio
, enxio
, NULL
, /* scsi generic */
{ twopen
, twclose
, twread
, twwrite
, /*19*/
enodev
, nullop
, nullop
, NULL
, /* tw */
twselect
, enodev
, enodev
},
{ enxio
, enxio
, enxio
, enxio
, /*20*/
enxio
, enxio
, enxio
, NULL
, /* soundblaster?*/
{ coopen
, coclose
, coread
, enxio
, /*21*/
coioctl
, nullop
, nullop
, NULL
, /* co */
{ fdopen
, enxio
, enxio
, enxio
, /*22*/
enxio
, enxio
, enxio
, NULL
, /* fd (!=Fd) */
{ bpfopen
, bpfclose
, bpfread
, bpfwrite
, /*23*/
bpfioctl
, enodev
, nullop
, NULL
, /* bpf */
bpfselect
, enodev
, NULL
},
{ dcfclkopen
, dcfclkclose
, dcfclkread
, enodev
, /*24*/
dcfclkioctl
, enodev
, nullop
, NULL
, /* dcfclk */
dcfclkselect
, enodev
, NULL
},
{ lpaopen
, lpaclose
, nullop
, lpawrite
, /*25*/
lpaioctl
, nullop
, nullop
, NULL
, /* lpa */
seltrue
, enodev
, enodev
},
{ spkropen
, spkrclose
, enxio
, spkrwrite
, /*26*/
spkrioctl
, enxio
, enxio
, NULL
, /* spkr */
{ mseopen
, mseclose
, mseread
, nullop
, /*27*/
nullop
, enodev
, nullop
, NULL
, /* mse */
mseselect
, enodev
, NULL
},
{ sioopen
, sioclose
, sioread
, siowrite
, /*28*/
sioioctl
, siostop
, sioreset
, sio_tty
, /* sio */
sioselect
, enodev
, NULL
},
* If you need a cdev major number, please contact the 386bsd patchkit
* coordinator by sending mail to "patches@cs.montana.edu".
* If you assign one yourself it may then conflict with someone else.
int nchrdev
= sizeof (cdevsw
) / sizeof (cdevsw
[0]);
int mem_no
= 2; /* major device number of memory special file */
* Swapdev is a fake device implemented
* in sw.c used only internally to get to swstrategy.
* It cannot be provided to the users, because the
* swstrategy routine munches the b_dev and b_blkno entries
* before calling the appropriate driver. This would horribly
* confuse, e.g. the hashing routines. Instead, /dev/drum is
* provided as a character (raw) device.
dev_t swapdev
= makedev(1, 0);