public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH 2/5] console: console handover to preferred console
@ 2007-05-31 20:58 Yinghai Lu
  2007-06-01  0:02 ` Andrew Morton
  0 siblings, 1 reply; 4+ messages in thread
From: Yinghai Lu @ 2007-05-31 20:58 UTC (permalink / raw)
  To: Andrew Morton, Andi Kleen; +Cc: Linux Kernel Mailing List

[PATCH 2/5] console: console handover to preferred console

Signed-off-by: Yinghai Lu <yinghai.lu@sun.com>

diff --git a/kernel/printk.c b/kernel/printk.c
index 0bbdeac..7b96cae 100644
--- a/kernel/printk.c
+++ b/kernel/printk.c
@@ -985,12 +1007,15 @@ void register_console(struct console *console)
 	if (!(console->flags & CON_ENABLED))
 		return;
 
-	if (bootconsole) {
+	if (bootconsole && (console->flags & CON_CONSDEV)) {
 		printk(KERN_INFO "console handover: boot [%s%d] -> real [%s%d]\n",
 		       bootconsole->name, bootconsole->index,
 		       console->name, console->index);
 		unregister_console(bootconsole);
 		console->flags &= ~CON_PRINTBUFFER;
+	} else {
+		printk(KERN_INFO "console [%s%d] enabled\n",
+		       console->name, console->index);
 	}
 
 	/*

^ permalink raw reply related	[flat|nested] 4+ messages in thread
* [PATCH 2/5] console: console handover to preferred console
@ 2007-05-30  1:41 Yinghai Lu
  0 siblings, 0 replies; 4+ messages in thread
From: Yinghai Lu @ 2007-05-30  1:41 UTC (permalink / raw)
  To: Andrew Morton, Andi Kleen; +Cc: Linux Kernel Mailing List

[PATCH 2/5] console: console handover to preferred console

Signed-off-by: Yinghai Lu <yinghai.lu@sun.com>

diff --git a/kernel/printk.c b/kernel/printk.c
index 0bbdeac..7b96cae 100644
--- a/kernel/printk.c
+++ b/kernel/printk.c
@@ -985,12 +1007,15 @@ void register_console(struct console *console)
 	if (!(console->flags & CON_ENABLED))
 		return;
 
-	if (bootconsole) {
+	if (bootconsole && (console->flags & CON_CONSDEV)) {
 		printk(KERN_INFO "console handover: boot [%s%d] -> real [%s%d]\n",
 		       bootconsole->name, bootconsole->index,
 		       console->name, console->index);
 		unregister_console(bootconsole);
 		console->flags &= ~CON_PRINTBUFFER;
+	} else {
+		printk(KERN_INFO "console [%s%d] enabled\n",
+		       console->name, console->index);
 	}
 
 	/*

^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2007-06-01  0:17 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-05-31 20:58 [PATCH 2/5] console: console handover to preferred console Yinghai Lu
2007-06-01  0:02 ` Andrew Morton
2007-06-01  0:16   ` Yinghai Lu
  -- strict thread matches above, loose matches on Subject: below --
2007-05-30  1:41 Yinghai Lu

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox