printk: Ensure that "console enabled" messages are printed on the console
authorRobin Getz <rgetz@blackfin.uclinux.org>
Thu, 9 Jul 2009 17:08:37 +0000 (13:08 -0400)
committerIngo Molnar <mingo@elte.hu>
Fri, 10 Jul 2009 10:24:47 +0000 (12:24 +0200)
commit8259cf4342029aad37660e524178c8858f48b0ab
treec0f7f931c6daca79a941dcab142cf49059a8722f
parent4d09161196c9a836eacea4b36e2f217bc34894cf
printk: Ensure that "console enabled" messages are printed on the console

Today, when a console is registered without CON_PRINTBUFFER,
end users never see the announcement of it being added, and
never know if they missed something, if the console is really
at the start or not, and just leads to general confusion.

This re-orders existing code, to make sure the console is
added, before the "console [%s%d] enabled" is printed out -
ensuring that this message is _always_ seen.

This has the desired/intended side effect of making sure that
"console enabled:" messages are printed on the bootconsole, and
the real console. This does cause the same line is printed
twice if the bootconsole and real console are the same device,
but if they are on different devices, the message is printed to
both consoles.

Signed-off-by : Robin Getz <rgetz@blackfin.uclinux.org>
Cc: "Andrew Morton" <akpm@linux-foundation.org>
Cc: "Linus Torvalds" <torvalds@linux-foundation.org>
LKML-Reference: <200907091308.37370.rgetz@blackfin.uclinux.org>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
kernel/printk.c