[PATCH 1/1] efi_loader: avoid using HandleProtocol in initrddump.efi
Heinrich Schuchardt
heinrich.schuchardt at canonical.com
Tue Apr 4 07:23:53 CEST 2023
HandleProtocol() is deprecated and leaves an OpenedProtocolInformation
behind. Use OpenProtocol(GET_PROTOCOL) instead.
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt at canonical.com>
---
lib/efi_loader/initrddump.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/lib/efi_loader/initrddump.c b/lib/efi_loader/initrddump.c
index 971a3b6236..5b470f4819 100644
--- a/lib/efi_loader/initrddump.c
+++ b/lib/efi_loader/initrddump.c
@@ -291,8 +291,9 @@ static efi_status_t get_initrd(void **initrd, efi_uintn_t *initrd_size)
error(u"Load File2 protocol not found\r\n");
return ret;
}
- ret = bs->handle_protocol(handle, &load_file2_guid,
- (void **)&load_file2_prot);
+ ret = bs->open_protocol(handle, &load_file2_guid,
+ (void **)&load_file2_prot, NULL, NULL,
+ EFI_OPEN_PROTOCOL_GET_PROTOCOL);
ret = load_file2_prot->load_file(load_file2_prot, dp, false,
initrd_size, NULL);
if (ret != EFI_BUFFER_TOO_SMALL) {
--
2.39.2
More information about the U-Boot
mailing list