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 2021/08/06 15:08:41 UTC
[incubator-nuttx] branch master updated: cmd/df: Fix the abnormal
output after off_t change
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
The following commit(s) were added to refs/heads/master by this push:
new 5c5e75a cmd/df: Fix the abnormal output after off_t change
5c5e75a is described below
commit 5c5e75ac6fa228fc24794f1ea6c4f2da2fd9a643
Author: Jiuzhu Dong <do...@xiaomi.com>
AuthorDate: Thu Aug 5 18:14:46 2021 +0800
cmd/df: Fix the abnormal output after off_t change
Change-Id: Ieaf063cb636a77eea971cb19e6eaeea6421bff4b
Signed-off-by: Jiuzhu Dong <do...@xiaomi.com>
---
fs/mount/fs_procfs_mount.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/fs/mount/fs_procfs_mount.c b/fs/mount/fs_procfs_mount.c
index 6107fb7..4308fd7 100644
--- a/fs/mount/fs_procfs_mount.c
+++ b/fs/mount/fs_procfs_mount.c
@@ -25,6 +25,7 @@
#include <nuttx/config.h>
#include <nuttx/compiler.h>
+#include <inttypes.h>
#include <sys/types.h>
#include <sys/statfs.h>
#include <sys/stat.h>
@@ -255,7 +256,8 @@ static int blocks_entry(FAR const char *mountpoint,
/* Generate blocks list one line at a time */
- mount_sprintf(info, "%6lu %10lu %10lu %10lu %s\n",
+ mount_sprintf(info, "%6lu %10" PRIuOFF " %10" PRIuOFF
+ " %10" PRIuOFF " %s\n",
statbuf->f_bsize, statbuf->f_blocks,
statbuf->f_blocks - statbuf->f_bavail, statbuf->f_bavail,
mountpoint);