-
Notifications
You must be signed in to change notification settings - Fork 764
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
lfs_filebd.c seems to assume errno values #946
Comments
Hi @yamt, thanks for creating an issue. Ah yes, I can see where this could be an problem. The exact solution though seems a bit unclear. We really shouldn't be mapping all OS errors into littlefs errors in the bd since 1. littlefs doesn't define all OS errors and 2. this can mess up littlefs internals. These should probably all be mapped to LFS_ERR_IO, though it's a shame to lose the extra error info. At least I'm curious, did you run into an actual error during use? From what I understand most modern OSs |
i guess leaving the original errno in LFS_FILEBD_TRACE is good enough.
no. i was just reading the code. |
functions in lfs_filebd.c (eg. lfs_filebd_read) returns a negative errno. (eg. -errno)
it doesn't necessarily match with enum lfs_error values.
The text was updated successfully, but these errors were encountered: