grub_error: Use format code PRIuGRUB_SIZE for variables of type grub_size_t

Signed-off-by: Glenn Washburn <development@efficientek.com>
Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
This commit is contained in:
Glenn Washburn authored and Daniel Kiper committed 2021-03-10 14:50:44 +01:00
1 parent 334c0ef3d0
commit e96c7645f4
4 files changed
+12 -7

No files matched your search

+8 -4
View File
@@ -484,13 +484,15 @@ grub_cryptodisk_setcipher (grub_cryptodisk_t crypt, const char *ciphername, cons
}
if (cipher->cipher->blocksize != GRUB_CRYPTODISK_GF_BYTES)
{
ret = grub_error (GRUB_ERR_BAD_ARGUMENT, "Unsupported XTS block size: %d",
ret = grub_error (GRUB_ERR_BAD_ARGUMENT,
"Unsupported XTS block size: %" PRIuGRUB_SIZE,
cipher->cipher->blocksize);
goto err;
}
if (secondary_cipher->cipher->blocksize != GRUB_CRYPTODISK_GF_BYTES)
{
ret = grub_error (GRUB_ERR_BAD_ARGUMENT, "Unsupported XTS block size: %d",
ret = grub_error (GRUB_ERR_BAD_ARGUMENT,
"Unsupported XTS block size: %" PRIuGRUB_SIZE,
secondary_cipher->cipher->blocksize);
goto err;
}
@@ -501,7 +503,8 @@ grub_cryptodisk_setcipher (grub_cryptodisk_t crypt, const char *ciphername, cons
cipheriv = ciphermode + sizeof ("lrw-") - 1;
if (cipher->cipher->blocksize != GRUB_CRYPTODISK_GF_BYTES)
{
ret = grub_error (GRUB_ERR_BAD_ARGUMENT, "Unsupported LRW block size: %d",
ret = grub_error (GRUB_ERR_BAD_ARGUMENT,
"Unsupported LRW block size: %" PRIuGRUB_SIZE,
cipher->cipher->blocksize);
goto err;
}
@@ -523,7 +526,8 @@ grub_cryptodisk_setcipher (grub_cryptodisk_t crypt, const char *ciphername, cons
{
if (cipher->cipher->blocksize & (cipher->cipher->blocksize - 1)
|| cipher->cipher->blocksize == 0)
grub_error (GRUB_ERR_BAD_ARGUMENT, "Unsupported benbi blocksize: %d",
grub_error (GRUB_ERR_BAD_ARGUMENT,
"Unsupported benbi blocksize: %" PRIuGRUB_SIZE,
cipher->cipher->blocksize);
/* FIXME should we return an error here? */
for (benbi_log = 0;
+1 -1
View File
@@ -504,7 +504,7 @@ grub_efi_duplicate_device_path (const grub_efi_device_path_t *dp)
if (len < 4)
{
grub_error (GRUB_ERR_OUT_OF_RANGE,
"malformed EFI Device Path node has length=%d", len);
"malformed EFI Device Path node has length=%" PRIuGRUB_SIZE, len);
return NULL;
}
+1 -1
View File
@@ -164,7 +164,7 @@ make_file_path (grub_efi_device_path_t *dp, const char *filename)
if (len < 4)
{
grub_error (GRUB_ERR_OUT_OF_RANGE,
"malformed EFI Device Path node has length=%d", len);
"malformed EFI Device Path node has length=%" PRIuGRUB_SIZE, len);
return NULL;
}
+2 -1
View File
@@ -2110,7 +2110,8 @@ grub_cmd_openbsd_ramdisk (grub_command_t cmd __attribute__ ((unused)),
{
grub_file_close (file);
return grub_error (GRUB_ERR_BAD_OS, "your kOpenBSD supports ramdisk only"
" up to %u bytes, however you supplied a %u bytes one",
" up to %" PRIuGRUB_SIZE " bytes, however you supplied"
" a %" PRIuGRUB_SIZE " bytes one",
openbsd_ramdisk.max_size, size);
}