Mbed-os: FAT Filesystem error code maps to incorrect errors

Created on 12 Feb 2018  路  5Comments  路  Source: ARMmbed/mbed-os

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

storage bug

Most helpful comment

@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

All 5 comments

@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

Looking at this enum, here's what I'm thinking for the mapping:
EDIT: snipped table, see #6120 for up to date mapping

Was this page helpful?
0 / 5 - 0 ratings