diff mbox series

[v2,7/8] efi_loader: export efi_load_image_from_path

Message ID 20240528144252.179247-8-heinrich.schuchardt@canonical.com
State Superseded
Delegated to: Heinrich Schuchardt
Headers show
Series efi_loader: improve device-tree loading | expand

Commit Message

Heinrich Schuchardt May 28, 2024, 2:42 p.m. UTC
We can reuse this function to load the device-tree.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
---
v2:
	Move unrelated changes to different patch.
---
 include/efi_loader.h          | 4 ++++
 lib/efi_loader/efi_boottime.c | 1 -
 2 files changed, 4 insertions(+), 1 deletion(-)

Comments

Ilias Apalodimas May 28, 2024, 3:48 p.m. UTC | #1
On Tue, 28 May 2024 at 17:43, Heinrich Schuchardt
<heinrich.schuchardt@canonical.com> wrote:
>
> We can reuse this function to load the device-tree.
>
> Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
> ---
> v2:
>         Move unrelated changes to different patch.
> ---
>  include/efi_loader.h          | 4 ++++
>  lib/efi_loader/efi_boottime.c | 1 -
>  2 files changed, 4 insertions(+), 1 deletion(-)
>
> diff --git a/include/efi_loader.h b/include/efi_loader.h
> index 1b4bc987a23..ab7bed22971 100644
> --- a/include/efi_loader.h
> +++ b/include/efi_loader.h
> @@ -664,6 +664,10 @@ efi_status_t EFIAPI efi_load_image(bool boot_policy,
>                                    void *source_buffer,
>                                    efi_uintn_t source_size,
>                                    efi_handle_t *image_handle);
> +/* Load image from path */
> +efi_status_t efi_load_image_from_path(bool boot_policy,
> +                                     struct efi_device_path *file_path,
> +                                     void **buffer, efi_uintn_t *size);
>  /* Start image */
>  efi_status_t EFIAPI efi_start_image(efi_handle_t image_handle,
>                                     efi_uintn_t *exit_data_size,
> diff --git a/lib/efi_loader/efi_boottime.c b/lib/efi_loader/efi_boottime.c
> index 630c5f52c4f..eedc5f39549 100644
> --- a/lib/efi_loader/efi_boottime.c
> +++ b/lib/efi_loader/efi_boottime.c
> @@ -1996,7 +1996,6 @@ error:
>   * @size:              size of the loaded image
>   * Return:             status code
>   */
> -static
>  efi_status_t efi_load_image_from_path(bool boot_policy,
>                                       struct efi_device_path *file_path,
>                                       void **buffer, efi_uintn_t *size)
> --
> 2.43.0
>

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 1b4bc987a23..ab7bed22971 100644
--- a/include/efi_loader.h
+++ b/include/efi_loader.h
@@ -664,6 +664,10 @@  efi_status_t EFIAPI efi_load_image(bool boot_policy,
 				   void *source_buffer,
 				   efi_uintn_t source_size,
 				   efi_handle_t *image_handle);
+/* Load image from path */
+efi_status_t efi_load_image_from_path(bool boot_policy,
+				      struct efi_device_path *file_path,
+				      void **buffer, efi_uintn_t *size);
 /* Start image */
 efi_status_t EFIAPI efi_start_image(efi_handle_t image_handle,
 				    efi_uintn_t *exit_data_size,
diff --git a/lib/efi_loader/efi_boottime.c b/lib/efi_loader/efi_boottime.c
index 630c5f52c4f..eedc5f39549 100644
--- a/lib/efi_loader/efi_boottime.c
+++ b/lib/efi_loader/efi_boottime.c
@@ -1996,7 +1996,6 @@  error:
  * @size:		size of the loaded image
  * Return:		status code
  */
-static
 efi_status_t efi_load_image_from_path(bool boot_policy,
 				      struct efi_device_path *file_path,
 				      void **buffer, efi_uintn_t *size)