xiaoxiang781216 commented on code in PR #8000: URL: https://github.com/apache/nuttx/pull/8000#discussion_r1059921233
########## include/nuttx/fs/fs.h: ########## @@ -209,13 +211,19 @@ struct file_operations int (*close)(FAR struct file *filep); ssize_t (*read)(FAR struct file *filep, FAR char *buffer, size_t buflen); ssize_t (*write)(FAR struct file *filep, FAR const char *buffer, - size_t buflen); + size_t buflen); off_t (*seek)(FAR struct file *filep, off_t offset, int whence); int (*ioctl)(FAR struct file *filep, int cmd, unsigned long arg); + int (*truncate)(FAR struct file *filep, off_t length); Review Comment: Ok, I understand that you want to implement ftruncate for shm: https://man7.org/linux/man-pages/man7/shm_overview.7.html I would suggest you move truncate related change to a new PR, so we can merge it quickly. BTW, it's better that the new PR contain two patch: 1.git revert dbc163f1b0b78543bb93e6e35142ec2061db85d6 2.Add truncate callback. -- 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]
