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



##########
File path: fs/vfs/fs_stat.c
##########
@@ -303,6 +303,18 @@ int inode_stat(FAR struct inode *inode, FAR struct stat 
*buf)
           buf->st_mode  = S_IFMTD;
           buf->st_mode |= S_IROTH | S_IRGRP | S_IRUSR;
           buf->st_mode |= S_IWOTH | S_IWGRP | S_IWUSR;
+        
+#ifndef CONFIG_DISABLE_MOUNTPOINT
+          if ((inode->u.i_bops != NULL) && (inode->u.i_bops->geometry))
+            {
+              struct geometry geo;
+              if (inode->u.i_bops->geometry(inode, &geo) >= 0 &&

Review comment:
       Should use MTD_IOCTL(i_mtd, MTDIOC_GEOMETRY...) here.

##########
File path: fs/vfs/fs_stat.c
##########
@@ -303,6 +303,18 @@ int inode_stat(FAR struct inode *inode, FAR struct stat 
*buf)
           buf->st_mode  = S_IFMTD;
           buf->st_mode |= S_IROTH | S_IRGRP | S_IRUSR;
           buf->st_mode |= S_IWOTH | S_IWGRP | S_IWUSR;
+        

Review comment:
       Let's squash the 2nd path into 1st one:
   git rebase --interactive HEAD~2
   change pick to squash

##########
File path: fs/vfs/fs_stat.c
##########
@@ -303,6 +305,14 @@ int inode_stat(FAR struct inode *inode, FAR struct stat 
*buf)
           buf->st_mode  = S_IFMTD;
           buf->st_mode |= S_IROTH | S_IRGRP | S_IRUSR;
           buf->st_mode |= S_IWOTH | S_IWGRP | S_IWUSR;
+
+          struct mtd_geometry_s mtdgeo;

Review comment:
       Need move mtdgeo before line 305.




----------------------------------------------------------------
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:
[email protected]


Reply via email to