efi: Show the device name only with the EFI loader

The 'efidebug dh' command dereferences a handle to obtain the device
name.

The format of an EFI handle is not defined by the spec, so when running
in the app we cannot assume that the handle can be dereferenced. Even if
the EFI provider happens to be U-Boot it might be a different version.

So don't try display the device name with the app.

Signed-off-by: Simon Glass <sjg@chromium.org>
This commit is contained in:
Simon Glass
2025-08-16 10:46:52 -06:00
parent c029c38ad0
commit 3637e38ab8

View File

@@ -489,7 +489,7 @@ static int do_efi_show_handles(struct cmd_tbl *cmdtp, int flag,
struct efi_handler *handler;
printf("\n%p", handle);
if (handle->dev)
if (!IS_ENABLED(CONFIG_EFI_APP) && handle->dev)
printf(" (%s)", handle->dev->name);
printf("\n");
/* Print device path */