All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ilias Apalodimas <ilias.apalodimas@linaro.org>
To: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
Cc: u-boot@lists.denx.de
Subject: Re: [PATCH 1/1] efi_loader: avoid using HandleProtocol in initrddump.efi
Date: Tue, 4 Apr 2023 10:35:41 +0300	[thread overview]
Message-ID: <ZCvTTRRYBUvdus1h@hera> (raw)
In-Reply-To: <20230404052353.25850-1-heinrich.schuchardt@canonical.com>

On Tue, Apr 04, 2023 at 07:23:53AM +0200, Heinrich Schuchardt wrote:
> HandleProtocol() is deprecated and leaves an OpenedProtocolInformation
> behind. Use OpenProtocol(GET_PROTOCOL) instead.
>
> Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@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
>
Reviewed-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>


      reply	other threads:[~2023-04-04  7:36 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-04-04  5:23 [PATCH 1/1] efi_loader: avoid using HandleProtocol in initrddump.efi Heinrich Schuchardt
2023-04-04  7:35 ` Ilias Apalodimas [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=ZCvTTRRYBUvdus1h@hera \
    --to=ilias.apalodimas@linaro.org \
    --cc=heinrich.schuchardt@canonical.com \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.