From 5c5e75ac6fa228fc24794f1ea6c4f2da2fd9a643 Mon Sep 17 00:00:00 2001 From: Jiuzhu Dong Date: Thu, 5 Aug 2021 18:14:46 +0800 Subject: [PATCH] cmd/df: Fix the abnormal output after off_t change Change-Id: Ieaf063cb636a77eea971cb19e6eaeea6421bff4b Signed-off-by: Jiuzhu Dong --- 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 6107fb7291..4308fd77b6 100644 --- a/fs/mount/fs_procfs_mount.c +++ b/fs/mount/fs_procfs_mount.c @@ -25,6 +25,7 @@ #include #include +#include #include #include #include @@ -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);