* [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* Re: [PATCH 2/5] console: console handover to preferred console
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
0 siblings, 1 reply; 4+ messages in thread
From: Andrew Morton @ 2007-06-01 0:02 UTC (permalink / raw)
To: Yinghai Lu; +Cc: Andi Kleen, Linux Kernel Mailing List
On Thu, 31 May 2007 13:58:26 -0700
Yinghai Lu <Yinghai.Lu@Sun.COM> wrote:
> [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);
> }
>
> /*
What does this change do, and what is the reason for it??
^ permalink raw reply [flat|nested] 4+ messages in thread* Re: [PATCH 2/5] console: console handover to preferred console
2007-06-01 0:02 ` Andrew Morton
@ 2007-06-01 0:16 ` Yinghai Lu
0 siblings, 0 replies; 4+ messages in thread
From: Yinghai Lu @ 2007-06-01 0:16 UTC (permalink / raw)
To: Andrew Morton; +Cc: Andi Kleen, Linux Kernel Mailing List
Andrew Morton wrote:
> On Thu, 31 May 2007 13:58:26 -0700
> Yinghai Lu <Yinghai.Lu@Sun.COM> wrote:
>
>> [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);
>> }
>>
>> /*
>
> What does this change do, and what is the reason for it??
for earlyprintk=ttyS0,9600 console=tty0 console=ttyS0,9600n8
the handover will happen from earlyser0 to tty0. but what we want is to ttyS0.
later with patch4,
console=tty0 console=uart8250,io,0x3f8,9600n8
will handover to ttyS0 instead of tty0.
Maybe can put above lines into commit log.
YH
^ permalink raw reply [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