[PATCH 1/4] EFI: console: query_vidconsole: multiplex adaptation

Heinrich Schuchardt xypron.glpk at gmx.de
Thu Aug 5 13:55:20 CEST 2021


On 8/4/21 12:22 PM, Artem Lapkin wrote:
> 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 <art at khadas.com>
> ---
>   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"))

If stdout == "serial,vidconsole", serial is the primary output and we
want to determine the size of the console window from serial and not
from vidconsole.

So this change seems wrong.

Best regards

Heinrich

>   		return -ENODEV;
>   	stdout_dev = stdio_get_by_name("vidconsole");
>   	if (!stdout_dev)
>



More information about the U-Boot mailing list