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



##########
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:
       f_flags needs host->nuttx conversion. maybe it's safer to use 0 for now.

##########
File path: include/sys/statvfs.h
##########
@@ -49,7 +49,14 @@
  * Pre-processor Definitions
  ****************************************************************************/
 
-/* struct statfs file system types. */
+/* Definitions for the flag in `f_flag'.  These definitions should be
+ * kept in sync with the definitions in <sys/mount.h>.
+ */
+
+#define ST_RDONLY             0x0001 /* Mount read-only.  */
+#define ST_NOSUID             0x0002 /* Ignore suid and sgid bits.  */

Review comment:
       we don't have NOSUID things.




----------------------------------------------------------------
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:
us...@infra.apache.org


Reply via email to