diff options
author | Heinrich Schuchardt <xypron.glpk@gmx.de> | 2022-06-11 05:22:07 +0000 |
---|---|---|
committer | Heinrich Schuchardt <xypron.glpk@gmx.de> | 2022-06-12 09:17:54 +0200 |
commit | 178667b34bf0aa5312727eba6612b3500adad4a3 (patch) | |
tree | a0a09d4ee6926760129df6ab4e82fd2a934c71eb /lib | |
parent | 3a0654ecd0d6a39406e6fe91f7a40ce589594ae9 (diff) | |
download | u-boot-178667b34bf0aa5312727eba6612b3500adad4a3.zip u-boot-178667b34bf0aa5312727eba6612b3500adad4a3.tar.gz u-boot-178667b34bf0aa5312727eba6612b3500adad4a3.tar.bz2 |
efi_loader: allow booting from short dev only DP
Allow booting from a short form device-path without file path, e.g.
/HD(1,GPT,5ef79931-a1aa-4c70-9d67-611e8f69eafd,0x800,0x1000)
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Diffstat (limited to 'lib')
-rw-r--r-- | lib/efi_loader/efi_bootmgr.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/lib/efi_loader/efi_bootmgr.c b/lib/efi_loader/efi_bootmgr.c index 93f6590..9b65f34 100644 --- a/lib/efi_loader/efi_bootmgr.c +++ b/lib/efi_loader/efi_bootmgr.c @@ -44,7 +44,7 @@ static const struct efi_runtime_services *rs; static struct efi_device_path *expand_media_path(struct efi_device_path *device_path) { - struct efi_device_path *dp, *full_path; + struct efi_device_path *dp, *rem, *full_path; efi_handle_t handle; efi_status_t ret; @@ -57,11 +57,10 @@ struct efi_device_path *expand_media_path(struct efi_device_path *device_path) * booting from removable media. */ dp = device_path; - ret = EFI_CALL(efi_locate_device_path( - &efi_simple_file_system_protocol_guid, - &dp, &handle)); + handle = efi_dp_find_obj(dp, &efi_simple_file_system_protocol_guid, + &rem); if (ret == EFI_SUCCESS) { - if (dp->type == DEVICE_PATH_TYPE_END) { + if (rem->type == DEVICE_PATH_TYPE_END) { dp = efi_dp_from_file(NULL, 0, "/EFI/BOOT/" BOOTEFI_NAME); full_path = efi_dp_append(device_path, dp); |