Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve error code on RTEMS OS_stat() implementation #454

Closed
jphickey opened this issue May 13, 2020 · 2 comments · Fixed by #463 or #482
Closed

Improve error code on RTEMS OS_stat() implementation #454

jphickey opened this issue May 13, 2020 · 2 comments · Fixed by #463 or #482
Assignees
Milestone

Comments

@jphickey
Copy link
Contributor

Is your feature request related to a problem? Please describe.
Depending on the filesystem in use, the RTEMS statvfs() call might not be implemented at the filesystem level. In particular if it is called on the IMFS filesystem type, it returns an error and sets errno to ENOSYS.

OSAL translates any error here to OS_ERROR, which is what gets returned to the application.

Ultimately this causes the filesystem unit test to fail when this filesystem type is in use.

Describe the solution you'd like
Preferable to return OS_ERR_NOT_IMPLEMENTED in this case. In particular, unit tests already check for this, and will skip the test cases for this API, avoiding failure. This makes it a soft error.

Requester Info
Joseph Hickey, Vantage Systems, Inc.

@jphickey jphickey self-assigned this May 13, 2020
@joelsherrill
Copy link

Alternatively, you could implement statvfs() for the IMFS. RTEMS is open source and encourages submissions.</shameless hint> :)

@jphickey
Copy link
Contributor Author

Alternatively, you could implement statvfs() for the IMFS. RTEMS is open source and encourages submissions.</shameless hint> :)

I think maybe the reason its not implemented is because IMFS is dynamically sized, so there isn't a predefined limit for the total size of this FS.

Still, the ENOSYS errno should logically translate to OS_ERR_NOT_IMPLEMENTED either way, as this is basically what it means.

@skliper skliper added this to the 5.1.0 milestone May 13, 2020
jphickey added a commit to jphickey/osal that referenced this issue May 14, 2020
The statvfs() call depends on the underlying filesystem
supporting this.  On RTEMS, the IMFS filesystem type
does not, and it returns the ENOSYS errno.  This is better
translated to OS_ERR_NOT_IMPLEMENTED rather than OS_ERROR.
astrogeco added a commit that referenced this issue May 26, 2020
jphickey pushed a commit to jphickey/osal that referenced this issue Aug 10, 2022
Fix nasa#412, Clean up table services comments/references
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants