svn commit: r226435 - head/sys/kern

Marcel Moolenaar marcel at FreeBSD.org
Sun Oct 16 14:16:46 UTC 2011


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);
 }
 
 /*


More information about the svn-src-head mailing list