summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorHeinrich Schuchardt <heinrich.schuchardt@canonical.com>2023-04-04 07:23:53 +0200
committerHeinrich Schuchardt <heinrich.schuchardt@canonical.com>2023-04-08 07:45:34 +0200
commit199675b9d54c9be682e98b4835d22da98c0b11e3 (patch)
tree8cc849efa400825b2314b81d9a1b558bc2928258 /lib
parentff6ce8da978bbcf283e34c07406085af2359f7b0 (diff)
downloadu-boot-199675b9d54c9be682e98b4835d22da98c0b11e3.tar.gz
efi_loader: avoid using HandleProtocol in initrddump.efi
HandleProtocol() is deprecated and leaves an OpenedProtocolInformation behind. Use OpenProtocol(GET_PROTOCOL) instead. Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com> Reviewed-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
Diffstat (limited to 'lib')
-rw-r--r--lib/efi_loader/initrddump.c5
1 files 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) {