From 72fa9cd59edcf99cb32c05604d2a904018acd30a Mon Sep 17 00:00:00 2001 From: Heinrich Schuchardt Date: Sat, 11 Jun 2022 05:22:08 +0000 Subject: efi_loader: create boot options without file path Allow the efidebug command to create boot options without file path, e.g. efidebug boot add -b 0001 'short dev only' host 0:1 '' efidebug boot add -B 0002 'long dev only' host 0:1 '' Signed-off-by: Heinrich Schuchardt --- lib/efi_loader/efi_bootmgr.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'lib/efi_loader/efi_bootmgr.c') diff --git a/lib/efi_loader/efi_bootmgr.c b/lib/efi_loader/efi_bootmgr.c index 9b65f34035..234073ecb7 100644 --- a/lib/efi_loader/efi_bootmgr.c +++ b/lib/efi_loader/efi_bootmgr.c @@ -46,7 +46,6 @@ struct efi_device_path *expand_media_path(struct efi_device_path *device_path) { struct efi_device_path *dp, *rem, *full_path; efi_handle_t handle; - efi_status_t ret; if (!device_path) return NULL; @@ -59,7 +58,7 @@ struct efi_device_path *expand_media_path(struct efi_device_path *device_path) dp = device_path; handle = efi_dp_find_obj(dp, &efi_simple_file_system_protocol_guid, &rem); - if (ret == EFI_SUCCESS) { + if (handle) { if (rem->type == DEVICE_PATH_TYPE_END) { dp = efi_dp_from_file(NULL, 0, "/EFI/BOOT/" BOOTEFI_NAME); -- cgit v1.2.3