Author: marcel
Date: Sun Oct 16 14:16:46 2011
New Revision: 226435
URL: http://svn.freebsd.org/changeset/base/226435

Log:
  Fix double vision syndrome (read: double output) when in the
  debugger without a panic.

Modified:
  head/sys/kern/subr_prf.c

Modified: head/sys/kern/subr_prf.c
==============================================================================
--- head/sys/kern/subr_prf.c    Sun Oct 16 14:11:05 2011        (r226434)
+++ head/sys/kern/subr_prf.c    Sun Oct 16 14:16:46 2011        (r226435)
@@ -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);
 }
 
 /*
_______________________________________________
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"

Reply via email to