You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by xi...@apache.org on 2020/11/20 15:29:55 UTC
[incubator-nuttx-apps] 03/05: fsutils/mkfatfs/configfat.c: Fix
syslog formats
This is an automated email from the ASF dual-hosted git repository.
xiaoxiang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-nuttx-apps.git
commit 2c0c033b43a7eb06ed8e7878ed6acfe326533741
Author: YAMAMOTO Takashi <ya...@midokura.com>
AuthorDate: Fri Nov 20 19:48:43 2020 +0900
fsutils/mkfatfs/configfat.c: Fix syslog formats
---
fsutils/mkfatfs/configfat.c | 17 +++++++++++------
1 file changed, 11 insertions(+), 6 deletions(-)
diff --git a/fsutils/mkfatfs/configfat.c b/fsutils/mkfatfs/configfat.c
index b260f9c..687fa50 100644
--- a/fsutils/mkfatfs/configfat.c
+++ b/fsutils/mkfatfs/configfat.c
@@ -39,6 +39,7 @@
#include <nuttx/config.h>
+#include <inttypes.h>
#include <stdint.h>
#include <string.h>
#include <debug.h>
@@ -473,7 +474,8 @@ mkfatfs_tryfat12(FAR struct fat_format_s *fmt, FAR struct fat_var_s *var,
maxnclusters = FAT_MAXCLUST12;
}
- finfo("nfatsects=%u nclusters=%u (max=%u)\n",
+ finfo("nfatsects=%" PRIu32 " nclusters=%" PRIu32
+ " (max=%" PRIu32 ")\n",
config->fc_nfatsects, config->fc_nclusters, maxnclusters);
/* Check if this number of clusters would overflow the maximum for
@@ -482,7 +484,8 @@ mkfatfs_tryfat12(FAR struct fat_format_s *fmt, FAR struct fat_var_s *var,
if (config->fc_nclusters + 2 > maxnclusters)
{
- fwarn("WARNING: Too many clusters for FAT12: %d > %d\n",
+ fwarn("WARNING: Too many clusters for FAT12: %"
+ PRId32 " > %" PRId32 "\n",
config->fc_nclusters, maxnclusters - 2);
return -ENFILE;
@@ -545,7 +548,8 @@ mkfatfs_tryfat16(FAR struct fat_format_s *fmt, FAR struct fat_var_s *var,
maxnclusters = FAT_MAXCLUST16;
}
- finfo("nfatsects=%u nclusters=%u (min=%u max=%u)\n",
+ finfo("nfatsects=%" PRIu32 " nclusters=%" PRIu32
+ " (min=%u max=%" PRIu32 ")\n",
config->fc_nfatsects, config->fc_nclusters, FAT_MINCLUST16,
maxnclusters);
@@ -561,7 +565,7 @@ mkfatfs_tryfat16(FAR struct fat_format_s *fmt, FAR struct fat_var_s *var,
(config->fc_nclusters < FAT_MINCLUST16))
{
fwarn("WARNING: Too few or too many clusters for FAT16: "
- "%d < %d < %d\n",
+ "%d < %" PRId32 " < %" PRId32 "\n",
FAT_MINCLUST16, config->fc_nclusters, maxnclusters - 2);
return -ENFILE;
@@ -624,7 +628,8 @@ mkfatfs_tryfat32(FAR struct fat_format_s *fmt, FAR struct fat_var_s *var,
maxnclusters = FAT_MAXCLUST32;
}
- finfo("nfatsects=%u nclusters=%u (max=%u)\n",
+ finfo("nfatsects=%" PRIu32 " nclusters=%" PRIu32
+ " (max=%" PRIu32 ")\n",
config->fc_nfatsects, config->fc_nclusters, maxnclusters);
/* Check if this number of clusters would overflow the maximum for
@@ -635,7 +640,7 @@ mkfatfs_tryfat32(FAR struct fat_format_s *fmt, FAR struct fat_var_s *var,
(config->fc_nclusters < FAT_MINCLUST32))
{
fwarn("WARNING: Too few or too many clusters for FAT32: "
- "%d < %d < %d\n",
+ "%d < %" PRId32 " < %" PRId32 "\n",
FAT_MINCLUST32, config->fc_nclusters, maxnclusters - 3);
return -ENFILE;