From 4930cbfa04d235d7af3650b289fbf5da57b464c5 Mon Sep 17 00:00:00 2001 From: Kazutaka YOKOTA Date: Wed, 11 Feb 1998 14:56:02 +0000 Subject: - Ignore KBD_RAW_MODE and KBD_CODE_MODE in scgetc() when it's called from the low-level console routines sccngetc() and sccncheckc(). Submitted by: bde (a long time ago) - Don't try to ring bell and immediately return from do_bell() while device probe is in progress at boot time; the timeout queue is not functional yet. PR: kern/2424 - Stop running the screen saver after panic() is called: check if `panicstr' is non-NULL during scrn_timer(). PR: kern/5314 - A new option: SC_DISABLE_REBOOT The reboot key (usually Ctl-Alt-Del) will be ignored if this option is defined. You may still have the reboot key defined in the keymap and it won't cause error when the keymap is loaded, but it will be quietly treated as nop. OKed by: sos --- sys/dev/syscons/syscons.c | 27 ++++++++++++++++++--------- 1 file changed, 18 insertions(+), 9 deletions(-) (limited to 'sys/dev/syscons') diff --git a/sys/dev/syscons/syscons.c b/sys/dev/syscons/syscons.c index 1c07a09365d1e..62a00283cfb6b 100644 --- a/sys/dev/syscons/syscons.c +++ b/sys/dev/syscons/syscons.c @@ -25,7 +25,7 @@ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * - * $Id: syscons.c,v 1.246 1998/01/20 03:37:27 yokota Exp $ + * $Id: syscons.c,v 1.247 1998/01/24 02:54:26 eivind Exp $ */ #include "sc.h" @@ -905,9 +905,6 @@ scintr(int unit) int c, len; u_char *cp; - /* make screensaver happy */ - scrn_time_stamp = mono_time.tv_sec; - /* * Loop while there is still input to get from the keyboard. * I don't think this is nessesary, and it doesn't fix @@ -2221,6 +2218,8 @@ scrn_timer(void *arg) } /* should we stop the screen saver? */ + if (panicstr) + scrn_time_stamp = mono_time.tv_sec; if (mono_time.tv_sec <= scrn_time_stamp + scrn_blank_time) if (scrn_blanked > 0) stop_scrn_saver(current_saver); @@ -3420,12 +3419,17 @@ next_code: } scancode = (u_char)c; - /* do the /dev/random device a favour */ - if (!(flags & SCGETC_CN)) + /* make screensaver happy */ + if (!(scancode & 0x80)) + scrn_time_stamp = mono_time.tv_sec; + + if (!(flags & SCGETC_CN)) { + /* do the /dev/random device a favour */ add_keyboard_randomness(scancode); - if (cur_console->status & KBD_RAW_MODE) - return scancode; + if (cur_console->status & KBD_RAW_MODE) + return scancode; + } keycode = scancode & 0x7F; switch (esc_flag) { @@ -3530,7 +3534,7 @@ next_code: break; } - if (cur_console->status & KBD_CODE_MODE) + if (!(flags & SCGETC_CN) && (cur_console->status & KBD_CODE_MODE)) return (keycode | (scancode & 0x80)); /* if scroll-lock pressed allow history browsing */ @@ -3769,8 +3773,10 @@ next_code: #endif break; case RBT: +#ifndef SC_DISABLE_REBOOT accents = 0; shutdown_nice(); +#endif break; case SUSP: #if NAPM > 0 @@ -4851,6 +4857,9 @@ load_palette(char *palette) static void do_bell(scr_stat *scp, int pitch, int duration) { + if (cold) + return; + if (flags & VISUAL_BELL) { if (blink_in_progress) return; -- cgit v1.3