From e8695d61ca0128c5a05c27adcb522f2501946b41 Mon Sep 17 00:00:00 2001 From: YAMAMOTO Takashi Date: Wed, 25 Nov 2020 20:09:09 +0900 Subject: [PATCH] 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 8996b3faad..8571a913e2 100644 --- a/fs/nfs/nfs_vfsops.c +++ b/fs/nfs/nfs_vfsops.c @@ -53,6 +53,7 @@ #include #include +#include #include #include #include @@ -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; }