diff options
-rw-r--r-- | sys/dev/syscons/syscons.c | 27 | ||||
-rw-r--r-- | sys/i386/isa/syscons.c | 27 | ||||
-rw-r--r-- | sys/isa/syscons.c | 27 |
3 files changed, 54 insertions, 27 deletions
diff --git a/sys/dev/syscons/syscons.c b/sys/dev/syscons/syscons.c index 1c07a09365d1..62a00283cfb6 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; diff --git a/sys/i386/isa/syscons.c b/sys/i386/isa/syscons.c index 1c07a09365d1..62a00283cfb6 100644 --- a/sys/i386/isa/syscons.c +++ b/sys/i386/isa/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; diff --git a/sys/isa/syscons.c b/sys/isa/syscons.c index 1c07a09365d1..62a00283cfb6 100644 --- a/sys/isa/syscons.c +++ b/sys/isa/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; |