summaryrefslogtreecommitdiffstats
path: root/sys/dev/syscons
diff options
context:
space:
mode:
authoryokota <yokota@FreeBSD.org>1998-02-11 14:56:02 +0000
committeryokota <yokota@FreeBSD.org>1998-02-11 14:56:02 +0000
commit9f03d5e495685875e4d2af95548ec2d4f355134f (patch)
tree2cfb12e7d016871e961b640ff26e9bf3bc8c96d1 /sys/dev/syscons
parentdb84a320eaf35ce11a490849d5d93d9df35d40d3 (diff)
downloadFreeBSD-src-9f03d5e495685875e4d2af95548ec2d4f355134f.zip
FreeBSD-src-9f03d5e495685875e4d2af95548ec2d4f355134f.tar.gz
- 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
Diffstat (limited to 'sys/dev/syscons')
-rw-r--r--sys/dev/syscons/syscons.c27
1 files changed, 18 insertions, 9 deletions
diff --git a/sys/dev/syscons/syscons.c b/sys/dev/syscons/syscons.c
index 1c07a09..62a0028 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;
OpenPOWER on IntegriCloud