You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by GitBox <gi...@apache.org> on 2020/07/04 06:13:59 UTC

[GitHub] [incubator-nuttx] xiaoxiang781216 commented on a change in pull request #1355: vfs: Make the filesystem query API confirm POSIX standard

xiaoxiang781216 commented on a change in pull request #1355:
URL: https://github.com/apache/incubator-nuttx/pull/1355#discussion_r449744290



##########
File path: arch/sim/src/sim/up_hostfs.c
##########
@@ -432,32 +432,35 @@ int host_closedir(void *dirp)
 }
 
 /****************************************************************************
- * Name: host_statfs
+ * Name: host_statvfs
  ****************************************************************************/
 
-int host_statfs(const char *path, struct nuttx_statfs_s *buf)
+int host_statvfs(const char *path, struct nuttx_statvfs_s *buf)
 {
   int            ret;
   struct statvfs hostbuf;
 
-  /* Call the host's statfs routine */
+  /* Call the host's statvfs routine */
 
   ret = statvfs(path, &hostbuf);
   if (ret < 0)
     {
       ret = -errno;
     }
 
-  /* Map the struct statfs value */
+  /* Map the struct statvfs value */
 
-  buf->f_type    = 0; /* hostfs overwrites f_type anyway */
-  buf->f_namelen = hostbuf.f_namemax;
+  buf->f_fsid    = 0; /* hostfs overwrites f_fsid anyway */
+  buf->f_flag    = hostbuf.f_flag;

Review comment:
       Done.




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org