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

Don't overwrite errno by a hard coded ENOENT (IDFGH-6378) #8036

Closed
wants to merge 1 commit into from

Conversation

winzkigermany
Copy link
Contributor

Calling "open" in CHECK_AND_CALL sets a perfectly correct errno.
There is no need to overwrite that with a value of ENOENT, since doing so hides lower level errors like EIO

Calling "open" in CHECK_AND_CALL sets a perfectly correct errno.
There is no need to overwrite that with a value of ENOENT, since doing so hides lower level errors like EIO
@espressif-bot espressif-bot added the Status: Opened Issue is new label Dec 8, 2021
@github-actions github-actions bot changed the title Don't overwrite errno by a hard coded ENOENT Don't overwrite errno by a hard coded ENOENT (IDFGH-6378) Dec 8, 2021
@igrr
Copy link
Member

igrr commented Dec 8, 2021

@winzkigermany could you please describe the situation you are seeing this issue in? Just so that we can add a unit test to check this behavior...

@winzkigermany
Copy link
Contributor Author

The real world scenario is: The user pulls an SD card out (we're using sdmmc), and after that, you just try to fopen(...) a file.
As a result, errno contains ENOENT instead of EIO, because ENOENT is hard coded.

@espressif-bot espressif-bot added Status: In Progress Work is in progress Resolution: NA Issue resolution is unavailable Status: Done Issue is done internally Resolution: Done Issue is done internally and removed Status: Opened Issue is new Status: In Progress Work is in progress Resolution: NA Issue resolution is unavailable labels Jan 13, 2022
@igrr
Copy link
Member

igrr commented Jan 15, 2022

Thank you for the PR @winzkigermany! It has been merged in f01b9a5

dskulina pushed a commit to playable-tech/esp-idf that referenced this pull request Feb 4, 2022
Calling "open" in CHECK_AND_CALL sets a perfectly correct errno.
There is no need to overwrite that with a value of ENOENT, since doing
so hides lower level errors like EIO.

Closes espressif#8036
dskulina pushed a commit to playable-tech/esp-idf that referenced this pull request Feb 5, 2022
Calling "open" in CHECK_AND_CALL sets a perfectly correct errno.
There is no need to overwrite that with a value of ENOENT, since doing
so hides lower level errors like EIO.

Closes espressif#8036
espressif-bot pushed a commit that referenced this pull request Feb 8, 2022
Calling "open" in CHECK_AND_CALL sets a perfectly correct errno.
There is no need to overwrite that with a value of ENOENT, since doing
so hides lower level errors like EIO.

Closes #8036
espressif-bot pushed a commit that referenced this pull request Feb 9, 2022
Calling "open" in CHECK_AND_CALL sets a perfectly correct errno.
There is no need to overwrite that with a value of ENOENT, since doing
so hides lower level errors like EIO.

Closes #8036
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Resolution: Done Issue is done internally Status: Done Issue is done internally
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants