]> git.ipfire.org Git - thirdparty/grub.git/commitdiff
grub_error: Use format code PRIuGRUB_SIZE for variables of type grub_size_t
authorGlenn Washburn <development@efficientek.com>
Fri, 5 Mar 2021 00:22:36 +0000 (18:22 -0600)
committerDaniel Kiper <daniel.kiper@oracle.com>
Wed, 10 Mar 2021 13:50:44 +0000 (14:50 +0100)
Signed-off-by: Glenn Washburn <development@efficientek.com>
Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
grub-core/disk/cryptodisk.c
grub-core/kern/efi/efi.c
grub-core/loader/efi/chainloader.c
grub-core/loader/i386/bsd.c

index 41866c62de2e331984f05a7777d8c4c07c85b54e..90f82b2d391e241c24062d771d868ec86fa45d60 100644 (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;
index 67394bb6f657e7bb4599a04b2b176dd54400b1c7..8cff7be028930529768f729a8cb525c0e09f1668 100644 (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;
        }
 
index 2e98947a0d517665afec132c890c54dd98683c53..2bd80f4db3d5018d98ba9f0cfb294002340b120e 100644 (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;
        }
 
index d89ff0a7a3a5fbf25b3975b1fc50b55160819bd2..5f3290ce17bcf6e2e0420418de6a45b8a663d03d 100644 (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);
     }