Re: [PATCH v6 1/6] printk: Save console options for add_preferred_console_match()

From: Tony Lindgren
Date: Wed Feb 14 2024 - 03:52:25 EST


* Tony Lindgren <tony@xxxxxxxxxxx> [240214 10:49]:
> * Andy Shevchenko <andriy.shevchenko@xxxxxxxxxxxxxxx> [240213 16:42]:
> > strscpy(con->name, str, namelen);
> > strscpy(con->opt, opt, optlen); // not sure if emptying opt is okay
>
> The strings above now get terminated too sort with the + 1 removed,
> I suggest we use what we already do for brl_opt:
>
> strscpy(con->name, str, CONSOLE_NAME_MAX);
> strscpy(con->opt, opt, CONSOLE_OPT_MAX);
>

Heh but that won't work for str and CONSOLE_NAME_MAX..

Tony