summaryrefslogtreecommitdiff
path: root/sys/arch/i386/isa/pccons.c
diff options
context:
space:
mode:
authorTheo de Raadt <deraadt@cvs.openbsd.org>1998-02-05 16:49:41 +0000
committerTheo de Raadt <deraadt@cvs.openbsd.org>1998-02-05 16:49:41 +0000
commitbfb1b6126bcfdf842489313cd93b5e5a43512f3e (patch)
tree2a75a348bbc797d52960b5f52b7354f90cec7753 /sys/arch/i386/isa/pccons.c
parentfe9553578b983f487fcb86562db0ab1434df2949 (diff)
rename ddb.panic_ddb, and add ddb.console. Now you can stop console ddb entry
with a sysctl. There will be architectures and drivers that lack function, and I trust the maintainers of those will forget to add the code..
Diffstat (limited to 'sys/arch/i386/isa/pccons.c')
-rw-r--r--sys/arch/i386/isa/pccons.c16
1 files changed, 11 insertions, 5 deletions
diff --git a/sys/arch/i386/isa/pccons.c b/sys/arch/i386/isa/pccons.c
index 49f1a807578..9707c0a023d 100644
--- a/sys/arch/i386/isa/pccons.c
+++ b/sys/arch/i386/isa/pccons.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: pccons.c,v 1.36 1997/11/06 02:26:45 deraadt Exp $ */
+/* $OpenBSD: pccons.c,v 1.37 1998/02/05 16:48:30 deraadt Exp $ */
/* $NetBSD: pccons.c,v 1.99.4.1 1996/06/04 20:03:53 cgd Exp $ */
/*-
@@ -57,6 +57,9 @@
#include <sys/kernel.h>
#include <sys/syslog.h>
#include <sys/device.h>
+#ifdef DDB
+#include <ddb/db_var.h>
+#endif
#include <dev/cons.h>
@@ -1678,8 +1681,9 @@ top:
if (pc_xmode > 0) {
#if defined(DDB) && defined(XSERVER_DDB)
/* F12 enters the debugger while in X mode */
- if (dt == 88)
- Debugger();
+ if (dt == 88 && db_console)
+ if (db_console)
+ Debugger();
#endif
capchar[0] = dt;
capchar[1] = 0;
@@ -1740,9 +1744,11 @@ top:
/*
* Check for cntl-alt-esc.
*/
- if ((dt == 1) && (shift_state & (KB_CTL | KB_ALT)) == (KB_CTL | KB_ALT)) {
+ if (db_console && dt == 1 &&
+ (shift_state & (KB_CTL | KB_ALT)) == (KB_CTL | KB_ALT)) {
screen_restore(1);
- Debugger();
+ if (db_console)
+ Debugger();
dt |= 0x80; /* discard esc (ddb discarded ctl-alt) */
}
#endif