diff options
author | marcel <marcel@FreeBSD.org> | 2011-10-16 14:16:46 +0000 |
---|---|---|
committer | marcel <marcel@FreeBSD.org> | 2011-10-16 14:16:46 +0000 |
commit | 494f14b9330151d98df404a05bd9f313ee56af30 (patch) | |
tree | 47610aebec6730134faf37a71010354ca34b5a1e /sys/kern | |
parent | 4718565769d4ef7d3aecebae9fe844f4203e09e1 (diff) | |
download | FreeBSD-src-494f14b9330151d98df404a05bd9f313ee56af30.zip FreeBSD-src-494f14b9330151d98df404a05bd9f313ee56af30.tar.gz |
Fix double vision syndrome (read: double output) when in the
debugger without a panic.
Diffstat (limited to 'sys/kern')
-rw-r--r-- | sys/kern/subr_prf.c | 20 |
1 files changed, 7 insertions, 13 deletions
diff --git a/sys/kern/subr_prf.c b/sys/kern/subr_prf.c index 48f2dd9..d8e8e05 100644 --- a/sys/kern/subr_prf.c +++ b/sys/kern/subr_prf.c @@ -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); - - if (flags & TOCONS) { - putbuf(c, ap); - putbuf_done = 1; - } - } - if ((flags & TOLOG) && (putbuf_done == 0)) { - if (c != '\0') - putbuf(c, ap); + return; } + + if ((flags & TOTTY) && tp != NULL && panicstr == NULL) + tty_putchar(tp, c); + + if ((flags & (TOCONS | TOLOG)) && c != '\0') + putbuf(c, ap); } /* |