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
@@ -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;
}
