aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn Ogness <[email protected]>2024-09-04 14:11:33 +0206
committerPetr Mladek <[email protected]>2024-09-04 15:56:33 +0200
commitdef84b4467771d0ea0b55e6a5d0d70eb54bdf46a (patch)
treee29b97106c60a5549fcea83b9dd9255855243575
parentc83a20662dd099dbac9ef6df44134ef446980c56 (diff)
tty: sysfs: Add nbcon support for 'active'
Allow the 'active' attribute to list nbcon consoles. Signed-off-by: John Ogness <[email protected]> Reviewed-by: Petr Mladek <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Petr Mladek <[email protected]>
-rw-r--r--drivers/tty/tty_io.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/tty/tty_io.c b/drivers/tty/tty_io.c
index 407b0d87b7c1..9140825e810f 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;