diff mbox series

[v2,2/3] efi: Correct display of table GUIDs

Message ID 20231112205516.183410-3-sjg@chromium.org
State Accepted, archived
Commit 8c06b27eec8c3e5c7316a0525b596f26e001b0f3
Delegated to: Heinrich Schuchardt
Headers show
Series efi: Minor improvements for the EFI app | expand

Commit Message

Simon Glass Nov. 12, 2023, 8:55 p.m. UTC
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@chromium.org>
---

(no changes since v1)

 cmd/efi_common.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

Comments

Heinrich Schuchardt Nov. 21, 2023, 12:12 p.m. UTC | #1
On 11/12/23 21:55, 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@chromium.org>

Reviewed-by: Heinrich Schuchardt <xyprn.glpk@gmx.de>

> ---
>
> (no changes since v1)
>
>   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)");
>   	}
>   }
Ilias Apalodimas Nov. 21, 2023, 8:30 p.m. UTC | #2
On Sun, 12 Nov 2023 at 22:55, Simon Glass <sjg@chromium.org> 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@chromium.org>
> ---
>
> (no changes since v1)
>
>  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)");
>         }
>  }
> --
> 2.42.0.869.gea05f2083d-goog
>

Reviewed-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
diff mbox series

Patch

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)");
 	}
 }