xiaoxiang781216 commented on code in PR #17264:
URL: https://github.com/apache/nuttx/pull/17264#discussion_r2484845493
##########
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:
or add a new function variant of register_driver which return inode. Both
methods are fine.
--
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]