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
pull/8262/head
hörbert 2021-12-08 11:38:12 +01:00 zatwierdzone przez Ivan Grokhotkov
rodzic 6050388f51
commit 71fe41d0e0
1 zmienionych plików z 1 dodań i 1 usunięć

Wyświetl plik

@ -415,7 +415,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;
}