efi_loader: console size of vidconsole
authorHeinrich Schuchardt <xypron.glpk@gmx.de>
Sun, 28 Feb 2021 17:17:28 +0000 (18:17 +0100)
committerHeinrich Schuchardt <xypron.glpk@gmx.de>
Sun, 7 Mar 2021 16:37:12 +0000 (17:37 +0100)
If stdout is 'vidconsole', we correctly set the console size.
If stdout is 'vidconsole,serial', the video console is ignored.

We should always evaluate the size of vidconsole if it is the primary
console.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
lib/efi_loader/efi_console.c

index edcfce7..c400355 100644 (file)
@@ -311,7 +311,7 @@ static void query_console_size(void)
        const char *stdout_name = env_get("stdout");
        int rows = 25, cols = 80;
 
-       if (stdout_name && !strcmp(stdout_name, "vidconsole") &&
+       if (stdout_name && !strncmp(stdout_name, "vidconsole", 10) &&
            IS_ENABLED(CONFIG_DM_VIDEO)) {
                struct stdio_dev *stdout_dev =
                        stdio_get_by_name("vidconsole");