From: Heinrich Schuchardt Date: Tue, 4 Apr 2023 05:23:53 +0000 (+0200) Subject: efi_loader: avoid using HandleProtocol in initrddump.efi X-Git-Url: http://git.dujemihanovic.xyz/img/sics.gif?a=commitdiff_plain;h=199675b9d54c9be682e98b4835d22da98c0b11e3;p=u-boot.git 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 Reviewed-by: Ilias Apalodimas --- 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) {