Fix double vision syndrome (read: double output) when in the

debugger without a panic.
This commit is contained in:
Marcel Moolenaar 2011-10-16 14:16:46 +00:00
parent ead616352b
commit 80f1c58b0a
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=226435

View File

@ -467,25 +467,19 @@ putchar(int c, void *arg)
struct putchar_arg *ap = (struct putchar_arg*) arg;
struct tty *tp = ap->tty;
int flags = ap->flags;
int putbuf_done = 0;
/* Don't use the tty code after a panic or while in ddb. */
if (kdb_active) {
if (c != '\0')
cnputc(c);
} else {
if ((panicstr == NULL) && (flags & TOTTY) && (tp != NULL))
tty_putchar(tp, c);
return;
}
if (flags & TOCONS) {
putbuf(c, ap);
putbuf_done = 1;
}
}
if ((flags & TOLOG) && (putbuf_done == 0)) {
if (c != '\0')
putbuf(c, ap);
}
if ((flags & TOTTY) && tp != NULL && panicstr == NULL)
tty_putchar(tp, c);
if ((flags & (TOCONS | TOLOG)) && c != '\0')
putbuf(c, ap);
}
/*