RTEMS | Flashdev API returns 0 if a callback is not implemented (#5391)
Kinsey Moore (@opticron)
gitlab at rtems.org
Fri Nov 7 22:29:47 UTC 2025
Kinsey Moore created an issue: https://gitlab.rtems.org/rtems/rtos/rtems/-/issues/5391
## Summary
Currently, the flashdev API will return 0 (success) if an IOCTL call is not implemented in the backend. This can cause the caller to use uninitialized values as if they were good data.
The API should instead place ENOSYS (function not implemented) in `errno` with a return value of `-1`.
This was discovered by trying to use a flashdev backend (xqspi) that didn't support the newer sector commands with the flashdev shell commands and the JFFS2 flashdev adapter.
<!-- Pre-set options
- milestone
-->
--
View it on GitLab: https://gitlab.rtems.org/rtems/rtos/rtems/-/issues/5391
You're receiving this email because of your account on gitlab.rtems.org.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rtems.org/pipermail/bugs/attachments/20251107/88b2ec51/attachment-0001.htm>
More information about the bugs
mailing list