Re: [PATCH v7 1/7] printk: Save console options for add_preferred_console_match()

Tony Lindgren
2024-05-31T06:54:56Z

On Fri, May 24, 2024 at 06:06:21PM +0200, Petr Mladek wrote:
> A solution might be to store "devname" separately in
> struct console_cmdline and allow empty "name". We could
> implement then a function similar to
> add_preferred_console_match() which would try to match
> "devname" and set/update "name", "index" value when matched.

This sounds nice, the empty name can be used to defer consoles that
are not known early. And on console_setup() we only set the devname
for such cases.

To me it seems we additionally still need to save the kernel command
line position of the console too in struct kernel_cmdline so we can
set the preferred_console for the deferred cases.

Regards,

Tony