[PATCH 3/4] efi: Correct display of table GUIDs

Heinrich Schuchardt xypron.glpk at gmx.de
Sun Nov 12 17:53:19 CET 2023


On 11/12/23 16:58, Simon Glass wrote:
> The printf() %pU option decodes GUIDs so it is not necessary to do this
> first. Drop the incorrect code.
>
> Signed-off-by: Simon Glass <sjg at chromium.org>
> ---
>
>   cmd/efi_common.c | 4 +---
>   1 file changed, 1 insertion(+), 3 deletions(-)
>
> diff --git a/cmd/efi_common.c b/cmd/efi_common.c
> index f4056096cd3f..1aa2351fcdfd 100644
> --- a/cmd/efi_common.c
> +++ b/cmd/efi_common.c
> @@ -17,10 +17,8 @@ void efi_show_tables(struct efi_system_table *systab)
>
>   	for (i = 0; i < systab->nr_tables; i++) {
>   		struct efi_configuration_table *tab = &systab->tables[i];
> -		char guid_str[37];
>
> -		uuid_bin_to_str(tab->guid.b, guid_str, 1);
> -		printf("%p  %pUl  %s\n", tab->table, guid_str,
> +		printf("%p  %pUl  %s\n", tab->table, tab->guid.b,
>   		       uuid_guid_get_str(tab->guid.b) ?: "(unknown)");

Please, observe, that we have printf("%pUs", &guid) for printing the
text representation of a GUID. If the text representation is unknown, it
will print the numeric representation.

Best regards

Heinrich

>   	}
>   }



More information about the U-Boot mailing list