From: Bart Van Assche <bvanassche@acm.org>
To: Jaegeuk Kim <jaegeuk@kernel.org>
Cc: Bart Van Assche <bvanassche@acm.org>,
linux-f2fs-devel@lists.sourceforge.net
Subject: [f2fs-dev] [PATCH] Fix format strings in log messages
Date: Fri, 26 Aug 2022 15:45:34 -0700 [thread overview]
Message-ID: <20220826224534.1445555-1-bvanassche@acm.org> (raw)
Make the argument list match the format string. Use PRIu64 for uint64_t
and %zu for size_t.
Signed-off-by: Bart Van Assche <bvanassche@acm.org>
---
fsck/sload.c | 2 +-
lib/libf2fs.c | 6 +++---
2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/fsck/sload.c b/fsck/sload.c
index 00c3403dace0..ae18c046d567 100644
--- a/fsck/sload.c
+++ b/fsck/sload.c
@@ -318,7 +318,7 @@ static int configure_files(void)
#else
sehnd = selinux_android_file_context_handle();
if (!sehnd) {
- ERR_MSG("Failed to get android file_contexts\n", c.mount_point);
+ ERR_MSG("Failed to get android file_contexts\n");
return -EINVAL;
}
#endif
diff --git a/lib/libf2fs.c b/lib/libf2fs.c
index ecaa2e9d1ad5..f63307a42a08 100644
--- a/lib/libf2fs.c
+++ b/lib/libf2fs.c
@@ -1046,7 +1046,7 @@ int get_device_info(int i)
}
if (!is_power_of_2(dev->zone_size)) {
- MSG(0, "\tError: zoned: illegal zone size %lu (not a power of 2)\n",
+ MSG(0, "\tError: zoned: illegal zone size %" PRIu64 "u (not a power of 2)\n",
dev->zone_size);
free(stat_buf);
return -1;
@@ -1064,10 +1064,10 @@ int get_device_info(int i)
MSG(0, "Info: Host-%s zoned block device:\n",
(dev->zoned_model == F2FS_ZONED_HA) ?
"aware" : "managed");
- MSG(0, " %u zones, %lu zone size(bytes), %u randomly writeable zones\n",
+ MSG(0, " %u zones, %" PRIu64 "u zone size(bytes), %u randomly writeable zones\n",
dev->nr_zones, dev->zone_size,
dev->nr_rnd_zones);
- MSG(0, " %lu blocks per zone\n",
+ MSG(0, " %zu blocks per zone\n",
dev->zone_blocks);
}
#endif
_______________________________________________
Linux-f2fs-devel mailing list
Linux-f2fs-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel
reply other threads:[~2022-08-26 22:45 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=20220826224534.1445555-1-bvanassche@acm.org \
--to=bvanassche@acm.org \
--cc=jaegeuk@kernel.org \
--cc=linux-f2fs-devel@lists.sourceforge.net \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).