diff options
| author | Yoshihiro Takahashi <nyan@FreeBSD.org> | 2000-03-29 12:26:41 +0000 |
|---|---|---|
| committer | Yoshihiro Takahashi <nyan@FreeBSD.org> | 2000-03-29 12:26:41 +0000 |
| commit | 8b838a7ac2beb1e45589c7c40a871da579697bad (patch) | |
| tree | 92aceaa5b8f6bc1788b5e34f0db9f44289ac13ab /sys | |
| parent | ba901a111ba4ba97784bd278618c2356f24cbd73 (diff) | |
Notes
Diffstat (limited to 'sys')
| -rw-r--r-- | sys/conf/files.pc98 | 8 | ||||
| -rw-r--r-- | sys/pc98/cbus/gdc.c | 5 | ||||
| -rw-r--r-- | sys/pc98/cbus/pckbd.c | 4 | ||||
| -rw-r--r-- | sys/pc98/cbus/scgdcrndr.c | 6 | ||||
| -rw-r--r-- | sys/pc98/cbus/scterm-sck.c | 5 | ||||
| -rw-r--r-- | sys/pc98/cbus/scvtb.c | 5 | ||||
| -rw-r--r-- | sys/pc98/cbus/syscons_cbus.c | 9 | ||||
| -rw-r--r-- | sys/pc98/pc98/pc98gdc.c | 5 | ||||
| -rw-r--r-- | sys/pc98/pc98/pc98kbd.c | 4 | ||||
| -rw-r--r-- | sys/pc98/pc98/scgdcrndr.c | 6 | ||||
| -rw-r--r-- | sys/pc98/pc98/scterm-sck.c | 5 | ||||
| -rw-r--r-- | sys/pc98/pc98/scvtbpc98.c | 5 | ||||
| -rw-r--r-- | sys/pc98/pc98/syscons.c | 4 | ||||
| -rw-r--r-- | sys/pc98/pc98/syscons_pc98.c | 9 |
14 files changed, 10 insertions, 70 deletions
diff --git a/sys/conf/files.pc98 b/sys/conf/files.pc98 index 5b4d9df3e791..10334760b27a 100644 --- a/sys/conf/files.pc98 +++ b/sys/conf/files.pc98 @@ -305,7 +305,7 @@ pc98/pc98/syscons.c optional sc pc98/pc98/syscons_pc98.c optional sc dev/syscons/schistory.c optional sc dev/syscons/scmouse.c optional sc -pc98/pc98/scgdcrndr.c optional sc +pc98/pc98/scgdcrndr.c optional sc gdc dev/syscons/scterm.c optional sc dev/syscons/scterm-dumb.c optional sc pc98/pc98/scterm-sck.c optional sc @@ -315,9 +315,9 @@ dev/syscons/sysmouse.c optional sc i386/isa/tw.c optional tw pc98/pc98/wd.c optional wdc pc98/pc98/wd.c optional wd -pc98/pc98/wd_cd.c optional wcd -pc98/pc98/wfd.c optional wfd -pc98/pc98/wst.c optional wst +pc98/pc98/wd_cd.c optional wcd wdc +pc98/pc98/wfd.c optional wfd wdc +pc98/pc98/wst.c optional wst wdc i386/isa/wt.c optional wt i386/linux/imgact_linux.c optional compat_linux i386/linux/linux_dummy.c optional compat_linux diff --git a/sys/pc98/cbus/gdc.c b/sys/pc98/cbus/gdc.c index d3f6d921a271..26dcb4373532 100644 --- a/sys/pc98/cbus/gdc.c +++ b/sys/pc98/cbus/gdc.c @@ -28,13 +28,10 @@ * $FreeBSD$ */ -#include "gdc.h" #include "opt_gdc.h" #include "opt_fb.h" #include "opt_syscons.h" -#if NGDC > 0 - #include <sys/param.h> #include <sys/systm.h> #include <sys/kernel.h> @@ -1077,5 +1074,3 @@ gdc_diag(video_adapter_t *adp, int level) return 0; } - -#endif /* NGDC > 0 */ diff --git a/sys/pc98/cbus/pckbd.c b/sys/pc98/cbus/pckbd.c index b4eb1487232f..d46edbf2bc67 100644 --- a/sys/pc98/cbus/pckbd.c +++ b/sys/pc98/cbus/pckbd.c @@ -31,8 +31,6 @@ #include "pckbd.h" #include "opt_kbd.h" -#if NPCKBD > 0 - #include <sys/param.h> #include <sys/systm.h> #include <sys/kernel.h> @@ -927,5 +925,3 @@ read_kbd_data_no_wait(KBDC p) } return -1; /* no data */ } - -#endif /* NPCKBD > 0 */ diff --git a/sys/pc98/cbus/scgdcrndr.c b/sys/pc98/cbus/scgdcrndr.c index 22a6d5d672c0..33f2ea1ce828 100644 --- a/sys/pc98/cbus/scgdcrndr.c +++ b/sys/pc98/cbus/scgdcrndr.c @@ -26,13 +26,9 @@ * $FreeBSD$ */ -#include "sc.h" -#include "gdc.h" #include "opt_syscons.h" #include "opt_gdc.h" -#if NSC > 0 && NGDC > 0 - #include <sys/param.h> #include <sys/kernel.h> @@ -199,5 +195,3 @@ gdc_grborder(scr_stat *scp, int color) } #endif /* SC_NO_MODE_CHANGE */ - -#endif /* NSC > 0 && NGDC > 0 */ diff --git a/sys/pc98/cbus/scterm-sck.c b/sys/pc98/cbus/scterm-sck.c index ec092743fbe3..bc69200c9bb6 100644 --- a/sys/pc98/cbus/scterm-sck.c +++ b/sys/pc98/cbus/scterm-sck.c @@ -26,11 +26,8 @@ * $FreeBSD$ */ -#include "sc.h" #include "opt_syscons.h" -#if NSC > 0 - #include <sys/param.h> #include <sys/systm.h> #include <sys/kernel.h> @@ -1106,5 +1103,3 @@ kanji_convert(u_char mode, u_char h, u_char l) #endif /* KANJI */ #endif /* SC_DUMB_TERMINAL */ - -#endif /* NSC > 0 */ diff --git a/sys/pc98/cbus/scvtb.c b/sys/pc98/cbus/scvtb.c index 1c0be2c81146..7677442e9989 100644 --- a/sys/pc98/cbus/scvtb.c +++ b/sys/pc98/cbus/scvtb.c @@ -26,11 +26,8 @@ * $FreeBSD$ */ -#include "sc.h" #include "opt_syscons.h" -#if NSC > 0 - #include <sys/param.h> #include <sys/systm.h> #include <sys/malloc.h> @@ -405,5 +402,3 @@ sc_vtb_ins(sc_vtb_t *vtb, int at, int count, int c, int attr) (void *)sc_vtb_attr_pointer(vtb, at), count); } } - -#endif /* NSC */ diff --git a/sys/pc98/cbus/syscons_cbus.c b/sys/pc98/cbus/syscons_cbus.c index d4f5bd1541d4..7a8b584b175e 100644 --- a/sys/pc98/cbus/syscons_cbus.c +++ b/sys/pc98/cbus/syscons_cbus.c @@ -26,11 +26,8 @@ * $FreeBSD$ */ -#include "sc.h" #include "opt_syscons.h" -#if NSC > 0 - #include <sys/param.h> #include <sys/systm.h> #include <sys/kernel.h> @@ -105,13 +102,15 @@ sc_softc_t { sc_softc_t *sc; - if ((unit < 0) || (unit >= NSC)) + if (unit < 0) return NULL; if (flags & SC_KERNEL_CONSOLE) { /* FIXME: clear if it is wired to another unit! */ sc = &main_softc; } else { sc = (sc_softc_t *)device_get_softc(devclass_get_device(sc_devclass, unit)); + if (sc == NULL) + return NULL; } sc->unit = unit; if (!(sc->flags & SC_INIT_DONE)) { @@ -213,5 +212,3 @@ sc_tone(int herz) } DRIVER_MODULE(sc, isa, sc_driver, sc_devclass, 0, 0); - -#endif /* NSC > 0 */ diff --git a/sys/pc98/pc98/pc98gdc.c b/sys/pc98/pc98/pc98gdc.c index d3f6d921a271..26dcb4373532 100644 --- a/sys/pc98/pc98/pc98gdc.c +++ b/sys/pc98/pc98/pc98gdc.c @@ -28,13 +28,10 @@ * $FreeBSD$ */ -#include "gdc.h" #include "opt_gdc.h" #include "opt_fb.h" #include "opt_syscons.h" -#if NGDC > 0 - #include <sys/param.h> #include <sys/systm.h> #include <sys/kernel.h> @@ -1077,5 +1074,3 @@ gdc_diag(video_adapter_t *adp, int level) return 0; } - -#endif /* NGDC > 0 */ diff --git a/sys/pc98/pc98/pc98kbd.c b/sys/pc98/pc98/pc98kbd.c index b4eb1487232f..d46edbf2bc67 100644 --- a/sys/pc98/pc98/pc98kbd.c +++ b/sys/pc98/pc98/pc98kbd.c @@ -31,8 +31,6 @@ #include "pckbd.h" #include "opt_kbd.h" -#if NPCKBD > 0 - #include <sys/param.h> #include <sys/systm.h> #include <sys/kernel.h> @@ -927,5 +925,3 @@ read_kbd_data_no_wait(KBDC p) } return -1; /* no data */ } - -#endif /* NPCKBD > 0 */ diff --git a/sys/pc98/pc98/scgdcrndr.c b/sys/pc98/pc98/scgdcrndr.c index 22a6d5d672c0..33f2ea1ce828 100644 --- a/sys/pc98/pc98/scgdcrndr.c +++ b/sys/pc98/pc98/scgdcrndr.c @@ -26,13 +26,9 @@ * $FreeBSD$ */ -#include "sc.h" -#include "gdc.h" #include "opt_syscons.h" #include "opt_gdc.h" -#if NSC > 0 && NGDC > 0 - #include <sys/param.h> #include <sys/kernel.h> @@ -199,5 +195,3 @@ gdc_grborder(scr_stat *scp, int color) } #endif /* SC_NO_MODE_CHANGE */ - -#endif /* NSC > 0 && NGDC > 0 */ diff --git a/sys/pc98/pc98/scterm-sck.c b/sys/pc98/pc98/scterm-sck.c index ec092743fbe3..bc69200c9bb6 100644 --- a/sys/pc98/pc98/scterm-sck.c +++ b/sys/pc98/pc98/scterm-sck.c @@ -26,11 +26,8 @@ * $FreeBSD$ */ -#include "sc.h" #include "opt_syscons.h" -#if NSC > 0 - #include <sys/param.h> #include <sys/systm.h> #include <sys/kernel.h> @@ -1106,5 +1103,3 @@ kanji_convert(u_char mode, u_char h, u_char l) #endif /* KANJI */ #endif /* SC_DUMB_TERMINAL */ - -#endif /* NSC > 0 */ diff --git a/sys/pc98/pc98/scvtbpc98.c b/sys/pc98/pc98/scvtbpc98.c index 1c0be2c81146..7677442e9989 100644 --- a/sys/pc98/pc98/scvtbpc98.c +++ b/sys/pc98/pc98/scvtbpc98.c @@ -26,11 +26,8 @@ * $FreeBSD$ */ -#include "sc.h" #include "opt_syscons.h" -#if NSC > 0 - #include <sys/param.h> #include <sys/systm.h> #include <sys/malloc.h> @@ -405,5 +402,3 @@ sc_vtb_ins(sc_vtb_t *vtb, int at, int count, int c, int attr) (void *)sc_vtb_attr_pointer(vtb, at), count); } } - -#endif /* NSC */ diff --git a/sys/pc98/pc98/syscons.c b/sys/pc98/pc98/syscons.c index 7ddbdd26cd2d..3d195f37eb87 100644 --- a/sys/pc98/pc98/syscons.c +++ b/sys/pc98/pc98/syscons.c @@ -28,7 +28,6 @@ * $FreeBSD$ */ -#include "sc.h" #include "splash.h" #include "opt_syscons.h" #include "opt_ddb.h" @@ -36,7 +35,6 @@ #include "apm.h" #endif -#if NSC > 0 #include <sys/param.h> #include <sys/systm.h> #include <sys/eventhandler.h> @@ -3428,5 +3426,3 @@ blink_screen(void *arg) timeout(blink_screen, scp, hz / 10); } } - -#endif /* NSC */ diff --git a/sys/pc98/pc98/syscons_pc98.c b/sys/pc98/pc98/syscons_pc98.c index d4f5bd1541d4..7a8b584b175e 100644 --- a/sys/pc98/pc98/syscons_pc98.c +++ b/sys/pc98/pc98/syscons_pc98.c @@ -26,11 +26,8 @@ * $FreeBSD$ */ -#include "sc.h" #include "opt_syscons.h" -#if NSC > 0 - #include <sys/param.h> #include <sys/systm.h> #include <sys/kernel.h> @@ -105,13 +102,15 @@ sc_softc_t { sc_softc_t *sc; - if ((unit < 0) || (unit >= NSC)) + if (unit < 0) return NULL; if (flags & SC_KERNEL_CONSOLE) { /* FIXME: clear if it is wired to another unit! */ sc = &main_softc; } else { sc = (sc_softc_t *)device_get_softc(devclass_get_device(sc_devclass, unit)); + if (sc == NULL) + return NULL; } sc->unit = unit; if (!(sc->flags & SC_INIT_DONE)) { @@ -213,5 +212,3 @@ sc_tone(int herz) } DRIVER_MODULE(sc, isa, sc_driver, sc_devclass, 0, 0); - -#endif /* NSC > 0 */ |
