All of lore.kernel.org
 help / color / mirror / Atom feed
From: Glenn Washburn <development@efficientek.com>
To: grub-devel@gnu.org, Daniel Kiper <daniel.kiper@oracle.com>
Cc: Glenn Washburn <development@efficientek.com>
Subject: [PATCH v5 05/13] grub_error: Use format code PRIuGRUB_SIZE for variables of type grub_size_t
Date: Wed,  3 Mar 2021 19:29:10 -0600	[thread overview]
Message-ID: <3e64e5cb2aaadd3af88288c427206d7b5764fcda.1614820843.git.development@efficientek.com> (raw)
In-Reply-To: <cover.1614820843.git.development@efficientek.com>

Signed-off-by: Glenn Washburn <development@efficientek.com>
---
 grub-core/disk/cryptodisk.c        | 12 ++++++++----
 grub-core/kern/efi/efi.c           |  2 +-
 grub-core/loader/efi/chainloader.c |  2 +-
 grub-core/loader/i386/bsd.c        |  3 ++-
 4 files changed, 12 insertions(+), 7 deletions(-)

diff --git a/grub-core/disk/cryptodisk.c b/grub-core/disk/cryptodisk.c
index b62835acc..4ff6654a0 100644
--- a/grub-core/disk/cryptodisk.c
+++ b/grub-core/disk/cryptodisk.c
@@ -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;
diff --git a/grub-core/kern/efi/efi.c b/grub-core/kern/efi/efi.c
index 2942b8e35..d45cf67a9 100644
--- a/grub-core/kern/efi/efi.c
+++ b/grub-core/kern/efi/efi.c
@@ -503,7 +503,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;
 	}
 
diff --git a/grub-core/loader/efi/chainloader.c b/grub-core/loader/efi/chainloader.c
index 2e98947a0..b8d35f41e 100644
--- a/grub-core/loader/efi/chainloader.c
+++ b/grub-core/loader/efi/chainloader.c
@@ -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;
 	}
 
diff --git a/grub-core/loader/i386/bsd.c b/grub-core/loader/i386/bsd.c
index f5bf7f89e..fe20b339b 100644
--- a/grub-core/loader/i386/bsd.c
+++ b/grub-core/loader/i386/bsd.c
@@ -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);
     }
 
-- 
2.27.0



  parent reply	other threads:[~2021-03-04  1:30 UTC|newest]

Thread overview: 62+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-02-19  2:47 [PATCH v4 00/13] error: Do compile-time format string checking on grub_error Glenn Washburn
2021-02-19  2:47 ` [PATCH v4 01/13] misc: Format string for grub_error should be a literal Glenn Washburn
2021-02-19  2:47 ` [PATCH v4 02/13] error: grub_error missing format string argument Glenn Washburn
2021-02-19  2:47 ` [PATCH v4 03/13] error: grub_error format string add missing format code Glenn Washburn
2021-02-19  2:47 ` [PATCH v4 04/13] dmraid_nvidia: Format string error in grub_error Glenn Washburn
2021-02-19  2:47 ` [PATCH v4 05/13] grub_error: Use format code PRIuGRUB_SIZE for variables of type grub_size_t Glenn Washburn
2021-02-19  2:47 ` [PATCH v4 06/13] pgp: Format code for grub_error is incorrect Glenn Washburn
2021-02-19  2:47 ` [PATCH v4 07/13] efi: Format string error in grub_error Glenn Washburn
2021-02-19  2:47 ` [PATCH v4 08/13] error: Use %p format code for pointer types Glenn Washburn
2021-02-27 11:43   ` Daniel Kiper
2021-02-28 20:02     ` Glenn Washburn
2021-03-03 18:05       ` Daniel Kiper
2021-02-19  2:47 ` [PATCH v4 09/13] error: Use format code PRIxGRUB_UINT64_T for 64-bit uint argument in grub_error Glenn Washburn
2021-02-19  2:47 ` [PATCH v4 10/13] error: Use format code PRIxGRUB_UINT64_T for 64-bit arg " Glenn Washburn
2021-02-27 11:48   ` Daniel Kiper
2021-02-28 20:13     ` Glenn Washburn
2021-03-03 18:09       ` Daniel Kiper
2021-02-19  2:47 ` [PATCH v4 11/13] error: Use format code PRIuGRUB_UINT64_T for 64-bit typed fileblock " Glenn Washburn
2021-02-19  2:47 ` [PATCH v4 12/13] error: Use format code llu for 64-bit uint bp->blk_prop " Glenn Washburn
2021-02-27 12:05   ` Daniel Kiper
2021-02-28 21:10     ` Glenn Washburn
2021-03-03 18:17       ` Daniel Kiper
2021-03-04  0:46         ` Glenn Washburn
2021-02-19  2:47 ` [PATCH v4 13/13] error: Do compile-time format string checking on grub_error Glenn Washburn
2021-02-27 12:19 ` [PATCH v4 00/13] " Daniel Kiper
2021-02-28 20:31   ` Glenn Washburn
2021-03-04  1:29 ` [PATCH v5 " Glenn Washburn
2021-03-04  1:29   ` [PATCH v5 01/13] misc: Format string for grub_error should be a literal Glenn Washburn
2021-03-04  1:29   ` [PATCH v5 02/13] error: grub_error missing format string argument Glenn Washburn
2021-03-04  1:29   ` [PATCH v5 03/13] error: grub_error format string add missing format code Glenn Washburn
2021-03-04  1:29   ` [PATCH v5 04/13] dmraid_nvidia: Format string error in grub_error Glenn Washburn
2021-03-04  1:29   ` Glenn Washburn [this message]
2021-03-04  1:29   ` [PATCH v5 06/13] pgp: Format code for grub_error is incorrect Glenn Washburn
2021-03-04  1:29   ` [PATCH v5 07/13] efi: Format string error in grub_error Glenn Washburn
2021-03-04  1:29   ` [PATCH v5 08/13] error: Use PRI* macros to get correct format string code across architectures Glenn Washburn
2021-03-04  1:29   ` [PATCH v5 09/13] error: Use format code PRIxGRUB_UINT64_T for 64-bit uint argument in grub_error Glenn Washburn
2021-03-04  1:29   ` [PATCH v5 10/13] error: Use format code PRIxGRUB_UINT64_T for 64-bit arg " Glenn Washburn
2021-03-04  1:29   ` [PATCH v5 11/13] error: Use format code PRIuGRUB_UINT64_T for 64-bit typed fileblock " Glenn Washburn
2021-03-04  1:29   ` [PATCH v5 12/13] error: Use format code llu for 64-bit uint bp->blk_prop " Glenn Washburn
2021-03-04 17:59     ` Daniel Kiper
2021-03-04 22:50       ` Glenn Washburn
2021-03-04  1:29   ` [PATCH v5 13/13] error: Do compile-time format string checking on grub_error Glenn Washburn
2021-03-05  0:22 ` [PATCH v6 00/14] error: Do compile-time format string checking on grub> Glenn Washburn
2021-03-05  0:22   ` [PATCH v6 01/14] misc: Format string for grub_error should be a literal Glenn Washburn
2021-03-05  0:22   ` [PATCH v6 02/14] error: grub_error missing format string argument Glenn Washburn
2021-03-05  0:22   ` [PATCH v6 03/14] error: grub_error format string add missing format code Glenn Washburn
2021-03-05  0:22   ` [PATCH v6 04/14] dmraid_nvidia: Format string error in grub_error Glenn Washburn
2021-03-05  0:22   ` [PATCH v6 05/14] grub_error: Use format code PRIuGRUB_SIZE for variables of type grub_size_t Glenn Washburn
2021-03-05  0:22   ` [PATCH v6 06/14] pgp: Format code for grub_error is incorrect Glenn Washburn
2021-03-05  0:22   ` [PATCH v6 07/14] efi: Format string error in grub_error Glenn Washburn
2021-03-05  0:22   ` [PATCH v6 08/14] error: Use PRI* macros to get correct format string code across architectures Glenn Washburn
2021-03-05  0:22   ` [PATCH v6 09/14] error: Use format code PRIxGRUB_UINT64_T for 64-bit uint argument in grub_error Glenn Washburn
2021-03-05  0:22   ` [PATCH v6 10/14] error: Use format code PRIxGRUB_UINT64_T for 64-bit arg " Glenn Washburn
2021-03-05  0:22   ` [PATCH v6 11/14] error: Use format code PRIuGRUB_UINT64_T for 64-bit typed fileblock " Glenn Washburn
2021-03-05  0:22   ` [PATCH v6 12/14] error: Use format code llu for 64-bit uint bp->blk_prop " Glenn Washburn
2021-03-05  0:22   ` [PATCH v6 13/14] error: Do compile-time format string checking on grub_error Glenn Washburn
2021-03-05  0:22   ` [PATCH v6 14/14] zfs: Use grub_uint64_t instead of 1ULL in BF64_*CODE macros Glenn Washburn
2021-03-05 16:27   ` [PATCH v6 00/14] error: Do compile-time format string checking on grub> Daniel Kiper
2021-03-05 23:15     ` Glenn Washburn
2021-03-06  6:59       ` Threading of patch series (was: [PATCH v6 00/14] error: Do compile-time format string checking on grub>) Paul Menzel
2021-03-07 21:00         ` Glenn Washburn
2021-03-09 21:04           ` Konrad Rzeszutek Wilk

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=3e64e5cb2aaadd3af88288c427206d7b5764fcda.1614820843.git.development@efficientek.com \
    --to=development@efficientek.com \
    --cc=daniel.kiper@oracle.com \
    --cc=grub-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.