vfs: don't overwrite errno by a hard coded ENOENT

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 https://github.com/espressif/esp-idf/pull/8036
This commit is contained in:
hörbert
2021-12-08 11:38:12 +01:00
committed by Ivan Grokhotkov
parent 8a4bcdb563
commit d8c3b4d646

View File

@ -399,7 +399,7 @@ int esp_vfs_open(struct _reent *r, const char * path, int flags, int mode)
__errno_r(r) = ENOMEM;
return -1;
}
__errno_r(r) = ENOENT;
__errno_r(r) = errno;
return -1;
}