⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 conf.c

📁 早期freebsd实现
💻 C
📖 第 1 页 / 共 2 页
字号:
/*- * Copyright (c) 1982, 1986 The Regents of the University of California. * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 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 * SUCH DAMAGE. * *	@(#)conf.c	7.19 (Berkeley) 5/27/92 */#include "sys/param.h"#include "sys/systm.h"#include "sys/buf.h"#include "sys/ioctl.h"#include "sys/tty.h"#include "sys/conf.h"int nullop(), enxio(), enodev(), rawread(), rawwrite(), swstrategy();#include "hp.h"#if NHP > 0int	hpopen(),hpclose(),hpstrategy(),hpioctl(),hpdump(),hpsize();#else#define	hpopen		enxio#define	hpclose		enxio#define	hpstrategy	enxio#define	hpioctl		enxio#define	hpdump		enxio#define	hpsize		0#endif #include "tu.h"#if NHT > 0int	htopen(),htclose(),htstrategy(),htdump(),htioctl();#else#define	htopen		enxio#define	htclose		enxio#define	htstrategy	enxio#define	htdump		enxio#define	htioctl		enxio#endif#include "rk.h"#if NHK > 0int	rkopen(),rkstrategy(),rkintr(),rkdump(),rkreset(),rksize();#else#define	rkopen		enxio#define	rkstrategy	enxio#define	rkintr		enxio#define	rkdump		enxio#define	rkreset		enxio#define	rksize		0#endif#include "te.h"#if NTE > 0int	tmopen(),tmclose(),tmstrategy(),tmioctl(),tmdump(),tmreset();#else#define	tmopen		enxio#define	tmclose		enxio#define	tmstrategy	enxio#define	tmioctl		enxio#define	tmdump		enxio#define	tmreset		nullop#endif#include "tms.h"#if NTMS > 0int	tmscpopen(),tmscpclose(),tmscpstrategy();int	tmscpioctl(),tmscpdump(),tmscpreset();#else#define	tmscpopen	enxio#define	tmscpclose	enxio#define	tmscpstrategy	enxio#define	tmscpioctl	enxio#define	tmscpdump	enxio#define	tmscpreset	nullop#endif#include "ts.h"#if NTS > 0int	tsopen(),tsclose(),tsstrategy(),tsioctl(),tsdump(),tsreset();#else#define	tsopen		enxio#define	tsclose		enxio#define	tsstrategy	enxio#define	tsioctl		enxio#define	tsdump		enxio#define	tsreset		nullop#endif#include "mu.h"#if NMT > 0int	mtopen(),mtclose(),mtstrategy(),mtioctl(),mtdump();#else#define	mtopen		enxio#define	mtclose		enxio#define	mtstrategy	enxio#define	mtioctl		enxio#define	mtdump		enxio#endif#include "ra.h"#if NUDA > 0int	udaopen(),udaclose(),udastrategy();int	udaioctl(),udareset(),udadump(),udasize();#else#define	udaopen		enxio#define	udaclose	enxio#define	udastrategy	enxio#define	udaioctl	enxio#define	udareset	nullop#define	udadump		enxio#define	udasize		0#endif#include "kra.h"#if NKDB > 0int	kdbopen(),kdbstrategy(),kdbdump(),kdbsize();#else#define	kdbopen		enxio#define	kdbstrategy	enxio#define	kdbdump		enxio#define	kdbsize		0#endif#include "up.h"#if NSC > 0int	upopen(),upstrategy(),upreset(),updump(),upsize();#else#define	upopen		enxio#define	upstrategy	enxio#define	upreset		nullop#define	updump		enxio#define	upsize		0#endif#include "tj.h"#if NUT > 0int	utopen(),utclose(),utstrategy(),utioctl(),utreset(),utdump();#else#define	utopen		enxio#define	utclose		enxio#define	utstrategy	enxio#define	utreset		nullop#define	utioctl		enxio#define	utdump		enxio#endif#include "rb.h"#if NIDC > 0int	idcopen(),idcstrategy(),idcreset(),idcdump(),idcsize();;#else#define	idcopen		enxio#define	idcstrategy	enxio#define	idcreset	nullop#define	idcdump		enxio#define	idcsize		0#endif#if defined(VAX750) || defined(VAX730)int	tuopen(),tuclose(),tustrategy();#else#define	tuopen		enxio#define	tuclose		enxio#define	tustrategy	enxio#endif#include "rx.h"#if NFX > 0int	rxopen(),rxstrategy(),rxclose(),rxread(),rxwrite(),rxreset(),rxioctl();#else#define	rxopen		enxio#define rxstrategy	enxio#define	rxclose		enxio#define	rxread		enxio#define	rxwrite		enxio#define	rxreset		nullop#define	rxioctl		enxio#endif#include "uu.h"#if NUU > 0int	uuopen(),uustrategy(),uuclose(),uureset(),uuioctl();#else#define	uuopen		enxio#define uustrategy	enxio#define	uuclose		enxio#define	uureset		nullop#define	uuioctl		enxio#endif#include "rl.h"#if NRL > 0int	rlopen(),rlstrategy(),rlreset(),rldump(),rlsize();#else#define	rlopen		enxio#define	rlstrategy	enxio#define	rlreset		nullop#define	rldump		enxio#define	rlsize		0#endif#include "np.h"#if NNP > 0int	npopen(),npclose(),npread(),npwrite();int	npreset(),npioctl();#else#define	npopen		enxio#define	npclose		enxio#define	npread		enxio#define	npwrite		enxio#define	npreset		nullop#define	npioctl		enxio#endifstruct bdevsw	bdevsw[] ={	{ hpopen,	hpclose,	hpstrategy,	hpioctl,	/*0*/	  hpdump,	hpsize,		0 },	{ htopen,	htclose,	htstrategy,	htioctl,	/*1*/	  htdump,	0,		B_TAPE },	{ upopen,	nullop,	upstrategy,	enodev,		/*2*/	  updump,	upsize,		0 },	{ rkopen,	nullop,	rkstrategy,	enodev,		/*3*/	  rkdump,	rksize,		0 },	{ enodev,	enodev,		swstrategy,	enodev,		/*4*/	  enodev,	0,		0 },	{ tmopen,	tmclose,	tmstrategy,	tmioctl,	/*5*/	  tmdump,	0,		B_TAPE },	{ tsopen,	tsclose,	tsstrategy,	tsioctl,	/*6*/	  tsdump,	0,		B_TAPE },	{ mtopen,	mtclose,	mtstrategy,	mtioctl,	/*7*/	  mtdump,	0,		B_TAPE },	{ tuopen,	tuclose,	tustrategy,	enodev,		/*8*/	  enodev,	0,		B_TAPE },	{ udaopen,	udaclose,	udastrategy,	udaioctl,	/*9*/	  udadump,	udasize,	0 },	{ utopen,	utclose,	utstrategy,	utioctl,	/*10*/	  utdump,	0,		B_TAPE },	{ idcopen,	nullop,	idcstrategy,	enodev,		/*11*/	  idcdump,	idcsize,	0 },	{ rxopen,	rxclose,	rxstrategy,	enodev,		/*12*/	  enodev,	0,		0 },	{ uuopen,	uuclose,	uustrategy,	enodev,		/*13*/	  enodev,	0,		0 },	{ rlopen,	nullop,	rlstrategy,	enodev,		/*14*/	  rldump,	rlsize,		0 },	{ tmscpopen,	tmscpclose,	tmscpstrategy,	tmscpioctl,	/*15*/	  tmscpdump,	0,		B_TAPE },	{ kdbopen,	nullop,	kdbstrategy,	enodev,		/*16*/	  kdbdump,	kdbsize,	0 },};int	nblkdev = sizeof (bdevsw) / sizeof (bdevsw[0]);int	cnopen(),cnclose(),cnread(),cnwrite(),cnioctl();struct tty cons;#include "acc.h"#if NACC > 0int     accreset();#else#define accreset nullop#endif#include "ct.h"#if NCT > 0int	ctopen(),ctclose(),ctwrite();#else#define	ctopen	nullop#define	ctclose	nullop#define	ctwrite	nullop#endif#include "dh.h"#if NDH == 0#define	dhopen	enxio#define	dhclose	enxio#define	dhread	enxio#define	dhwrite	enxio#define	dhioctl	enxio#define	dhstop	enxio#define	dhreset	nullop#define	dh11	0#elseint	dhopen(),dhclose(),dhread(),dhwrite(),dhioctl(),dhstop(),dhreset();struct	tty dh11[];#endif#include "dmf.h"#if NDMF == 0#define	dmfopen		enxio#define	dmfclose	enxio#define	dmfread		enxio#define	dmfwrite	enxio#define	dmfioctl	enxio#define	dmfstop		enxio#define	dmfreset	nullop#define	dmf_tty	0#elseint	dmfopen(),dmfclose(),dmfread(),dmfwrite(),dmfioctl(),dmfstop(),dmfreset();struct	tty dmf_tty[];#endif#if VAX8600int	crlopen(),crlclose(),crlrw();#else#define	crlopen		enxio#define	crlclose	enxio#define	crlrw		enxio#endif#if VAX8200int	rx50open(),rx50close(),rx50rw();#else#define	rx50open	enxio#define	rx50close	enxio#define	rx50rw		enxio#endif#if VAX780int	flopen(),flclose(),flrw();#else#define	flopen	enxio#define	flclose	enxio#define	flrw	enxio#endif#include "dz.h"#if NDZ == 0#define	dzopen	enxio#define	dzclose	enxio#define	dzread	enxio#define	dzwrite	enxio#define	dzioctl	enxio#define	dzstop	enxio#define	dzreset	nullop#define	dz_tty	0#elseint	dzopen(),dzclose(),dzread(),dzwrite(),dzioctl(),dzstop(),dzreset();struct	tty dz_tty[];#endif#include "lp.h"#if NLP > 0int	lpopen(),lpclose(),lpwrite(),lpreset();#else#define	lpopen		enxio#define	lpclose		enxio#define	lpwrite		enxio#define	lpreset		nullop#endifint	cttyopen(),cttyread(),cttywrite(),cttyioctl(),cttyselect();int 	mmrw();#define	mmselect	seltrue#include "va.h"#if NVA > 0int	vaopen(),vaclose(),vawrite(),vaioctl(),vareset(),vaselect();#else#define	vaopen		enxio#define	vaclose		enxio#define	vawrite		enxio#define	vaopen		enxio#define	vaioctl		enxio#define	vareset		nullop#define	vaselect	enxio#endif#include "vp.h"#if NVP > 0

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -