Message ID | 20250606-printk-cleanup-part2-v1-3-f427c743dda0@suse.com |
---|---|
State | New |
Headers | show |
Series | printk cleanup - part 2 | expand |
On Fri 2025-06-06 23:53:45, Marcos Paulo de Souza wrote: > All consoles found on for_each_console are registered, meaning that all of > them are CON_ENABLED. The code tries to find an active console, so check if the > console is not suspended instead. This patch "fixes" a behavior change caused by the 1st patch. Please, merge it into the 1st patch to avoid regressions when bisecting. Best Regards, Petr
diff --git a/drivers/tty/tty_io.c b/drivers/tty/tty_io.c index ca9b7d7bad2b6807b29d3768bb655528ea162816..42f81573d8dfc668b38cd0b1c14962a7370cd954 100644 --- a/drivers/tty/tty_io.c +++ b/drivers/tty/tty_io.c @@ -3570,7 +3570,7 @@ static ssize_t show_cons_active(struct device *dev, continue; if (!(c->flags & CON_NBCON) && !c->write) continue; - if ((c->flags & CON_ENABLED) == 0) + if (c->flags & CON_SUSPENDED) continue; cs[i++] = c; if (i >= ARRAY_SIZE(cs))
All consoles found on for_each_console are registered, meaning that all of them are CON_ENABLED. The code tries to find an active console, so check if the console is not suspended instead. Signed-off-by: Marcos Paulo de Souza <mpdesouza@suse.com> --- drivers/tty/tty_io.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)