summaryrefslogtreecommitdiff
path: root/drivers/tty
diff options
context:
space:
mode:
authorJohn Ogness <john.ogness@linutronix.de>2024-09-04 14:11:33 +0206
committerPetr Mladek <pmladek@suse.com>2024-09-04 15:56:33 +0200
commitdef84b4467771d0ea0b55e6a5d0d70eb54bdf46a (patch)
treee29b97106c60a5549fcea83b9dd9255855243575 /drivers/tty
parentc83a20662dd099dbac9ef6df44134ef446980c56 (diff)
downloadlwn-def84b4467771d0ea0b55e6a5d0d70eb54bdf46a.tar.gz
lwn-def84b4467771d0ea0b55e6a5d0d70eb54bdf46a.zip
tty: sysfs: Add nbcon support for 'active'
Allow the 'active' attribute to list nbcon consoles. Signed-off-by: John Ogness <john.ogness@linutronix.de> Reviewed-by: Petr Mladek <pmladek@suse.com> Link: https://lore.kernel.org/r/20240904120536.115780-15-john.ogness@linutronix.de Signed-off-by: Petr Mladek <pmladek@suse.com>
Diffstat (limited to 'drivers/tty')
-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;