From: John Ogness Date: Wed, 4 Sep 2024 12:05:33 +0000 (+0206) Subject: tty: sysfs: Add nbcon support for 'active' X-Git-Tag: v6.12-rc1~192^2~3 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=def84b4467771d0ea0b55e6a5d0d70eb54bdf46a;p=thirdparty%2Fkernel%2Flinux.git tty: sysfs: Add nbcon support for 'active' Allow the 'active' attribute to list nbcon consoles. Signed-off-by: John Ogness Reviewed-by: Petr Mladek Link: https://lore.kernel.org/r/20240904120536.115780-15-john.ogness@linutronix.de Signed-off-by: Petr Mladek --- diff --git a/drivers/tty/tty_io.c b/drivers/tty/tty_io.c index 407b0d87b7c10..9140825e810f8 100644 --- a/drivers/tty/tty_io.c +++ b/drivers/tty/tty_io.c @@ -3567,7 +3567,7 @@ static ssize_t show_cons_active(struct device *dev, for_each_console(c) { if (!c->device) continue; - if (!c->write) + if (!(c->flags & CON_NBCON) && !c->write) continue; if ((c->flags & CON_ENABLED) == 0) continue;