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:50 UTC

[incubator-nuttx] branch master updated (3834e7e -> e5dafc8)

This is an automated email from the ASF dual-hosted git repository.

xiaoxiang pushed a change to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-nuttx.git.


    from 3834e7e  serial: use Ctrl+? composite key to force panic"
     new a3f1abf  fs: nfs: Fix statfs for NFS
     new cfd1c28  fs, include: Use fsblkcnt_t and fsfilcnt_t instead of off_t
     new e5dafc8  fs: mount: Change the format for df

The 3 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 fs/fat/fs_fat32.h          |  2 +-
 fs/fat/fs_fat32util.c      |  2 +-
 fs/mount/fs_procfs_mount.c |  8 +++++---
 fs/nfs/nfs_proto.h         |  1 -
 include/sys/statfs.h       | 16 ++++++++--------
 5 files changed, 15 insertions(+), 14 deletions(-)

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

Posted by xi...@apache.org.
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);

[incubator-nuttx] 02/03: fs, include: Use fsblkcnt_t and fsfilcnt_t instead of off_t

Posted by xi...@apache.org.
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 cfd1c28606198e1c3f452610b7e6dc87676b498f
Author: Masayuki Ishikawa <ma...@gmail.com>
AuthorDate: Mon Jul 19 16:04:01 2021 +0900

    fs, include: Use fsblkcnt_t and fsfilcnt_t instead of off_t
    
    Summary:
    - On Linux, fsblkcnt_t and fsfilcnt_t are used in struct statfs
    - This commit applies the same logic
    
    Impact:
    - None
    
    Testing:
    - Tested with spresense:rndis_smp
    
    Signed-off-by: Masayuki Ishikawa <Ma...@jp.sony.com>
---
 fs/fat/fs_fat32.h     |  2 +-
 fs/fat/fs_fat32util.c |  2 +-
 include/sys/statfs.h  | 16 ++++++++--------
 3 files changed, 10 insertions(+), 10 deletions(-)

diff --git a/fs/fat/fs_fat32.h b/fs/fat/fs_fat32.h
index 70e958e..d2cf889 100644
--- a/fs/fat/fs_fat32.h
+++ b/fs/fat/fs_fat32.h
@@ -1084,7 +1084,7 @@ EXTERN int    fat_ffcacheinvalidate(struct fat_mountpt_s *fs,
 EXTERN int    fat_updatefsinfo(struct fat_mountpt_s *fs);
 EXTERN int    fat_computefreeclusters(struct fat_mountpt_s *fs);
 EXTERN int    fat_nfreeclusters(struct fat_mountpt_s *fs,
-                                off_t *pfreeclusters);
+                                fsblkcnt_t *pfreeclusters);
 EXTERN int    fat_currentsector(struct fat_mountpt_s *fs,
                                 struct fat_file_s *ff, off_t position);
 
diff --git a/fs/fat/fs_fat32util.c b/fs/fat/fs_fat32util.c
index d24d8fe..63b15e3 100644
--- a/fs/fat/fs_fat32util.c
+++ b/fs/fat/fs_fat32util.c
@@ -2135,7 +2135,7 @@ int fat_computefreeclusters(struct fat_mountpt_s *fs)
  *
  ****************************************************************************/
 
-int fat_nfreeclusters(struct fat_mountpt_s *fs, off_t *pfreeclusters)
+int fat_nfreeclusters(struct fat_mountpt_s *fs, fsblkcnt_t *pfreeclusters)
 {
   /* If number of the first free cluster is valid, then just return that
    * value.
diff --git a/include/sys/statfs.h b/include/sys/statfs.h
index 82c304f..0817e31 100644
--- a/include/sys/statfs.h
+++ b/include/sys/statfs.h
@@ -100,14 +100,14 @@
 
 struct statfs
 {
-  uint32_t f_type;     /* Type of filesystem (see definitions above) */
-  size_t   f_namelen;  /* Maximum length of filenames */
-  size_t   f_bsize;    /* Optimal block size for transfers */
-  off_t    f_blocks;   /* Total data blocks in the file system of this size */
-  off_t    f_bfree;    /* Free blocks in the file system */
-  off_t    f_bavail;   /* Free blocks avail to non-superuser */
-  off_t    f_files;    /* Total file nodes in the file system */
-  off_t    f_ffree;    /* Free file nodes in the file system */
+  uint32_t   f_type;     /* Type of filesystem (see definitions above) */
+  size_t     f_namelen;  /* Maximum length of filenames */
+  size_t     f_bsize;    /* Optimal block size for transfers */
+  fsblkcnt_t f_blocks;   /* Total data blocks in the file system of this size */
+  fsblkcnt_t f_bfree;    /* Free blocks in the file system */
+  fsblkcnt_t f_bavail;   /* Free blocks avail to non-superuser */
+  fsfilcnt_t f_files;    /* Total file nodes in the file system */
+  fsfilcnt_t f_ffree;    /* Free file nodes in the file system */
 };
 
 /****************************************************************************

[incubator-nuttx] 01/03: fs: nfs: Fix statfs for NFS

Posted by xi...@apache.org.
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 a3f1abfb458ea2adcebc9f4c0d4722847781f863
Author: Masayuki Ishikawa <ma...@gmail.com>
AuthorDate: Mon Jul 19 15:58:46 2021 +0900

    fs: nfs: Fix statfs for NFS
    
    Summary:
    - I noticed that the results of the df command are incorrect for NFS.
    - Finally, I found that obj_attributes is not needed to
      communicate with the NFS server on Linux
    - This commit fixes this issue
    
    Impact:
    - None
    
    Testing:
    - Tested with spresense:rndis_smp
    
    Signed-off-by: Masayuki Ishikawa <Ma...@jp.sony.com>
---
 fs/nfs/nfs_proto.h | 1 -
 1 file changed, 1 deletion(-)

diff --git a/fs/nfs/nfs_proto.h b/fs/nfs/nfs_proto.h
index 5b4a1f9..11d30cd 100644
--- a/fs/nfs/nfs_proto.h
+++ b/fs/nfs/nfs_proto.h
@@ -308,7 +308,6 @@ struct nfsv3_sattr
 struct nfs_statfs
 {
   uint32_t           obj_attributes_follow;
-  struct nfs_fattr   obj_attributes;
   nfsuint64          sf_tbytes;
   nfsuint64          sf_fbytes;
   nfsuint64          sf_abytes;