]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
tty: sysfs: Add nbcon support for 'active'
authorJohn Ogness <john.ogness@linutronix.de>
Wed, 4 Sep 2024 12:05:33 +0000 (14:11 +0206)
committerPetr Mladek <pmladek@suse.com>
Wed, 4 Sep 2024 13:56:33 +0000 (15:56 +0200)
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>
drivers/tty/tty_io.c

index 407b0d87b7c10890da30bdd9f9c60605b85829b6..9140825e810f807df905bc9e2778f49961831706 100644 (file)
@@ -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;