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/05/27 03:34:17 UTC

[GitHub] [incubator-nuttx] patacongo commented on a change in pull request #1118: fs/vfs/fs_stat.c: fill file size for block inode

patacongo commented on a change in pull request #1118:
URL: https://github.com/apache/incubator-nuttx/pull/1118#discussion_r429989034



##########
File path: fs/vfs/fs_stat.c
##########
@@ -384,6 +384,17 @@ int inode_stat(FAR struct inode *inode, FAR struct stat *buf)
           /* What is if also has child inodes? */
 
           buf->st_mode |= S_IFBLK;
+
+#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 && geo.geo_available)

Review comment:
       ```suggestion
                 if (inode->u.i_bops->geometry(inode, &geo) >= 0 &&
                     geo.geo_available)
   ```




----------------------------------------------------------------
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