xiaoxiang781216 commented on code in PR #17264:
URL: https://github.com/apache/nuttx/pull/17264#discussion_r2478204209


##########
fs/vfs/fs_stat.c:
##########
@@ -439,6 +440,27 @@ int inode_stat(FAR struct inode *inode, FAR struct stat 
*buf, int resolve)
 #endif
             {
               buf->st_mode |= S_IFCHR;
+
+              /* If it is an EEPROM driver, populate the st_size as well (to
+               * allow exporting it as filemtd or loop device)
+               */
+
+              if (inode->u.i_ops->ioctl != NULL)

Review Comment:
   how about reuse inode::i_size field at line 433 instead EEPIOC_GEOMETRY? so, 
other char device may report the size in the future easily.



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

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to