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/25 13:12:07 UTC
[incubator-nuttx] 30/35: fs/nfs/nfs_vfsops.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 e8695d61ca0128c5a05c27adcb522f2501946b41
Author: YAMAMOTO Takashi <ya...@midokura.com>
AuthorDate: Wed Nov 25 20:09:09 2020 +0900
fs/nfs/nfs_vfsops.c: Fix syslog formats
The following nxstyle errors are not new.
(macros like SIZEOF_rpc_reply_readdir)
fs/nfs/nfs_vfsops.c:848:12: error: Mixed case identifier found
fs/nfs/nfs_vfsops.c:1020:16: error: Mixed case identifier found
fs/nfs/nfs_vfsops.c:1420:13: error: Mixed case identifier found
fs/nfs/nfs_vfsops.c:1818:11: error: Mixed case identifier found
fs/nfs/nfs_vfsops.c:1819:11: error: Mixed case identifier found
fs/nfs/nfs_vfsops.c:1830:8: error: Mixed case identifier found
fs/nfs/nfs_vfsops.c:1851:42: error: Mixed case identifier found
fs/nfs/nfs_vfsops.c:2049:54: error: Mixed case identifier found
fs/nfs/nfs_vfsops.c:2115:58: error: Mixed case identifier found
fs/nfs/nfs_vfsops.c:2172:54: error: Mixed case identifier found
---
fs/nfs/nfs_vfsops.c | 11 +++++++----
1 file changed, 7 insertions(+), 4 deletions(-)
diff --git a/fs/nfs/nfs_vfsops.c b/fs/nfs/nfs_vfsops.c
index 8996b3f..8571a91 100644
--- a/fs/nfs/nfs_vfsops.c
+++ b/fs/nfs/nfs_vfsops.c
@@ -53,6 +53,7 @@
#include <sys/statfs.h>
#include <sys/stat.h>
+#include <inttypes.h>
#include <stdint.h>
#include <stdbool.h>
#include <stdlib.h>
@@ -511,7 +512,7 @@ static int nfs_fileopen(FAR struct nfsmount *nmp, FAR struct nfsnode *np,
tmp = fxdr_unsigned(uint32_t, fattr.fa_mode);
if ((tmp & (NFSMODE_IWOTH | NFSMODE_IWGRP | NFSMODE_IWUSR)) == 0)
{
- ferr("ERROR: File is read-only: %08x\n", tmp);
+ ferr("ERROR: File is read-only: %08" PRIx32 "\n", tmp);
return -EACCES;
}
}
@@ -795,7 +796,8 @@ static ssize_t nfs_read(FAR struct file *filep, FAR char *buffer,
FAR uint32_t *ptr;
int ret = 0;
- finfo("Read %d bytes from offset %d\n", buflen, filep->f_pos);
+ finfo("Read %zu bytes from offset %jd\n",
+ buflen, (intmax_t)filep->f_pos);
/* Sanity checks */
@@ -969,7 +971,8 @@ static ssize_t nfs_write(FAR struct file *filep, FAR const char *buffer,
int committed = NFSV3WRITE_FILESYNC;
int ret;
- finfo("Write %d bytes to offset %d\n", buflen, filep->f_pos);
+ finfo("Write %zu bytes to offset %jd\n",
+ buflen, (intmax_t)filep->f_pos);
/* Sanity checks */
@@ -1322,7 +1325,7 @@ static int nfs_opendir(FAR struct inode *mountpt, FAR const char *relpath,
objtype = fxdr_unsigned(uint32_t, obj_attributes.fa_type);
if (objtype != NFDIR)
{
- ferr("ERROR: Not a directory, type=%d\n", objtype);
+ ferr("ERROR: Not a directory, type=%" PRId32 "\n", objtype);
ret = -ENOTDIR;
goto errout_with_semaphore;
}