summaryrefslogtreecommitdiffstats
path: root/sys/kern/subr_prf.c
diff options
context:
space:
mode:
authorart <art@openbsd.org>2000-03-02 10:50:28 +0000
committerart <art@openbsd.org>2000-03-02 10:50:28 +0000
commite3bb0e47f6550a81672d3c35a3359d4c82a4b9e4 (patch)
treeb8149ee4bc896c3ffdd7ad939d11b832736ce5e3 /sys/kern/subr_prf.c
parentMake libkafs compatible with in-tree afs. (diff)
downloadwireguard-openbsd-e3bb0e47f6550a81672d3c35a3359d4c82a4b9e4.tar.xz
wireguard-openbsd-e3bb0e47f6550a81672d3c35a3359d4c82a4b9e4.zip
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