On (21/01/06 14:10), Petr Mladek wrote:
But I am not completely sure that it is the right solution.
Wow, hmm, puzzled. Why does it help?
I have been as well. But it seems that I got it, see below.
Thanks!
[..]
Alternative solution is to ignore ttynull as the fallback console in register_console(). I mean the following:
I personally would prefer a very explicit fix (IOW, the patch below), rather than relying on some initcall trickery (which has already failed on us)
diff --git a/kernel/printk/printk.c b/kernel/printk/printk.c index ffdd0dc7ec6d..cdb77903b0af 100644 --- a/kernel/printk/printk.c +++ b/kernel/printk/printk.c @@ -2816,8 +2816,12 @@ void register_console(struct console *newcon) * See if we want to use this console driver. If we * didn't select a console we take the first one * that registers here.
*
* Ignore ttynull console. It should be used only
* when explicitly configured or as an ultimate
*/* fallback when no better console gets registered at all.
- if (!has_preferred_console) {
- if (!has_preferred_console && strcmp(newcon->name, "ttynull") != 0) { if (newcon->index < 0) newcon->index = 0; if (newcon->setup == NULL ||
So IIUC in case of ttynull fallback (console= ) we still end up setting CON_CONSDEV on nulltty console, but we do it in try_enable_new_console().
Feel free to add Acked-by: Sergey Senozhatsky sergey.senozhatsky@gmail.com
-ss