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/22 03:38:49 UTC
[incubator-nuttx] 11/22: fs/nxffs/nxffs_reformat.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.git
commit 7df9d89d54e5ff41a5086d7f591c9f9462a538cf
Author: YAMAMOTO Takashi <ya...@midokura.com>
AuthorDate: Sun Nov 22 09:57:01 2020 +0900
fs/nxffs/nxffs_reformat.c: Fix syslog formats
---
fs/nxffs/nxffs_reformat.c | 11 +++++++----
1 file changed, 7 insertions(+), 4 deletions(-)
diff --git a/fs/nxffs/nxffs_reformat.c b/fs/nxffs/nxffs_reformat.c
index 9f2d1a7..7b77cd7 100644
--- a/fs/nxffs/nxffs_reformat.c
+++ b/fs/nxffs/nxffs_reformat.c
@@ -41,6 +41,7 @@
#include <nuttx/config.h>
+#include <stdint.h>
#include <string.h>
#include <errno.h>
#include <debug.h>
@@ -106,7 +107,8 @@ static int nxffs_format(FAR struct nxffs_volume_s *volume)
nxfrd = MTD_BWRITE(volume->mtd, lblock, volume->blkper, volume->pack);
if (nxfrd != volume->blkper)
{
- ferr("ERROR: Write erase block %d failed: %d\n", lblock, nxfrd);
+ ferr("ERROR: Write erase block %jd failed: %zd\n",
+ (intmax_t)lblock, nxfrd);
return -EIO;
}
}
@@ -157,7 +159,8 @@ static int nxffs_badblocks(FAR struct nxffs_volume_s *volume)
nxfrd = MTD_BREAD(volume->mtd, lblock, volume->blkper, volume->pack);
if (nxfrd != volume->blkper)
{
- ferr("ERROR: Read erase block %d failed: %d\n", lblock, nxfrd);
+ ferr("ERROR: Read erase block %jd failed: %zd\n",
+ (intmax_t)lblock, nxfrd);
return -EIO;
}
#endif
@@ -249,8 +252,8 @@ static int nxffs_badblocks(FAR struct nxffs_volume_s *volume)
volume->pack);
if (nxfrd != volume->blkper)
{
- ferr("ERROR: Write erase block %d failed: %d\n",
- lblock, nxfrd);
+ ferr("ERROR: Write erase block %jd failed: %zd\n",
+ (intmax_t)lblock, nxfrd);
return -EIO;
}
}