Message ID | 20240603232453.33992-16-john.ogness@linutronix.de |
---|---|
State | New |
Headers | show |
Series | add threaded printing + the rest | expand |
On Tue, Jun 04, 2024 at 01:30:50AM +0206, John Ogness wrote: > Allow the 'active' attribute to list nbcon consoles. > > Signed-off-by: John Ogness <john.ogness@linutronix.de> > --- > drivers/tty/tty_io.c | 9 +++++++-- > 1 file changed, 7 insertions(+), 2 deletions(-) Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
On Tue 2024-06-04 01:30:50, John Ogness wrote: > Allow the 'active' attribute to list nbcon consoles. > > Signed-off-by: John Ogness <john.ogness@linutronix.de> Reviewed-by: Petr Mladek <pmladek@suse.com> Best Regards, Petr
diff --git a/drivers/tty/tty_io.c b/drivers/tty/tty_io.c index 407b0d87b7c1..c9c914bc033c 100644 --- a/drivers/tty/tty_io.c +++ b/drivers/tty/tty_io.c @@ -3567,8 +3567,13 @@ static ssize_t show_cons_active(struct device *dev, for_each_console(c) { if (!c->device) continue; - if (!c->write) - continue; + if (c->flags & CON_NBCON) { + if (!c->write_atomic && !c->write_thread) + continue; + } else { + if (!c->write) + continue; + } if ((c->flags & CON_ENABLED) == 0) continue; cs[i++] = c;
Allow the 'active' attribute to list nbcon consoles. Signed-off-by: John Ogness <john.ogness@linutronix.de> --- drivers/tty/tty_io.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-)