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/07/19 11:26:53 UTC

[incubator-nuttx] 03/03: fs: mount: Change the format for df

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 e5dafc825d683cb9b3ebfe0c97609600e7c2a34b
Author: Masayuki Ishikawa <ma...@gmail.com>
AuthorDate: Mon Jul 19 16:16:52 2021 +0900

    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 <Ma...@jp.sony.com>
---
 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 3a02cb2..6107fb7 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);