Fixed detection of vidconsole from within a multiplexed stdout string. As
you know, a user can use a comma-separated list of devices to set stdin,
stdout and stderr. For example, "setenv stdout serial,vidconsole" is a
multiplexed string.

Signed-off-by: Artem Lapkin <[email protected]>
---
 lib/efi_loader/efi_console.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/efi_loader/efi_console.c b/lib/efi_loader/efi_console.c
index 3b012e1a66..2d03285f82 100644
--- a/lib/efi_loader/efi_console.c
+++ b/lib/efi_loader/efi_console.c
@@ -314,7 +314,7 @@ static int __maybe_unused query_vidconsole(int *rows, int 
*cols)
        struct udevice *dev;
        struct vidconsole_priv *priv;
 
-       if (!stdout_name || strncmp(stdout_name, "vidconsole", 10))
+       if (!stdout_name || !strstr(stdout_name, "vidconsole"))
                return -ENODEV;
        stdout_dev = stdio_get_by_name("vidconsole");
        if (!stdout_dev)
-- 
2.25.1

Reply via email to