From de4dc9595e85847e8a127038e46cb6031cc0690e Mon Sep 17 00:00:00 2001 From: Alfred Perlstein Date: Fri, 5 Apr 2002 17:53:25 +0000 Subject: Add some functionality via sysctl to syscons. hw.syscons.saver.keybonly: used to specify that only input is to interrupt the screensaver. This allows one to run a chatty console app but still have the screen blank out until a key is pressed. There should probably also be an ioctl for this, we'll do that later. hw.syscons.saver.blanktime: exports the screensaver timeout via sysctl. Submitted by: Olivier Houchard --- sys/dev/syscons/syscons.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'sys/dev/syscons/syscons.c') diff --git a/sys/dev/syscons/syscons.c b/sys/dev/syscons/syscons.c index f572f8a97d2e..fb95e6e9a085 100644 --- a/sys/dev/syscons/syscons.c +++ b/sys/dev/syscons/syscons.c @@ -89,6 +89,7 @@ static default_attr kernel_default = { }; static int sc_console_unit = -1; +static int sc_saver_keyb_only; static scr_stat *sc_console; static struct tty *sc_console_tty; static void *kernel_console_ts; @@ -108,6 +109,12 @@ static void none_saver(sc_softc_t *sc, int blank) { } static void (*current_saver)(sc_softc_t *, int) = none_saver; #endif +SYSCTL_NODE(_hw, OID_AUTO, syscons, CTLFLAG_RD, 0, "syscons"); +SYSCTL_NODE(_hw_syscons, OID_AUTO, saver, CTLFLAG_RD, 0, "saver"); +SYSCTL_INT(_hw_syscons_saver, OID_AUTO, keybonly, CTLFLAG_RW, + &sc_saver_keyb_only, 0, "screen saver interrupted by input only"); +SYSCTL_INT(_hw_syscons_saver, OID_AUTO, blanktime, CTLFLAG_RW, + &scrn_blank_time, 0, "screensaver timeout"); #if !defined(SC_NO_FONT_LOADING) && defined(SC_DFLT_FONT) #include "font.h" #endif @@ -2408,7 +2415,7 @@ sc_puts(scr_stat *scp, u_char *buf, int len) { #ifdef DEV_SPLASH /* make screensaver happy */ - if (!sticky_splash && scp == scp->sc->cur_scp) + if (!sticky_splash && scp == scp->sc->cur_scp && !sc_saver_keyb_only) run_scrn_saver = FALSE; #endif -- cgit v1.3