From 07112865309472ef596f6776ca1869bab71e07b1 Mon Sep 17 00:00:00 2001 From: David Greenman Date: Tue, 30 Aug 1994 19:36:35 +0000 Subject: [PATCH] Cleaned up after Bruce: there were still some things that included com.h/lpa.h. Removed all vestiges of com/lpa out of conf.c and also fixed up the end of cdevsw/bdevsw to have "no" routines instead of a NULL pointer (suggested by someone a few weeks back). --- sys/i386/i386/conf.c | 51 ++++++++++---------------------------------- sys/i386/i386/cons.c | 10 +-------- sys/kern/tty_cons.c | 10 +-------- 3 files changed, 13 insertions(+), 58 deletions(-) diff --git a/sys/i386/i386/conf.c b/sys/i386/i386/conf.c index 22133331c446..c5ccca3a0230 100644 --- a/sys/i386/i386/conf.c +++ b/sys/i386/i386/conf.c @@ -41,7 +41,7 @@ * SUCH DAMAGE. * * from: @(#)conf.c 5.8 (Berkeley) 5/12/91 - * $Id: conf.c,v 1.27 1994/08/18 22:34:39 wollman Exp $ + * $Id: conf.c,v 1.28 1994/08/19 11:45:13 davidg Exp $ */ #include @@ -269,7 +269,9 @@ struct bdevsw bdevsw[] = { lkmopen, lkmclose, lkmstrategy, lkmioctl, /*13*/ lkmdump, lkmsize, NULL }, #endif - { 0, } /* block major 14 is reserved for local use */ + /* block device 14 is reserved for local use */ + { noopen, noclose, nostrategy, noioctl, /*14*/ + nodump, (p_size_t *)0, NULL } /* * If you need a bdev major number, please contact the FreeBSD team * by sending mail to "FreeBSD-hackers@freefall.cdrom.com". @@ -329,27 +331,6 @@ extern struct tty pt_tty[]; #define ptsstop (d_stop_t *)nullop #endif -#include "com.h" -#if NCOM > 0 -d_open_t comopen; -d_close_t comclose; -d_rdwr_t comread; -d_rdwr_t comwrite; -d_ioctl_t comioctl; -d_select_t comselect; -#define comreset (d_reset_t *)enxio -extern struct tty com_tty[]; -#else -#define comopen (d_open_t *)enxio -#define comclose (d_close_t *)enxio -#define comread (d_rdwr_t *)enxio -#define comwrite (d_rdwr_t *)enxio -#define comioctl (d_ioctl_t *)enxio -#define comreset (d_reset_t *)enxio -#define comselect (d_select_t *)enxio -#define com_tty NULL -#endif - /* /dev/klog */ d_open_t logopen; d_close_t logclose; @@ -450,19 +431,6 @@ d_ioctl_t bpfioctl; #define bpfioctl (d_ioctl_t *)enxio #endif -#include "lpa.h" -#if NLPA > 0 -d_open_t lpaopen; -d_close_t lpaclose; -d_rdwr_t lpawrite; -d_ioctl_t lpaioctl; -#else -#define lpaopen (d_open_t *)enxio -#define lpaclose (d_close_t *)enxio -#define lpawrite (d_rdwr_t *)enxio -#define lpaioctl (d_ioctl_t *)enxio -#endif - #include "speaker.h" #if NSPEAKER > 0 d_open_t spkropen; @@ -650,9 +618,9 @@ struct cdevsw cdevsw[] = { pcaopen, pcaclose, noread, pcawrite, /*24*/ pcaioctl, nostop, nullreset, NULL, /* pcaudio */ seltrue, nommap, NULL }, - { lpaopen, lpaclose, noread, lpawrite, /*25*/ - lpaioctl, nullstop, nullreset, NULL, /* lpa */ - seltrue, nommap, NULL }, + { noopen, noclose, noread, nowrite, /*25*/ + noioctl, nostop, noreset, NULL, /* unused */ + noselect, nommap, nostrat }, { spkropen, spkrclose, noread, spkrwrite, /*26*/ spkrioctl, nostop, nullreset, NULL, /* spkr */ seltrue, nommap, NULL }, @@ -692,7 +660,10 @@ struct cdevsw cdevsw[] = { lkmopen, lkmclose, lkmread, lkmwrite, /*38*/ lkmioctl, lkmstop, lkmreset, NULL, lkmselect, lkmmmap, NULL }, - { 0, } /* character device 32 is reserved for local use */ + /* character device 39 is reserved for local use */ + { noopen, noclose, noread, nowrite, /*39*/ + noioctl, nostop, noreset, NULL, + noselect, nommap, nostrat } /* * If you need a cdev major number, please contact the FreeBSD team * by sending mail to `freebsd-hackers@freefall.cdrom.com'. diff --git a/sys/i386/i386/cons.c b/sys/i386/i386/cons.c index f7c4581b2790..e001086331bb 100644 --- a/sys/i386/i386/cons.c +++ b/sys/i386/i386/cons.c @@ -36,7 +36,7 @@ * SUCH DAMAGE. * * from: @(#)cons.c 7.2 (Berkeley) 5/9/91 - * $Id: cons.c,v 1.12 1994/05/25 08:52:56 rgrimes Exp $ + * $Id: cons.c,v 1.13 1994/08/13 03:49:34 wollman Exp $ */ @@ -62,18 +62,10 @@ int pccnprobe(), pccninit(), pccngetc(), pccnputc(); int siocnprobe(), siocninit(), siocngetc(), siocnputc(); #endif -#include "com.h" -#if NCOM > 0 -int comcnprobe(), comcninit(), comcngetc(), comcnputc(); -#endif - struct consdev constab[] = { { pccnprobe, pccninit, pccngetc, pccnputc }, #if NSIO > 0 { siocnprobe, siocninit, siocngetc, siocnputc }, -#endif -#if NCOM > 0 - { comcnprobe, comcninit, comcngetc, comcnputc }, #endif { 0 }, }; diff --git a/sys/kern/tty_cons.c b/sys/kern/tty_cons.c index f7c4581b2790..e001086331bb 100644 --- a/sys/kern/tty_cons.c +++ b/sys/kern/tty_cons.c @@ -36,7 +36,7 @@ * SUCH DAMAGE. * * from: @(#)cons.c 7.2 (Berkeley) 5/9/91 - * $Id: cons.c,v 1.12 1994/05/25 08:52:56 rgrimes Exp $ + * $Id: cons.c,v 1.13 1994/08/13 03:49:34 wollman Exp $ */ @@ -62,18 +62,10 @@ int pccnprobe(), pccninit(), pccngetc(), pccnputc(); int siocnprobe(), siocninit(), siocngetc(), siocnputc(); #endif -#include "com.h" -#if NCOM > 0 -int comcnprobe(), comcninit(), comcngetc(), comcnputc(); -#endif - struct consdev constab[] = { { pccnprobe, pccninit, pccngetc, pccnputc }, #if NSIO > 0 { siocnprobe, siocninit, siocngetc, siocnputc }, -#endif -#if NCOM > 0 - { comcnprobe, comcninit, comcngetc, comcnputc }, #endif { 0 }, };