diff mbox series

[v5,01/11] efi: define struct efi_guid

Message ID 20240719-b4-dynamic-uuid-v5-1-8a83de3fe3dc@linaro.org
State Superseded
Headers show
Series efi: CapsuleUpdate: support for dynamic UUIDs | expand

Commit Message

Caleb Connolly July 19, 2024, 12:43 p.m. UTC
This let's us forward declare efi_guid_t in the UUID code without
pulling in efi.h

Signed-off-by: Caleb Connolly <caleb.connolly@linaro.org>
---
 include/efi.h      | 2 +-
 tools/eficapsule.h | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

Comments

Ilias Apalodimas July 24, 2024, 9:29 a.m. UTC | #1
On Fri, 19 Jul 2024 at 15:43, Caleb Connolly <caleb.connolly@linaro.org> wrote:
>
> This let's us forward declare efi_guid_t in the UUID code without
> pulling in efi.h
>
> Signed-off-by: Caleb Connolly <caleb.connolly@linaro.org>
> ---
>  include/efi.h      | 2 +-
>  tools/eficapsule.h | 2 +-
>  2 files changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/include/efi.h b/include/efi.h
> index c3c4b93f860a..b92c961a2afd 100644
> --- a/include/efi.h
> +++ b/include/efi.h
> @@ -73,9 +73,9 @@ struct efi_device_path {
>   * EDK2 reference implementation both define EFI_GUID as
>   * struct { u32 a; u16; b; u16 c; u8 d[8]; }; which is 4-byte
>   * aligned.
>   */
> -typedef struct {
> +typedef struct efi_guid {
>         u8 b[16];
>  } efi_guid_t __attribute__((aligned(4)));
>
>  #define EFI_BITS_PER_LONG      (sizeof(long) * 8)
> diff --git a/tools/eficapsule.h b/tools/eficapsule.h
> index 6efd07d2eb6b..97d077536d5b 100644
> --- a/tools/eficapsule.h
> +++ b/tools/eficapsule.h
> @@ -23,9 +23,9 @@
>  #endif
>
>  #define ARRAY_SIZE(x)          (sizeof(x) / sizeof((x)[0]))
>
> -typedef struct {
> +typedef struct efi_guid {
>         uint8_t b[16];
>  } efi_guid_t __aligned(8);
>
>  #define EFI_GUID(a, b, c, d0, d1, d2, d3, d4, d5, d6, d7) \
>
> --
> 2.45.2
>

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

Patch

diff --git a/include/efi.h b/include/efi.h
index c3c4b93f860a..b92c961a2afd 100644
--- a/include/efi.h
+++ b/include/efi.h
@@ -73,9 +73,9 @@  struct efi_device_path {
  * EDK2 reference implementation both define EFI_GUID as
  * struct { u32 a; u16; b; u16 c; u8 d[8]; }; which is 4-byte
  * aligned.
  */
-typedef struct {
+typedef struct efi_guid {
 	u8 b[16];
 } efi_guid_t __attribute__((aligned(4)));
 
 #define EFI_BITS_PER_LONG	(sizeof(long) * 8)
diff --git a/tools/eficapsule.h b/tools/eficapsule.h
index 6efd07d2eb6b..97d077536d5b 100644
--- a/tools/eficapsule.h
+++ b/tools/eficapsule.h
@@ -23,9 +23,9 @@ 
 #endif
 
 #define ARRAY_SIZE(x)		(sizeof(x) / sizeof((x)[0]))
 
-typedef struct {
+typedef struct efi_guid {
 	uint8_t b[16];
 } efi_guid_t __aligned(8);
 
 #define EFI_GUID(a, b, c, d0, d1, d2, d3, d4, d5, d6, d7) \