From e5dafc825d683cb9b3ebfe0c97609600e7c2a34b Mon Sep 17 00:00:00 2001 From: Masayuki Ishikawa Date: Mon, 19 Jul 2021 16:16:52 +0900 Subject: [PATCH] fs: mount: Change the format for df Summary: - This commit changes the format for df to support big storage up to 2TB. Impact: - None Testing: - Tested with spresense:rndis_smp Signed-off-by: Masayuki Ishikawa --- fs/mount/fs_procfs_mount.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/fs/mount/fs_procfs_mount.c b/fs/mount/fs_procfs_mount.c index 3a02cb2d3a..6107fb7291 100644 --- a/fs/mount/fs_procfs_mount.c +++ b/fs/mount/fs_procfs_mount.c @@ -246,14 +246,16 @@ static int blocks_entry(FAR const char *mountpoint, if (!info->header) { - mount_sprintf(info, " Block Number\n"); - mount_sprintf(info, " Size Blocks Used Available Mounted on\n"); + mount_sprintf(info, + " Block Number\n"); + mount_sprintf(info, + " Size Blocks Used Available Mounted on\n"); info->header = true; } /* Generate blocks list one line at a time */ - mount_sprintf(info, "%6ld %8ld %8ld %8ld %s\n", + mount_sprintf(info, "%6lu %10lu %10lu %10lu %s\n", statbuf->f_bsize, statbuf->f_blocks, statbuf->f_blocks - statbuf->f_bavail, statbuf->f_bavail, mountpoint);