Unverified Commit 68963bec by Stéphane Graber Committed by GitHub

Merge pull request #3900 from brauner/2021-07-08.fixes

file_utils: surface ENOENT when falling back to openat()
parents 78598e2b ebb79ad3
...@@ -663,7 +663,11 @@ int open_at(int dfd, const char *path, unsigned int o_flags, ...@@ -663,7 +663,11 @@ int open_at(int dfd, const char *path, unsigned int o_flags,
if (errno != ENOSYS) if (errno != ENOSYS)
return -errno; return -errno;
return openat(dfd, path, o_flags, mode); fd = openat(dfd, path, o_flags, mode);
if (fd < 0)
return -errno;
return move_fd(fd);
} }
int fd_make_nonblocking(int fd) int fd_make_nonblocking(int fd)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment