diff mbox series

[v8,1/9] efi_loader: expose END device path node

Message ID 20220619045607.1669-2-masahisa.kojima@linaro.org
State Accepted, archived
Commit 9897350c52196736cce1a601b172fb5ea14a75c1
Delegated to: Heinrich Schuchardt
Headers show
Series enable menu-driven UEFI variable maintenance | expand

Commit Message

Masahisa Kojima June 19, 2022, 4:55 a.m. UTC
This commit exposes the END device path node.

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
---
No change in v8

Newly created in v7

 include/efi_loader.h             | 3 +++
 lib/efi_loader/efi_device_path.c | 2 +-
 2 files changed, 4 insertions(+), 1 deletion(-)

Comments

Heinrich Schuchardt July 10, 2022, 9:10 a.m. UTC | #1
On 6/19/22 06:55, Masahisa Kojima wrote:
> This commit exposes the END device path node.
>
> Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>

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

> ---
> No change in v8
>
> Newly created in v7
>
>   include/efi_loader.h             | 3 +++
>   lib/efi_loader/efi_device_path.c | 2 +-
>   2 files changed, 4 insertions(+), 1 deletion(-)
>
> diff --git a/include/efi_loader.h b/include/efi_loader.h
> index f6651e2c60..c6df29993c 100644
> --- a/include/efi_loader.h
> +++ b/include/efi_loader.h
> @@ -798,6 +798,9 @@ ssize_t efi_dp_check_length(const struct efi_device_path *dp,
>   	(((_dp)->type == DEVICE_PATH_TYPE_##_type) && \
>   	 ((_dp)->sub_type == DEVICE_PATH_SUB_TYPE_##_subtype))
>
> +/* template END node: */
> +extern const struct efi_device_path END;
> +
>   /* Indicate supported runtime services */
>   efi_status_t efi_init_runtime_supported(void);
>
> diff --git a/lib/efi_loader/efi_device_path.c b/lib/efi_loader/efi_device_path.c
> index 50a988c561..4798cec622 100644
> --- a/lib/efi_loader/efi_device_path.c
> +++ b/lib/efi_loader/efi_device_path.c
> @@ -30,7 +30,7 @@ const efi_guid_t efi_guid_virtio_dev = U_BOOT_VIRTIO_DEV_GUID;
>   #endif
>
>   /* template END node: */
> -static const struct efi_device_path END = {
> +const struct efi_device_path END = {
>   	.type     = DEVICE_PATH_TYPE_END,
>   	.sub_type = DEVICE_PATH_SUB_TYPE_END,
>   	.length   = sizeof(END),
Ilias Apalodimas July 11, 2022, 11:32 a.m. UTC | #2
On Sun, 10 Jul 2022 at 12:10, Heinrich Schuchardt <xypron.glpk@gmx.de> wrote:
>
> On 6/19/22 06:55, Masahisa Kojima wrote:
> > This commit exposes the END device path node.
> >
> > Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
>
> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
>
> > ---
> > No change in v8
> >
> > Newly created in v7
> >
> >   include/efi_loader.h             | 3 +++
> >   lib/efi_loader/efi_device_path.c | 2 +-
> >   2 files changed, 4 insertions(+), 1 deletion(-)
> >
> > diff --git a/include/efi_loader.h b/include/efi_loader.h
> > index f6651e2c60..c6df29993c 100644
> > --- a/include/efi_loader.h
> > +++ b/include/efi_loader.h
> > @@ -798,6 +798,9 @@ ssize_t efi_dp_check_length(const struct efi_device_path *dp,
> >       (((_dp)->type == DEVICE_PATH_TYPE_##_type) && \
> >        ((_dp)->sub_type == DEVICE_PATH_SUB_TYPE_##_subtype))
> >
> > +/* template END node: */
> > +extern const struct efi_device_path END;
> > +
> >   /* Indicate supported runtime services */
> >   efi_status_t efi_init_runtime_supported(void);
> >
> > diff --git a/lib/efi_loader/efi_device_path.c b/lib/efi_loader/efi_device_path.c
> > index 50a988c561..4798cec622 100644
> > --- a/lib/efi_loader/efi_device_path.c
> > +++ b/lib/efi_loader/efi_device_path.c
> > @@ -30,7 +30,7 @@ const efi_guid_t efi_guid_virtio_dev = U_BOOT_VIRTIO_DEV_GUID;
> >   #endif
> >
> >   /* template END node: */
> > -static const struct efi_device_path END = {
> > +const struct efi_device_path END = {
> >       .type     = DEVICE_PATH_TYPE_END,
> >       .sub_type = DEVICE_PATH_SUB_TYPE_END,
> >       .length   = sizeof(END),
>

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 f6651e2c60..c6df29993c 100644
--- a/include/efi_loader.h
+++ b/include/efi_loader.h
@@ -798,6 +798,9 @@  ssize_t efi_dp_check_length(const struct efi_device_path *dp,
 	(((_dp)->type == DEVICE_PATH_TYPE_##_type) && \
 	 ((_dp)->sub_type == DEVICE_PATH_SUB_TYPE_##_subtype))
 
+/* template END node: */
+extern const struct efi_device_path END;
+
 /* Indicate supported runtime services */
 efi_status_t efi_init_runtime_supported(void);
 
diff --git a/lib/efi_loader/efi_device_path.c b/lib/efi_loader/efi_device_path.c
index 50a988c561..4798cec622 100644
--- a/lib/efi_loader/efi_device_path.c
+++ b/lib/efi_loader/efi_device_path.c
@@ -30,7 +30,7 @@  const efi_guid_t efi_guid_virtio_dev = U_BOOT_VIRTIO_DEV_GUID;
 #endif
 
 /* template END node: */
-static const struct efi_device_path END = {
+const struct efi_device_path END = {
 	.type     = DEVICE_PATH_TYPE_END,
 	.sub_type = DEVICE_PATH_SUB_TYPE_END,
 	.length   = sizeof(END),