mirror of
https://github.com/espressif/esp-idf.git
synced 2024-10-05 20:47:46 -04:00
Merge branch 'fix/nullfs-open' into 'master'
fix(vfs): fix nullfs open syscall See merge request espressif/esp-idf!32725
This commit is contained in:
commit
1ddd2f42b5
@ -204,12 +204,13 @@ static int vfs_null_open(const char* path, int flags, int mode)
|
||||
return -1;
|
||||
}
|
||||
|
||||
if (flags & O_RDWR) {
|
||||
int acc_mode = flags & O_ACCMODE;
|
||||
if (acc_mode == O_RDWR) {
|
||||
SET_READABLE(g_fds, fd);
|
||||
SET_WRITABLE(g_fds, fd);
|
||||
} else if (flags & O_WRONLY) {
|
||||
} else if (acc_mode == O_WRONLY) {
|
||||
SET_WRITABLE(g_fds, fd);
|
||||
} else if (flags & O_RDONLY) {
|
||||
} else if (acc_mode == O_RDONLY) {
|
||||
SET_READABLE(g_fds, fd);
|
||||
} else {
|
||||
errno = EINVAL;
|
||||
|
Loading…
Reference in New Issue
Block a user