The fat error remap case structure in the FATFileSystem class maps FR_INT_ERR, FR_MKFS_ABORTED, FR_TIMEOUT, and the default case to the a bad file error code which doesn't make much sense for the either a default or for the above errors.
Initially saw this during CI testing when I would receive the bad file error on format operations.
https://github.com/ARMmbed/mbed-os/blob/master/features/filesystem/fat/FATFileSystem.cpp#L66
@0xc0170, quick question, do we consider changing error codes to match documentation acceptable for patch releases? My gut says no, but at the same time these may be considered bugs?
@0xc0170, quick question, do we consider changing error codes to match documentation acceptable for patch releases? My gut says no, but at the same time these may be considered bugs?
If API specifies error codes and those are correct, it is a bug in the implementation. Should be fine for patch release (assuming it has clear commit msg and gets to the release notes).
If in doubt, we are close to feature release so can be fixed there
Additionally should https://github.com/ARMmbed/mbed-os/blob/master/features/filesystem/fat/FATFileSystem.cpp#L64 be EINVAL rather than ENOEXEC?
Looking at this enum, here's what I'm thinking for the mapping:
EDIT: snipped table, see #6120 for up to date mapping
Respective pr: https://github.com/ARMmbed/mbed-os/pull/6120
Most helpful comment
If API specifies error codes and those are correct, it is a bug in the implementation. Should be fine for patch release (assuming it has clear commit msg and gets to the release notes).
If in doubt, we are close to feature release so can be fixed there