yamt commented on code in PR #13556:
URL: https://github.com/apache/nuttx/pull/13556#discussion_r1772626277
##########
fs/vfs/fs_dir.c:
##########
@@ -503,6 +503,9 @@ static ssize_t dir_read(FAR struct file *filep, FAR char
*buffer,
return ret;
}
+ /* REVISIT: Should we use i_ino for the d_ino field? */
+
+ dirent->d_ino = dir->fd_root->i_ino;
Review Comment:
d_ino should match st_ino of the file referenced by the directory entry.
a naive implementation would be something like:
```
fstat(dirent->d_name, &st);
dirent->d_ino = st.st_ino;
```
iirc, on nuttx, most filesystems just use st_ino = 0.
for those filesystems, it can be optimized to d_ino = 0.
--
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]