diff options
author | Tom Rini <trini@konsulko.com> | 2021-10-22 08:56:45 -0400 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2021-10-22 12:43:30 -0400 |
commit | f055f2e5a2038002519e5b9affbf259345f4ade9 (patch) | |
tree | 2388e5ea59e1e246d8f51b680d04861178f9608f /lib/efi_loader/efi_helper.c | |
parent | 06685f9de2c1ae37cd015848d245f8a59cbc93dc (diff) | |
parent | af484011f12e2aa37bcf4f9cbb4258dea4ef14ac (diff) |
Merge tag 'efi-2022-01-rc1' of https://source.denx.de/u-boot/custodians/u-boot-efi
Pull request for efi-2022-01-rc1
Documentation:
Use Sphinx 3.43.
Move system reset documentation to HTML
UEFI:
Fix linking EFI apps with LLVM
Fix alignment of loaded image
Correct simple network protocol test
Code cleanup
Diffstat (limited to 'lib/efi_loader/efi_helper.c')
-rw-r--r-- | lib/efi_loader/efi_helper.c | 24 |
1 files changed, 10 insertions, 14 deletions
diff --git a/lib/efi_loader/efi_helper.c b/lib/efi_loader/efi_helper.c index d03a736461..b80a6e07df 100644 --- a/lib/efi_loader/efi_helper.c +++ b/lib/efi_loader/efi_helper.c @@ -13,6 +13,11 @@ #include <efi_loader.h> #include <efi_variable.h> +#if defined(CONFIG_CMD_EFIDEBUG) || defined(CONFIG_EFI_LOAD_FILE2_INITRD) +/* GUID used by Linux to identify the LoadFile2 protocol with the initrd */ +const efi_guid_t efi_lf2_initrd_guid = EFI_INITRD_MEDIA_GUID; +#endif + /** * efi_create_current_boot_var() - Return Boot#### name were #### is replaced by * the value of BootCurrent @@ -63,10 +68,8 @@ out: */ struct efi_device_path *efi_get_dp_from_boot(const efi_guid_t guid) { - struct efi_device_path *file_path = NULL; - struct efi_device_path *tmp = NULL; struct efi_load_option lo; - void *var_value = NULL; + void *var_value; efi_uintn_t size; efi_status_t ret; u16 var_name[16]; @@ -81,18 +84,11 @@ struct efi_device_path *efi_get_dp_from_boot(const efi_guid_t guid) ret = efi_deserialize_load_option(&lo, var_value, &size); if (ret != EFI_SUCCESS) - goto out; - - tmp = efi_dp_from_lo(&lo, &size, guid); - if (!tmp) - goto out; + goto err; - /* efi_dp_dup will just return NULL if efi_dp_next is NULL */ - file_path = efi_dp_dup(efi_dp_next(tmp)); + return efi_dp_from_lo(&lo, &guid); -out: - efi_free_pool(tmp); +err: free(var_value); - - return file_path; + return NULL; } |