diff options
author | attilio <attilio@FreeBSD.org> | 2011-10-22 22:56:20 +0000 |
---|---|---|
committer | attilio <attilio@FreeBSD.org> | 2011-10-22 22:56:20 +0000 |
commit | 4be1d1f7d25274261562ad10fb8197d48da0d113 (patch) | |
tree | a5939a4eeef7c173fb98194a6a23499c9b5a561d /sys/kern/subr_prf.c | |
parent | 62842622e5f4dd7e394cb2530b955c9818aaeec0 (diff) | |
parent | d5b30f0715769670b0cb9e859e79e85cc990f441 (diff) | |
download | FreeBSD-src-4be1d1f7d25274261562ad10fb8197d48da0d113.zip FreeBSD-src-4be1d1f7d25274261562ad10fb8197d48da0d113.tar.gz |
MFC
Diffstat (limited to 'sys/kern/subr_prf.c')
-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); } /* |