Re: [PATCH v3] printk: Remove console options before decoding the name

From: Petr Mladek

Date: Fri Oct 02 2026 - 11:12:43 EST


On Thu 2026-09-24 10:00:57, David Engraf 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>

JFYI, the patch has been comitted into printk/linux.git,
branch for-7.4.

Note that I have updated the commit message as suggested by Tony, see
https://git.kernel.org/pub/scm/linux/kernel/git/printk/linux.git/commit/?id=b80fc54890d44cd35360ca122b72224fe78061bf

Best Regards,
Petr