Title: [7226] branches/2009R1/kernel/printk.c: Sync with what is in -tip, which makes things behave a little better...
Revision
7226
Author
rgetz
Date
2009-08-21 11:59:00 -0400 (Fri, 21 Aug 2009)

Log Message

Sync with what is in -tip, which makes things behave a little better...

Modified Paths

Diff

Modified: branches/2009R1/kernel/printk.c (7225 => 7226)


--- branches/2009R1/kernel/printk.c	2009-08-21 15:46:36 UTC (rev 7225)
+++ branches/2009R1/kernel/printk.c	2009-08-21 15:59:00 UTC (rev 7226)
@@ -1204,6 +1204,15 @@
 		return;
 
 	/*
+	 * If we have a bootconsole, and are switching to a real console,
+	 * don't print everything out again, since when the boot console, and
+	 * the real console are the same physical device, it's annoying to
+	 * see the beginning boot messages twice
+	 */
+	if (bcon && ((newcon->flags & (CON_CONSDEV | CON_BOOT)) == CON_CONSDEV))
+		newcon->flags &= ~CON_PRINTBUFFER;
+
+	/*
 	 *	Put this console in the list - keep the
 	 *	preferred driver at the head of the list.
 	 */
@@ -1244,13 +1253,11 @@
 		for_each_console(bcon)
 			if (bcon->flags & CON_BOOT)
 				unregister_console(bcon);
-		newcon->flags &= ~CON_PRINTBUFFER;
 	} else {
 		printk(KERN_INFO "%sconsole [%s%d] enabled\n",
 			(newcon->flags & CON_BOOT) ? "boot" : "" ,
 			newcon->name, newcon->index);
 	}
-
 }
 EXPORT_SYMBOL(register_console);
 
_______________________________________________
Linux-kernel-commits mailing list
[email protected]
https://blackfin.uclinux.org/mailman/listinfo/linux-kernel-commits

Reply via email to