diff options
author | Theo de Raadt <deraadt@cvs.openbsd.org> | 1998-02-05 16:49:41 +0000 |
---|---|---|
committer | Theo de Raadt <deraadt@cvs.openbsd.org> | 1998-02-05 16:49:41 +0000 |
commit | bfb1b6126bcfdf842489313cd93b5e5a43512f3e (patch) | |
tree | 2a75a348bbc797d52960b5f52b7354f90cec7753 /sys/arch/i386/isa | |
parent | fe9553578b983f487fcb86562db0ab1434df2949 (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')
-rw-r--r-- | sys/arch/i386/isa/pccom.c | 8 | ||||
-rw-r--r-- | sys/arch/i386/isa/pccons.c | 16 | ||||
-rw-r--r-- | sys/arch/i386/isa/pcvt/pcvt_hdr.h | 5 | ||||
-rw-r--r-- | sys/arch/i386/isa/pcvt/pcvt_kbd.c | 5 |
4 files changed, 24 insertions, 10 deletions
diff --git a/sys/arch/i386/isa/pccom.c b/sys/arch/i386/isa/pccom.c index c8f231478b4..c315ad126aa 100644 --- a/sys/arch/i386/isa/pccom.c +++ b/sys/arch/i386/isa/pccom.c @@ -1,4 +1,4 @@ -/* $OpenBSD: pccom.c,v 1.19 1998/02/02 22:21:20 deraadt Exp $ */ +/* $OpenBSD: pccom.c,v 1.20 1998/02/05 16:48:28 deraadt Exp $ */ /* $NetBSD: com.c,v 1.82.4.1 1996/06/02 09:08:00 mrg Exp $ */ /*- @@ -67,6 +67,9 @@ #include <dev/ic/hayespreg.h> #endif #define com_lcr com_cfcr +#ifdef DDB +#include <ddb/db_var.h> +#endif #include "pccomvar.h" #include "pccom.h" @@ -1477,7 +1480,8 @@ comsoft() if (ISSET(lsr, LSR_BI)) { #ifdef DDB if (ISSET(sc->sc_hwflags, COM_HW_CONSOLE)) { - Debugger(); + if (db_console) + Debugger(); rxget = (rxget + 1) & RBUFMASK; continue; } 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 diff --git a/sys/arch/i386/isa/pcvt/pcvt_hdr.h b/sys/arch/i386/isa/pcvt/pcvt_hdr.h index 005318131c3..d2277444682 100644 --- a/sys/arch/i386/isa/pcvt/pcvt_hdr.h +++ b/sys/arch/i386/isa/pcvt/pcvt_hdr.h @@ -1,4 +1,4 @@ -/* $OpenBSD: pcvt_hdr.h,v 1.17 1998/01/11 06:15:34 deraadt Exp $ */ +/* $OpenBSD: pcvt_hdr.h,v 1.18 1998/02/05 16:48:32 deraadt Exp $ */ /* * Copyright (c) 1992, 1995 Hellmuth Michaelis and Joerg Wunsch. @@ -88,6 +88,9 @@ #include <sys/syslog.h> #include <sys/malloc.h> #include <sys/time.h> +#ifdef DDB +#include <ddb/db_var.h> +#endif #include "pcvt_conf.h" diff --git a/sys/arch/i386/isa/pcvt/pcvt_kbd.c b/sys/arch/i386/isa/pcvt/pcvt_kbd.c index fe955ed9067..81ced849440 100644 --- a/sys/arch/i386/isa/pcvt/pcvt_kbd.c +++ b/sys/arch/i386/isa/pcvt/pcvt_kbd.c @@ -1,4 +1,4 @@ -/* $OpenBSD: pcvt_kbd.c,v 1.12 1998/01/11 06:15:35 deraadt Exp $ */ +/* $OpenBSD: pcvt_kbd.c,v 1.13 1998/02/05 16:48:34 deraadt Exp $ */ /* * Copyright (c) 1992, 1995 Hellmuth Michaelis and Joerg Wunsch. @@ -1437,7 +1437,8 @@ regular: /* the string is actually not used... */ Debugger("kbd"); #else - Debugger(); + if (db_console) + Debugger(); #endif in_Debugger = 0; if(noblock) |