[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH v1 05/15] efi/api: Add PRIxGRUB_EFI_STATUS and use it.
From: |
Leo Sandoval |
Subject: |
[PATCH v1 05/15] efi/api: Add PRIxGRUB_EFI_STATUS and use it. |
Date: |
Thu, 31 Oct 2024 13:42:48 -0600 |
From: Peter Jones <pjones@redhat.com>
This avoids syntax checkers getting confused about if it's llx or lx.
Signed-off-by: Peter Jones <pjones@redhat.com>
---
include/grub/efi/api.h | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/include/grub/efi/api.h b/include/grub/efi/api.h
index d44d00ad7..5f3cd4cc0 100644
--- a/include/grub/efi/api.h
+++ b/include/grub/efi/api.h
@@ -577,7 +577,16 @@ typedef grub_uint64_t grub_efi_uint64_t;
typedef grub_uint8_t grub_efi_char8_t;
typedef grub_uint16_t grub_efi_char16_t;
+
typedef grub_efi_uintn_t grub_efi_status_t;
+/* Make grub_efi_status_t reasonably printable. */
+#if GRUB_CPU_SIZEOF_VOID_P == 8
+#define PRIxGRUB_EFI_STATUS "lx"
+#define PRIdGRUB_EFI_STATUS "ld"
+#else
+#define PRIxGRUB_EFI_STATUS "llx"
+#define PRIdGRUB_EFI_STATUS "lld"
+#endif
/*
* On x86, the EFI calling convention may deviate from the local one, so
--
2.46.2
- [PATCH v1 00/15] Fedora Rawhide (non-network) EFI patches, Leo Sandoval, 2024/10/31
- [PATCH v1 01/15] misc: Make "exit" take a return code., Leo Sandoval, 2024/10/31
- [PATCH v1 02/15] efi/init: Make efi machines load an env block from a variable, Leo Sandoval, 2024/10/31
- [PATCH v1 05/15] efi/api: Add PRIxGRUB_EFI_STATUS and use it.,
Leo Sandoval <=
- [PATCH v1 10/15] env: Add efi-export-env and efi-load-env commands, Leo Sandoval, 2024/10/31
- [PATCH v1 06/15] efi: don't use int for efi status, Leo Sandoval, 2024/10/31
- [PATCH v1 07/15] grub-install: Don't guess /boot/efi/ as HFS+ on ppc machines in grub-install, Leo Sandoval, 2024/10/31
- [PATCH v1 08/15] misc: align struct efi_variable better..., Leo Sandoval, 2024/10/31
- [PATCH v1 13/15] nx: set the nx compatible flag in EFI grub images, Leo Sandoval, 2024/10/31
- [PATCH v1 11/15] grub-install: disable support for EFI platforms, Leo Sandoval, 2024/10/31
- [PATCH v1 04/15] chainloader: Use grub_efi_...() memory helpers where reasonable., Leo Sandoval, 2024/10/31
- [PATCH v1 03/15] efi: Add grub_efi_allocate_pool() and grub_efi_free_pool() wrappers., Leo Sandoval, 2024/10/31
- [PATCH v1 09/15] console: Work around some minor include path weirdnesses, Leo Sandoval, 2024/10/31
- [PATCH v1 12/15] connectefi: new 'connectefi' command, Leo Sandoval, 2024/10/31