tmedicci commented on PR #12790: URL: https://github.com/apache/nuttx/pull/12790#issuecomment-2256270276
> > > According to the POSIX definition, [`fstat`](https://pubs.opengroup.org/onlinepubs/9699919799/functions/fstat.html) should return 0 upon successful completion. However, underlying functions that implement `fstat` for specific filesystem may return values greater than 0. > > > > > > which filesystem has this behavior? should we fix it instead? @tmedicci > > @xiaoxiang781216 I think fstat should normalize the return value because of 2 reasons: > > * According to @tmedicci it is allowed for the underlying filesystems to return values greater than 0. > * To avoid errors recurring in the future: For example, a new filesystem could be ported to NuttX in the future, and its underlying functions might return greater than 0. Yes, initially I though the same as @xiaoxiang781216 , but later I realized that what @hartmannathan may happen. In this case, specifically, is the ROMFS. As the POSIX spec says it should return 0 in case of success, it makes sense to me making this a system-wide option. -- 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]
