summaryrefslogtreecommitdiffstats
path: root/sys/kern
diff options
context:
space:
mode:
authoriedowse <iedowse@FreeBSD.org>2003-06-22 03:20:24 +0000
committeriedowse <iedowse@FreeBSD.org>2003-06-22 03:20:24 +0000
commit768b08c167a71febe6dfe07d6208897dff50feb7 (patch)
tree842f3aa742448a4a6cfeccece48759473fdc47c7 /sys/kern
parent65000a220ab41d3a7e96a605fef81d386eeca712 (diff)
downloadFreeBSD-src-768b08c167a71febe6dfe07d6208897dff50feb7.zip
FreeBSD-src-768b08c167a71febe6dfe07d6208897dff50feb7.tar.gz
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.
Diffstat (limited to 'sys/kern')
-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 e802e00..d851e60 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);
OpenPOWER on IntegriCloud