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.
This commit is contained in:
Ian Dowse 2003-06-22 03:20:24 +00:00
parent d29bf12ff8
commit adef9265ef

View File

@ -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);