summaryrefslogtreecommitdiff
path: root/cmd/efidebug.c
diff options
context:
space:
mode:
authorHeinrich Schuchardt <[email protected]>2026-04-21 00:03:21 +0200
committerHeinrich Schuchardt <[email protected]>2026-05-01 10:30:03 +0200
commit82539af483175e076f3727b51e23dff020eeec41 (patch)
tree7ef2a3ddb2768fdee629ebf367a621de948e95dc /cmd/efidebug.c
parent257f9f52738641f8981b3ccb17d56567d145a084 (diff)
efi_loader: centralize messaging for efi_init_obj_list
If efi_init_obj_list() fails we cannot use the UEFI sub-system. * Instead of having messages for this everywhere write an error message in efi_init_obj_list(). * Always use (ret != EFI_SUCCESS) when checking the return value of efi_init_obj_list(). * Remove the return code from the error message as it does not help users to understand which initialization went wrong. Signed-off-by: Heinrich Schuchardt <[email protected]>
Diffstat (limited to 'cmd/efidebug.c')
-rw-r--r--cmd/efidebug.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/cmd/efidebug.c b/cmd/efidebug.c
index 7b733119c82..a6faa36b500 100644
--- a/cmd/efidebug.c
+++ b/cmd/efidebug.c
@@ -1669,11 +1669,8 @@ static int do_efidebug(struct cmd_tbl *cmdtp, int flag,
/* Initialize UEFI drivers */
r = efi_init_obj_list();
- if (r != EFI_SUCCESS) {
- printf("Error: Cannot initialize UEFI sub-system, r = %lu\n",
- r & ~EFI_ERROR_MASK);
+ if (r != EFI_SUCCESS)
return CMD_RET_FAILURE;
- }
cp = find_cmd_tbl(argv[0], cmd_efidebug_sub,
ARRAY_SIZE(cmd_efidebug_sub));