* 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
int nullop(), enxio(), enodev(), rawread(), rawwrite(), swstrategy();
int rawread(), rawwrite(), swstrategy();
int wdopen(),wdclose(),wdstrategy(),wdread(),wdwrite(),wdioctl();
int xdopen(),xdclose(),xdstrategy(),xdread(),xdwrite(),xdioctl();
int wtopen(),wtclose(),wtstrategy(),wtread(),wtwrite(),wtioctl();
int Fdopen(),fdclose(),fdstrategy(),fdread(),fdwrite();
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
},
{ xdopen
, xdclose
, xdstrategy
, xdioctl
, /*4*/
int nblkdev
= sizeof (bdevsw
) / sizeof (bdevsw
[0]);
int cnopen(),cnclose(),cnread(),cnwrite(),cnioctl(),cnselect();
int pcopen(),pcclose(),pcread(),pcwrite(),pcioctl();
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();
extern struct tty com_tty
[];
int logopen(),logclose(),logread(),logioctl(),logselect();
int ttselect(), seltrue();
{ cnopen
, cnclose
, cnread
, cnwrite
, /*0*/
cnioctl
, nullop
, nullop
, NULL
,
cnselect
, enodev
, NULL
},
{ cttyopen
, nullop
, cttyread
, cttywrite
, /*1*/
cttyioctl
, nullop
, nullop
, NULL
,
cttyselect
, enodev
, NULL
},
{ nullop
, nullop
, mmrw
, mmrw
, /*2*/
enodev
, nullop
, nullop
, NULL
,
mmselect
, enodev
, NULL
},
{ wdopen
, wdclose
, wdread
, wdwrite
, /*3*/
wdioctl
, enodev
, nullop
, NULL
,
seltrue
, enodev
, wdstrategy
},
{ nullop
, nullop
, rawread
, rawwrite
, /*4*/
enodev
, enodev
, nullop
, NULL
,
enodev
, enodev
, swstrategy
},
{ ptsopen
, ptsclose
, ptsread
, ptswrite
, /*5*/
ptyioctl
, ptsstop
, nullop
, pt_tty
,
ttselect
, enodev
, NULL
},
{ ptcopen
, ptcclose
, ptcread
, ptcwrite
, /*6*/
ptyioctl
, nullop
, nullop
, pt_tty
,
ptcselect
, enodev
, NULL
},
{ logopen
, logclose
, logread
, enodev
, /*7*/
logioctl
, enodev
, nullop
, NULL
,
logselect
, enodev
, NULL
},
{ comopen
, comclose
, comread
, comwrite
, /*8*/
comioctl
, enodev
, comreset
, com_tty
,
ttselect
, enodev
, NULL
},
{ Fdopen
, fdclose
, fdread
, fdwrite
, /*9*/
fdioctl
, enodev
, nullop
, NULL
,
seltrue
, enodev
, fdstrategy
},
{ wtopen
, wtclose
, wtread
, wtwrite
, /*A*/
wtioctl
, enodev
, nullop
, NULL
,
seltrue
, enodev
, wtstrategy
},
{ xdopen
, xdclose
, xdread
, xdwrite
, /*B*/
xdioctl
, enodev
, nullop
, NULL
,
seltrue
, enodev
, xdstrategy
},
{ pcopen
, pcclose
, pcread
, pcwrite
, /*C*/
pcioctl
, nullop
, nullop
, &pccons
,
ttselect
, enodev
, NULL
},
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);