aboutsummaryrefslogtreecommitdiff
path: root/sys/kern/subr_prf.c
diff options
context:
space:
mode:
authorIan Dowse <iedowse@FreeBSD.org>2003-06-22 03:20:24 +0000
committerIan Dowse <iedowse@FreeBSD.org>2003-06-22 03:20:24 +0000
commitadef9265ef3b78cea9edc73bd91a8f47a0e346eb (patch)
tree842f3aa742448a4a6cfeccece48759473fdc47c7 /sys/kern/subr_prf.c
parentd29bf12ff8af22103581957d676732a09eec7e19 (diff)
downloadsrc-adef9265ef3b78cea9edc73bd91a8f47a0e346eb.tar.gz
src-adef9265ef3b78cea9edc73bd91a8f47a0e346eb.zip
When DDB is active, always send printf() output directly to the
console, even if there is a TIOCCONS console tty. We were already doing this after a panic, but it's also useful when entering DDB for some other reason too.
Notes
Notes: svn path=/head/; revision=116664
Diffstat (limited to 'sys/kern/subr_prf.c')
-rw-r--r--sys/kern/subr_prf.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/sys/kern/subr_prf.c b/sys/kern/subr_prf.c
index e802e004731e..d851e609aeea 100644
--- a/sys/kern/subr_prf.c
+++ b/sys/kern/subr_prf.c
@@ -336,9 +336,13 @@ putchar(int c, void *arg)
int consdirect, flags = ap->flags;
consdirect = ((flags & TOCONS) && constty == NULL);
- /* Don't use the tty code after a panic. */
+ /* Don't use the tty code after a panic or while in ddb. */
if (panicstr)
consdirect = 1;
+#ifdef DDB
+ if (db_active)
+ consdirect = 1;
+#endif
if (consdirect) {
if (c != '\0')
cnputc(c);