proc: consoles: Add support for non-BKL consoles
Show 'W' if a non-BKL console implements write_thread() or write_atomic(). Add a new flag 'N' to show if it is a non-BKL console. Signed-off-by: John Ogness <john.ogness@linutronix.de> Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
This commit is contained in:
committed by
Sebastian Andrzej Siewior
parent
52f01b5cb0
commit
078e0c5cf0
+11
-3
@@ -21,12 +21,14 @@ static int show_console_dev(struct seq_file *m, void *v)
|
||||
{ CON_ENABLED, 'E' },
|
||||
{ CON_CONSDEV, 'C' },
|
||||
{ CON_BOOT, 'B' },
|
||||
{ CON_NO_BKL, 'N' },
|
||||
{ CON_PRINTBUFFER, 'p' },
|
||||
{ CON_BRL, 'b' },
|
||||
{ CON_ANYTIME, 'a' },
|
||||
};
|
||||
char flags[ARRAY_SIZE(con_flags) + 1];
|
||||
struct console *con = v;
|
||||
char con_write = '-';
|
||||
unsigned int a;
|
||||
dev_t dev = 0;
|
||||
|
||||
@@ -57,9 +59,15 @@ static int show_console_dev(struct seq_file *m, void *v)
|
||||
seq_setwidth(m, 21 - 1);
|
||||
seq_printf(m, "%s%d", con->name, con->index);
|
||||
seq_pad(m, ' ');
|
||||
seq_printf(m, "%c%c%c (%s)", con->read ? 'R' : '-',
|
||||
con->write ? 'W' : '-', con->unblank ? 'U' : '-',
|
||||
flags);
|
||||
if (con->flags & CON_NO_BKL) {
|
||||
if (con->write_thread || con->write_atomic)
|
||||
con_write = 'W';
|
||||
} else {
|
||||
if (con->write)
|
||||
con_write = 'W';
|
||||
}
|
||||
seq_printf(m, "%c%c%c (%s)", con->read ? 'R' : '-', con_write,
|
||||
con->unblank ? 'U' : '-', flags);
|
||||
if (dev)
|
||||
seq_printf(m, " %4d:%d", MAJOR(dev), MINOR(dev));
|
||||
|
||||
|
||||
Reference in New Issue
Block a user