summaryrefslogtreecommitdiff
path: root/sys/kern/subr_prf.c
diff options
context:
space:
mode:
authorArtur Grabowski <art@cvs.openbsd.org>2000-03-02 10:50:30 +0000
committerArtur Grabowski <art@cvs.openbsd.org>2000-03-02 10:50:30 +0000
commit87a3a0d4b23d6e8fa73ee7e8b742aa31a20fe332 (patch)
tree545a14961beffd2c859215d82c12c60c8f3491d2 /sys/kern/subr_prf.c
parentde505525ed3a71697af7bb50fc391c4eceac477e (diff)
Add an option DDB_SAFE_CONSOLE that defaults db_console to 1.
In many cases, setting db_console in /etc/rc is too late.
Diffstat (limited to 'sys/kern/subr_prf.c')
-rw-r--r--sys/kern/subr_prf.c17
1 files changed, 16 insertions, 1 deletions
diff --git a/sys/kern/subr_prf.c b/sys/kern/subr_prf.c
index 0ec990f67a9..5ab131ddc8d 100644
--- a/sys/kern/subr_prf.c
+++ b/sys/kern/subr_prf.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: subr_prf.c,v 1.27 2000/02/22 19:28:04 deraadt Exp $ */
+/* $OpenBSD: subr_prf.c,v 1.28 2000/03/02 10:50:29 art Exp $ */
/* $NetBSD: subr_prf.c,v 1.45 1997/10/24 18:14:25 chuck Exp $ */
/*-
@@ -109,9 +109,24 @@ extern int log_open; /* subr_log: is /dev/klog open? */
const char *panicstr; /* arg to first call to panic (used as a flag
to indicate that panic has already been called). */
#ifdef DDB
+/*
+ * Enter ddb on panic.
+ */
int db_panic = 1;
+
+/*
+ * db_console controls if we can be able to enter ddb by a special key
+ * combination (machine dependent).
+ * If DDB_SAFE_CONSOLE is defined in the kernel configuration it allows
+ * to break into console during boot. It's _really_ useful when debugging
+ * some things in the kernel that can cause init(8) to crash.
+ */
+#ifdef DDB_SAFE_CONSOLE
+int db_console = 1;
+#else
int db_console = 0;
#endif
+#endif
/*
* v_putc: routine to putc on virtual console