Commit 4c70ab11 authored by Marcos Paulo de Souza's avatar Marcos Paulo de Souza Committed by Petr Mladek
Browse files

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: default avatarMarcos Paulo de Souza <mpdesouza@suse.com>
Reviewed-by: default avatarPetr Mladek <pmladek@suse.com>
Link: https://patch.msgid.link/20251121-printk-cleanup-part2-v2-2-57b8b78647f4@suse.com


Signed-off-by: default avatarPetr Mladek <pmladek@suse.com>
parent 822e2bb0
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -31,7 +31,7 @@ static void kmsg_dumper_stdout(struct kmsg_dumper *dumper,
		 * expected to output the crash information.
		 */
		if (strcmp(con->name, "ttynull") != 0 &&
		    (console_srcu_read_flags(con) & CON_ENABLED)) {
		    console_is_usable(con, console_srcu_read_flags(con), true)) {
			break;
		}
	}