From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 From: Peter Jones Date: Thu, 1 Jun 2017 10:07:50 -0400 Subject: [PATCH] Add PRIxGRUB_EFI_STATUS and use it. This avoids syntax checkers getting confused about if it's llx or lx. Signed-off-by: Peter Jones --- 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 c1b869db520..daa9268fdaa 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