[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH v4 07/13] efi: Format string error in grub_error
From: |
Glenn Washburn |
Subject: |
[PATCH v4 07/13] efi: Format string error in grub_error |
Date: |
Thu, 18 Feb 2021 20:47:08 -0600 |
The second format string argument, GRUB_EFI_MAX_USABLE_ADDRESS, is a macro
to a number literal. However depending on what the target architecture, the
type can be 32 or 64 bits. Cast to a 64-bit integer. Also, change the
format string literals %llx to use PRIxGRUB_UINT64_T.
Signed-off-by: Glenn Washburn <development@efficientek.com>
---
grub-core/kern/efi/mm.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/grub-core/kern/efi/mm.c b/grub-core/kern/efi/mm.c
index 457772d57..9d3d279fd 100644
--- a/grub-core/kern/efi/mm.c
+++ b/grub-core/kern/efi/mm.c
@@ -127,8 +127,9 @@ grub_efi_allocate_pages_real (grub_efi_physical_address_t
address,
if (address > GRUB_EFI_MAX_USABLE_ADDRESS)
{
grub_error (GRUB_ERR_BAD_ARGUMENT,
- N_("invalid memory address (0x%llx > 0x%llx)"),
- address, GRUB_EFI_MAX_USABLE_ADDRESS);
+ N_("invalid memory address (0x%"PRIxGRUB_UINT64_T
+ " > 0x%"PRIxGRUB_UINT64_T")"),
+ address, (grub_efi_uint64_t) GRUB_EFI_MAX_USABLE_ADDRESS);
return NULL;
}
--
2.27.0
- [PATCH v4 00/13] error: Do compile-time format string checking on grub_error, Glenn Washburn, 2021/02/18
- [PATCH v4 01/13] misc: Format string for grub_error should be a literal, Glenn Washburn, 2021/02/18
- [PATCH v4 02/13] error: grub_error missing format string argument, Glenn Washburn, 2021/02/18
- [PATCH v4 04/13] dmraid_nvidia: Format string error in grub_error, Glenn Washburn, 2021/02/18
- [PATCH v4 03/13] error: grub_error format string add missing format code, Glenn Washburn, 2021/02/18
- [PATCH v4 08/13] error: Use %p format code for pointer types, Glenn Washburn, 2021/02/18
- [PATCH v4 07/13] efi: Format string error in grub_error,
Glenn Washburn <=
- [PATCH v4 06/13] pgp: Format code for grub_error is incorrect, Glenn Washburn, 2021/02/18
- [PATCH v4 10/13] error: Use format code PRIxGRUB_UINT64_T for 64-bit arg in grub_error, Glenn Washburn, 2021/02/18
- [PATCH v4 09/13] error: Use format code PRIxGRUB_UINT64_T for 64-bit uint argument in grub_error, Glenn Washburn, 2021/02/18
- [PATCH v4 13/13] error: Do compile-time format string checking on grub_error, Glenn Washburn, 2021/02/18
- [PATCH v4 05/13] grub_error: Use format code PRIuGRUB_SIZE for variables of type grub_size_t, Glenn Washburn, 2021/02/18
- [PATCH v4 12/13] error: Use format code llu for 64-bit uint bp->blk_prop in grub_error, Glenn Washburn, 2021/02/18