Re: [PATCH v3] printk: Remove console options before decoding the name
From: John Ogness
Date: Tue Sep 29 2026 - 11:31:29 EST
On 2026-09-24, David Engraf <david.engraf@xxxxxxxxx> wrote:
> This fixes a regression when a console option includes ':'. Commit
> 7640f1a44eba ("printk: Add match_devname_and_update_preferred_console()")
> introduced console=DEVNAME:0.0 hardware style addressing by looking for a
> colon. If the colon is part of an option the name is handled as devname
> instead of ttyname.
>
> Fix by handling the options first which will add a NULL terminator to the
> string and refactor idx handling to clean up the code (thanks to Petr
> Mladek).
>
> Signed-off-by: David Engraf <david.engraf@xxxxxxxxx>
Reviewed-by: John Ogness <john.ogness@xxxxxxxxxxxxx>