Skip to content

Commit 4c70ab1

Browse files
marcospspmladek
authored andcommitted
arch: um: kmsg_dump: Use console_is_usable
All consoles found on for_each_console are registered, meaning that all of them have the CON_ENABLED flag set. Since NBCON was introduced it's important to check if a given console also implements the NBCON callbacks. The function console_is_usable does exactly that. Signed-off-by: Marcos Paulo de Souza <mpdesouza@suse.com> Reviewed-by: Petr Mladek <pmladek@suse.com> Link: https://patch.msgid.link/20251121-printk-cleanup-part2-v2-2-57b8b78647f4@suse.com Signed-off-by: Petr Mladek <pmladek@suse.com>
1 parent 822e2bb commit 4c70ab1

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

arch/um/kernel/kmsg_dump.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ static void kmsg_dumper_stdout(struct kmsg_dumper *dumper,
3131
* expected to output the crash information.
3232
*/
3333
if (strcmp(con->name, "ttynull") != 0 &&
34-
(console_srcu_read_flags(con) & CON_ENABLED)) {
34+
console_is_usable(con, console_srcu_read_flags(con), true)) {
3535
break;
3636
}
3737
}

0 commit comments

Comments
 (0)