summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authoryokota <yokota@FreeBSD.org>2001-08-02 13:22:33 +0000
committeryokota <yokota@FreeBSD.org>2001-08-02 13:22:33 +0000
commit5ae9960da3f93d3677365b8fb5679dd6b9a007c5 (patch)
tree3150a895e3887b45791daa2c87e7c2c273823cc3
parent77d54406d5ea20673161903b635c712d3013fb9f (diff)
downloadFreeBSD-src-5ae9960da3f93d3677365b8fb5679dd6b9a007c5.zip
FreeBSD-src-5ae9960da3f93d3677365b8fb5679dd6b9a007c5.tar.gz
Use #ifdef DEV_SPLASH (from opt_splash.h) rather than
#if NSPLASH > 0 (from splash.h) to test the presence of the splash driver.
-rw-r--r--sys/conf/files.alpha2
-rw-r--r--sys/conf/files.i3862
-rw-r--r--sys/conf/files.ia642
-rw-r--r--sys/conf/files.pc982
-rw-r--r--sys/conf/options.alpha3
-rw-r--r--sys/conf/options.i3861
-rw-r--r--sys/conf/options.ia643
-rw-r--r--sys/conf/options.pc981
-rw-r--r--sys/dev/syscons/syscons.c56
9 files changed, 40 insertions, 32 deletions
diff --git a/sys/conf/files.alpha b/sys/conf/files.alpha
index fa26742..c0f834a 100644
--- a/sys/conf/files.alpha
+++ b/sys/conf/files.alpha
@@ -189,7 +189,7 @@ dev/dec/mcclock_if.m optional mcclock
dev/ed/if_ed_isa.c optional ed isa
dev/fb/fb.c optional fb
dev/fb/fb.c optional vga
-dev/fb/splash.c count splash
+dev/fb/splash.c optional splash
dev/fb/vga.c optional vga
dev/kbd/atkbd.c optional atkbd
dev/kbd/atkbdc.c count atkbdc
diff --git a/sys/conf/files.i386 b/sys/conf/files.i386
index 1a720b8..cd2f500 100644
--- a/sys/conf/files.i386
+++ b/sys/conf/files.i386
@@ -97,7 +97,7 @@ dev/ed/if_ed_isa.c optional ed isa
dev/eisa/eisaconf.c optional eisa
dev/fb/fb.c optional fb
dev/fb/fb.c optional vga
-dev/fb/splash.c count splash
+dev/fb/splash.c optional splash
dev/fb/vga.c optional vga
dev/fe/if_fe_isa.c optional fe isa
dev/kbd/atkbd.c optional atkbd
diff --git a/sys/conf/files.ia64 b/sys/conf/files.ia64
index 16fcc3c..4116c51 100644
--- a/sys/conf/files.ia64
+++ b/sys/conf/files.ia64
@@ -58,7 +58,7 @@ dev/advansys/adv_isa.c optional adv isa
dev/aic/aic_isa.c optional aic isa
dev/fb/fb.c optional fb
dev/fb/fb.c optional vga
-dev/fb/splash.c count splash
+dev/fb/splash.c optional splash
dev/fb/vga.c optional vga
dev/kbd/atkbd.c optional atkbd
dev/kbd/atkbdc.c count atkbdc
diff --git a/sys/conf/files.pc98 b/sys/conf/files.pc98
index 634e655..dafb934 100644
--- a/sys/conf/files.pc98
+++ b/sys/conf/files.pc98
@@ -97,7 +97,7 @@ dev/ed/if_ed_cbus.c optional ed isa
dev/eisa/eisaconf.c optional eisa
dev/fb/fb.c optional fb
dev/fb/fb.c optional gdc
-dev/fb/splash.c count splash
+dev/fb/splash.c optional splash
dev/fe/if_fe_cbus.c optional fe isa
dev/kbd/kbd.c optional kbd
dev/kbd/kbd.c optional sc
diff --git a/sys/conf/options.alpha b/sys/conf/options.alpha
index 41d733c..cc1f80c 100644
--- a/sys/conf/options.alpha
+++ b/sys/conf/options.alpha
@@ -75,3 +75,6 @@ TIMER_FREQ opt_clock.h
COMPAT_LINUX opt_dontuse.h
DEBUG_LINUX opt_linux.h
COMPAT_OSF1 opt_dontuse.h
+
+# Device options
+DEV_SPLASH opt_splash.h
diff --git a/sys/conf/options.i386 b/sys/conf/options.i386
index 6cc4ebc..ba54b1c 100644
--- a/sys/conf/options.i386
+++ b/sys/conf/options.i386
@@ -198,6 +198,7 @@ NDGBPORTS opt_dgb.h
# Device options
DEV_NPX opt_npx.h
DEV_APM opt_apm.h
+DEV_SPLASH opt_splash.h
# SMB/CIFS requester
NETSMB opt_netsmb.h
diff --git a/sys/conf/options.ia64 b/sys/conf/options.ia64
index 3a34a07..2258e44 100644
--- a/sys/conf/options.ia64
+++ b/sys/conf/options.ia64
@@ -57,3 +57,6 @@ TIMER_FREQ opt_clock.h
# SKI emulator options
SKI_ROOT_FILESYSTEM opt_ski.h
SSC_NSECT opt_ski.h
+
+# Device options
+DEV_SPLASH opt_splash.h
diff --git a/sys/conf/options.pc98 b/sys/conf/options.pc98
index 3661e7c..0e8bc75 100644
--- a/sys/conf/options.pc98
+++ b/sys/conf/options.pc98
@@ -205,6 +205,7 @@ LINE30 opt_syscons.h
# Device options
DEV_NPX opt_npx.h
DEV_APM opt_apm.h
+DEV_SPLASH opt_splash.h
# SMB/CIFS requester
NETSMB opt_netsmb.h
diff --git a/sys/dev/syscons/syscons.c b/sys/dev/syscons/syscons.c
index f8787a6..056622e 100644
--- a/sys/dev/syscons/syscons.c
+++ b/sys/dev/syscons/syscons.c
@@ -28,8 +28,8 @@
* $FreeBSD$
*/
-#include "splash.h"
#include "opt_syscons.h"
+#include "opt_splash.h"
#include "opt_ddb.h"
#ifdef __i386__
#include "opt_apm.h"
@@ -102,7 +102,7 @@ static char sc_malloc = FALSE;
static int saver_mode = CONS_NO_SAVER; /* LKM/user saver */
static int run_scrn_saver = FALSE; /* should run the saver? */
static long scrn_blank_time = 0; /* screen saver timeout value */
-#if NSPLASH > 0
+#ifdef DEV_SPLASH
static int scrn_blanked; /* # of blanked screen */
static int sticky_splash = FALSE;
@@ -154,7 +154,7 @@ static timeout_t scrn_timer;
static int and_region(int *s1, int *e1, int s2, int e2);
static void scrn_update(scr_stat *scp, int show_cursor);
-#if NSPLASH > 0
+#ifdef DEV_SPLASH
static int scsplash_callback(int event, void *arg);
static void scsplash_saver(sc_softc_t *sc, int show);
static int add_scrn_saver(void (*this_saver)(sc_softc_t *, int));
@@ -164,9 +164,9 @@ static int restore_scrn_saver_mode(scr_stat *scp, int changemode);
static void stop_scrn_saver(sc_softc_t *sc, void (*saver)(sc_softc_t *, int));
static int wait_scrn_saver_stop(sc_softc_t *sc);
#define scsplash_stick(stick) (sticky_splash = (stick))
-#else /* !NSPLASH */
+#else /* !DEV_SPLASH */
#define scsplash_stick(stick)
-#endif /* NSPLASH */
+#endif /* DEV_SPLASH */
static int do_switch_scr(sc_softc_t *sc, int s);
static int vt_proc_alive(scr_stat *scp);
@@ -333,14 +333,14 @@ sc_attach_unit(int unit, int flags)
#ifdef SC_PIXEL_MODE
if ((sc->config & SC_VESA800X600)
&& ((*vidsw[sc->adapter]->get_info)(sc->adp, M_VESA_800x600, &info) == 0)) {
-#if NSPLASH > 0
+#ifdef DEV_SPLASH
if (sc->flags & SC_SPLASH_SCRN)
splash_term(sc->adp);
#endif
sc_set_graphics_mode(scp, NULL, M_VESA_800x600);
sc_set_pixel_mode(scp, NULL, COL, ROW, 16);
sc->initial_mode = M_VESA_800x600;
-#if NSPLASH > 0
+#ifdef DEV_SPLASH
/* put up the splash again! */
if (sc->flags & SC_SPLASH_SCRN)
splash_init(sc->adp, scsplash_callback, sc);
@@ -790,12 +790,12 @@ scioctl(dev_t dev, u_long cmd, caddr_t data, int flag, struct proc *p)
scsplash_stick(FALSE);
saver_mode = *(int *)data;
s = spltty();
-#if NSPLASH > 0
+#ifdef DEV_SPLASH
if ((error = wait_scrn_saver_stop(NULL))) {
splx(s);
return error;
}
-#endif /* NSPLASH */
+#endif
run_scrn_saver = TRUE;
if (saver_mode == CONS_USR_SAVER)
scp->status |= SAVER_RUNNING;
@@ -1577,11 +1577,11 @@ sccnupdate(scr_stat *scp)
if (!run_scrn_saver)
scp->sc->flags &= ~SC_SCRN_IDLE;
-#if NSPLASH > 0
+#ifdef DEV_SPLASH
if ((saver_mode != CONS_LKM_SAVER) || !(scp->sc->flags & SC_SCRN_IDLE))
if (scp->sc->flags & SC_SCRN_BLANKED)
stop_scrn_saver(scp->sc, current_saver);
-#endif /* NSPLASH */
+#endif
if (scp != scp->sc->cur_scp || scp->sc->blink_in_progress
|| scp->sc->switch_in_progress)
@@ -1655,11 +1655,11 @@ scrn_timer(void *arg)
if (scrn_blank_time > 0)
run_scrn_saver = TRUE;
}
-#if NSPLASH > 0
+#ifdef DEV_SPLASH
if ((saver_mode != CONS_LKM_SAVER) || !(sc->flags & SC_SCRN_IDLE))
if (sc->flags & SC_SCRN_BLANKED)
stop_scrn_saver(sc, current_saver);
-#endif /* NSPLASH */
+#endif
/* should we just return ? */
if (sc->blink_in_progress || sc->switch_in_progress
@@ -1675,12 +1675,12 @@ scrn_timer(void *arg)
if (!ISGRAPHSC(scp) && !(sc->flags & SC_SCRN_BLANKED))
scrn_update(scp, TRUE);
-#if NSPLASH > 0
+#ifdef DEV_SPLASH
/* should we activate the screen saver? */
if ((saver_mode == CONS_LKM_SAVER) && (sc->flags & SC_SCRN_IDLE))
if (!ISGRAPHSC(scp) || (sc->flags & SC_SCRN_BLANKED))
(*current_saver)(sc, TRUE);
-#endif /* NSPLASH */
+#endif
if (again)
timeout(scrn_timer, sc, hz / 25);
@@ -1819,7 +1819,7 @@ scrn_update(scr_stat *scp, int show_cursor)
--scp->sc->videoio_in_progress;
}
-#if NSPLASH > 0
+#ifdef DEV_SPLASH
static int
scsplash_callback(int event, void *arg)
{
@@ -2047,7 +2047,7 @@ wait_scrn_saver_stop(sc_softc_t *sc)
run_scrn_saver = FALSE;
return error;
}
-#endif /* NSPLASH */
+#endif /* DEV_SPLASH */
void
sc_touch_scrn_saver(void)
@@ -2393,7 +2393,7 @@ exchange_scr(sc_softc_t *sc)
void
sc_puts(scr_stat *scp, u_char *buf, int len)
{
-#if NSPLASH > 0
+#ifdef DEV_SPLASH
/* make screensaver happy */
if (!sticky_splash && scp == scp->sc->cur_scp)
run_scrn_saver = FALSE;
@@ -2709,13 +2709,13 @@ scinit(int unit, int flags)
save_palette(sc->adp, sc->palette);
#endif
-#if NSPLASH > 0
+#ifdef DEV_SPLASH
if (!(sc->flags & SC_SPLASH_SCRN) && (flags & SC_KERNEL_CONSOLE)) {
/* we are ready to put up the splash image! */
splash_init(sc->adp, scsplash_callback, sc);
sc->flags |= SC_SPLASH_SCRN;
}
-#endif /* NSPLASH */
+#endif
}
/* the rest is not necessary, if we have done it once */
@@ -2740,13 +2740,13 @@ scterm(int unit, int flags)
if (sc == NULL)
return; /* shouldn't happen */
-#if NSPLASH > 0
+#ifdef DEV_SPLASH
/* this console is no longer available for the splash screen */
if (sc->flags & SC_SPLASH_SCRN) {
splash_term(sc->adp);
sc->flags &= ~SC_SPLASH_SCRN;
}
-#endif /* NSPLASH */
+#endif
#if 0 /* XXX */
/* move the hardware cursor to the upper-left corner */
@@ -2803,16 +2803,16 @@ scshutdown(void *arg, int howto)
int
sc_clean_up(scr_stat *scp)
{
-#if NSPLASH > 0
+#ifdef DEV_SPLASH
int error;
-#endif /* NSPLASH */
+#endif
if (scp->sc->flags & SC_SCRN_BLANKED) {
sc_touch_scrn_saver();
-#if NSPLASH > 0
+#ifdef DEV_SPLASH
if ((error = wait_scrn_saver_stop(scp->sc)))
return error;
-#endif /* NSPLASH */
+#endif
}
scp->status |= MOUSE_HIDDEN;
sc_remove_mouse_image(scp);
@@ -3174,7 +3174,7 @@ next_code:
break;
case SPSC:
-#if NSPLASH > 0
+#ifdef DEV_SPLASH
/* force activatation/deactivation of the screen saver */
if (!(sc->flags & SC_SCRN_BLANKED)) {
run_scrn_saver = TRUE;
@@ -3195,7 +3195,7 @@ next_code:
}
}
}
-#endif /* NSPLASH */
+#endif /* DEV_SPLASH */
break;
case RBT:
OpenPOWER on IntegriCloud