* Copyright (c) 1988 Regents of the University of California.
* 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 7.9 (Berkeley) 5/8/91
int nullop(), enxio(), enodev(), rawread(), rawwrite(), swstrategy();
int vdopen(),vdclose(),vdstrategy(),vdioctl();
int hdopen(),hdclose(),hdstrategy(),hdioctl();
int cyopen(),cyclose(),cystrategy(),cydump();
{ enodev
, nullop
, enodev
, enodev
, /*0*/
{ vdopen
, vdclose
, vdstrategy
, vdioctl
, /*1*/
{ hdopen
, hdclose
, hdstrategy
, hdioctl
, /*2*/
{ cyopen
, cyclose
, cystrategy
, cyioctl
, /*3*/
{ enodev
, enodev
, swstrategy
, enodev
, /*4*/
int nblkdev
= sizeof (bdevsw
) / sizeof (bdevsw
[0]);
int cnopen(),cnclose(),cnread(),cnwrite(),cnioctl();
int vxopen(),vxclose(),vxread(),vxwrite(),vxioctl(),vxstop(),vxreset();
int cttyopen(),cttyread(),cttywrite(),cttyioctl(),cttyselect();
int ptsopen(),ptsclose(),ptsread(),ptswrite(),ptsstop();
int ptcopen(),ptcclose(),ptcread(),ptcwrite(),ptcselect();
int mpopen(), mpclose(), mpread(), mpwrite(), mpioctl(), mpstop();
int mpdlopen(), mpdlclose(), mpdlwrite(), mpdlioctl();
extern struct tty mp_tty
[];
int iiioctl(), iiclose(), iiopen();
int enpr_open(), enpr_close(), enpr_read(), enpr_write(), enpr_ioctl();
int dropen(),drclose(),drread(),drwrite(),drioctl(),drreset();
int ikopen(),ikclose(),ikread(),ikwrite(),ikioctl();
int logopen(),logclose(),logread(),logioctl(),logselect();
int ttselect(), seltrue();
{ cnopen
, cnclose
, cnread
, cnwrite
, /*0*/
cnioctl
, nullop
, nullop
, &cons
,
ttselect
, enodev
, NULL
},
{ vxopen
, vxclose
, vxread
, vxwrite
, /*1*/
vxioctl
, vxstop
, vxreset
, vx_tty
,
ttselect
, enodev
, NULL
},
{ cttyopen
, nullop
, cttyread
, cttywrite
, /*2*/
cttyioctl
, nullop
, nullop
, NULL
,
cttyselect
, enodev
, NULL
},
{ nullop
, nullop
, mmrw
, mmrw
, /*3*/
enodev
, nullop
, nullop
, NULL
,
mmselect
, enodev
, NULL
},
{ enodev
, nullop
, enodev
, enodev
, /*4*/
enodev
, enodev
, nullop
, NULL
,
{ vdopen
, vdclose
, rawread
, rawwrite
, /*5*/
vdioctl
, enodev
, nullop
, NULL
,
seltrue
, enodev
, vdstrategy
},
{ hdopen
, hdclose
, rawread
, rawwrite
, /*6*/
hdioctl
, enodev
, nullop
, NULL
,
seltrue
, enodev
, hdstrategy
},
{ cyopen
, cyclose
, rawread
, rawwrite
, /*7*/
cyioctl
, enodev
, cyreset
, NULL
,
seltrue
, enodev
, cystrategy
},
{ nullop
, nullop
, rawread
, rawwrite
, /*8*/
enodev
, enodev
, nullop
, NULL
,
enodev
, enodev
, swstrategy
},
{ ptsopen
, ptsclose
, ptsread
, ptswrite
, /*9*/
ptyioctl
, ptsstop
, enodev
, pt_tty
,
ttselect
, enodev
, NULL
},
{ ptcopen
, ptcclose
, ptcread
, ptcwrite
, /*10*/
ptyioctl
, nullop
, enodev
, pt_tty
,
ptcselect
, enodev
, NULL
},
{ mpdlopen
, mpdlclose
, enodev
, mpdlwrite
, /*11*/
mpdlioctl
, enodev
, nullop
, NULL
,
{ mpopen
, mpclose
, mpread
, mpwrite
, /*12*/
mpioctl
, mpstop
, nullop
, mp_tty
,
ttselect
, enodev
, NULL
},
{ enodev
, enodev
, enodev
, enodev
, /*13*/
enodev
, enodev
, nullop
, NULL
,
{ iiopen
, iiclose
, nullop
, nullop
, /*14*/
iiioctl
, nullop
, nullop
, NULL
,
{ logopen
, logclose
, logread
, enodev
, /*15*/
logioctl
, enodev
, nullop
, NULL
,
logselect
, enodev
, NULL
},
{ enpr_open
, enpr_close
, enpr_read
, enpr_write
, /*16*/
enpr_ioctl
, enodev
, nullop
, NULL
,
{ enodev
, enodev
, enodev
, enodev
, /*17*/
enodev
, enodev
, nullop
, NULL
,
{ dropen
, drclose
, drread
, drwrite
, /*18*/
drioctl
, enodev
, drreset
, NULL
,
{ fdopen
, enodev
, enodev
, enodev
, /*19*/
enodev
, enodev
, enodev
, NULL
,
/* 20-30 are reserved for local use */
{ ikopen
, ikclose
, ikread
, ikwrite
, /*20*/
ikioctl
, enodev
, nullop
, NULL
,
{ fdopen
, enodev
, enodev
, enodev
, /*21*/
enodev
, enodev
, enodev
, NULL
,
int nchrdev
= sizeof (cdevsw
) / sizeof (cdevsw
[0]);
int mem_no
= 3; /* 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(4, 0);