diff mbox series

[v5,05/17] efi_loader: export efi_locate_device_handle()

Message ID 20220428080950.23509-6-masahisa.kojima@linaro.org
State New
Headers show
Series enable menu-driven boot device selection | expand

Commit Message

Masahisa Kojima April 28, 2022, 8:09 a.m. UTC
From: AKASHI Takahiro <takahiro.akashi@linaro.org>

This function will be used in the next commit where some behavior
of EFI boot manager will be expanded.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Reviewed-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
---
No changes from original version

 include/efi_loader.h          | 4 ++++
 lib/efi_loader/efi_boottime.c | 7 +++----
 2 files changed, 7 insertions(+), 4 deletions(-)

Comments

Heinrich Schuchardt May 1, 2022, 6:53 p.m. UTC | #1
On 4/28/22 10:09, Masahisa Kojima wrote:
> From: AKASHI Takahiro <takahiro.akashi@linaro.org>
>
> This function will be used in the next commit where some behavior
> of EFI boot manager will be expanded.
>
> Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
> Reviewed-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>

Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>

> ---
> No changes from original version
>
>   include/efi_loader.h          | 4 ++++
>   lib/efi_loader/efi_boottime.c | 7 +++----
>   2 files changed, 7 insertions(+), 4 deletions(-)
>
> diff --git a/include/efi_loader.h b/include/efi_loader.h
> index ba79a9afb4..effb43369d 100644
> --- a/include/efi_loader.h
> +++ b/include/efi_loader.h
> @@ -595,6 +595,10 @@ efi_status_t efi_create_handle(efi_handle_t *handle);
>   void efi_delete_handle(efi_handle_t obj);
>   /* Call this to validate a handle and find the EFI object for it */
>   struct efi_object *efi_search_obj(const efi_handle_t handle);
> +/* Locate device_path handle */
> +efi_status_t EFIAPI efi_locate_device_path(const efi_guid_t *protocol,
> +					   struct efi_device_path **device_path,
> +					   efi_handle_t *device);
>   /* Load image */
>   efi_status_t EFIAPI efi_load_image(bool boot_policy,
>   				   efi_handle_t parent_image,
> diff --git a/lib/efi_loader/efi_boottime.c b/lib/efi_loader/efi_boottime.c
> index 5bcb8253ed..4da64b5d29 100644
> --- a/lib/efi_loader/efi_boottime.c
> +++ b/lib/efi_loader/efi_boottime.c
> @@ -1799,10 +1799,9 @@ failure:
>    *
>    * Return: status code
>    */
> -static efi_status_t EFIAPI efi_locate_device_path(
> -			const efi_guid_t *protocol,
> -			struct efi_device_path **device_path,
> -			efi_handle_t *device)
> +efi_status_t EFIAPI efi_locate_device_path(const efi_guid_t *protocol,
> +					   struct efi_device_path **device_path,
> +					   efi_handle_t *device)
>   {
>   	struct efi_device_path *dp;
>   	size_t i;
Ilias Apalodimas May 4, 2022, 9:17 a.m. UTC | #2
On Sun, 1 May 2022 at 21:59, Heinrich Schuchardt <xypron.glpk@gmx.de> wrote:
>
> On 4/28/22 10:09, Masahisa Kojima wrote:
> > From: AKASHI Takahiro <takahiro.akashi@linaro.org>
> >
> > This function will be used in the next commit where some behavior
> > of EFI boot manager will be expanded.
> >
> > Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
> > Reviewed-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
>
> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
>
> > ---
> > No changes from original version
> >
> >   include/efi_loader.h          | 4 ++++
> >   lib/efi_loader/efi_boottime.c | 7 +++----
> >   2 files changed, 7 insertions(+), 4 deletions(-)
> >
> > diff --git a/include/efi_loader.h b/include/efi_loader.h
> > index ba79a9afb4..effb43369d 100644
> > --- a/include/efi_loader.h
> > +++ b/include/efi_loader.h
> > @@ -595,6 +595,10 @@ efi_status_t efi_create_handle(efi_handle_t *handle);
> >   void efi_delete_handle(efi_handle_t obj);
> >   /* Call this to validate a handle and find the EFI object for it */
> >   struct efi_object *efi_search_obj(const efi_handle_t handle);
> > +/* Locate device_path handle */
> > +efi_status_t EFIAPI efi_locate_device_path(const efi_guid_t *protocol,
> > +                                        struct efi_device_path **device_path,
> > +                                        efi_handle_t *device);
> >   /* Load image */
> >   efi_status_t EFIAPI efi_load_image(bool boot_policy,
> >                                  efi_handle_t parent_image,
> > diff --git a/lib/efi_loader/efi_boottime.c b/lib/efi_loader/efi_boottime.c
> > index 5bcb8253ed..4da64b5d29 100644
> > --- a/lib/efi_loader/efi_boottime.c
> > +++ b/lib/efi_loader/efi_boottime.c
> > @@ -1799,10 +1799,9 @@ failure:
> >    *
> >    * Return: status code
> >    */
> > -static efi_status_t EFIAPI efi_locate_device_path(
> > -                     const efi_guid_t *protocol,
> > -                     struct efi_device_path **device_path,
> > -                     efi_handle_t *device)
> > +efi_status_t EFIAPI efi_locate_device_path(const efi_guid_t *protocol,
> > +                                        struct efi_device_path **device_path,
> > +                                        efi_handle_t *device)
> >   {
> >       struct efi_device_path *dp;
> >       size_t i;
>

Reviewed-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
diff mbox series

Patch

diff --git a/include/efi_loader.h b/include/efi_loader.h
index ba79a9afb4..effb43369d 100644
--- a/include/efi_loader.h
+++ b/include/efi_loader.h
@@ -595,6 +595,10 @@  efi_status_t efi_create_handle(efi_handle_t *handle);
 void efi_delete_handle(efi_handle_t obj);
 /* Call this to validate a handle and find the EFI object for it */
 struct efi_object *efi_search_obj(const efi_handle_t handle);
+/* Locate device_path handle */
+efi_status_t EFIAPI efi_locate_device_path(const efi_guid_t *protocol,
+					   struct efi_device_path **device_path,
+					   efi_handle_t *device);
 /* Load image */
 efi_status_t EFIAPI efi_load_image(bool boot_policy,
 				   efi_handle_t parent_image,
diff --git a/lib/efi_loader/efi_boottime.c b/lib/efi_loader/efi_boottime.c
index 5bcb8253ed..4da64b5d29 100644
--- a/lib/efi_loader/efi_boottime.c
+++ b/lib/efi_loader/efi_boottime.c
@@ -1799,10 +1799,9 @@  failure:
  *
  * Return: status code
  */
-static efi_status_t EFIAPI efi_locate_device_path(
-			const efi_guid_t *protocol,
-			struct efi_device_path **device_path,
-			efi_handle_t *device)
+efi_status_t EFIAPI efi_locate_device_path(const efi_guid_t *protocol,
+					   struct efi_device_path **device_path,
+					   efi_handle_t *device)
 {
 	struct efi_device_path *dp;
 	size_t i;