mirror of
https://github.com/Mathewnd/Astral.git
synced 2026-10-27 12:48:22 +00:00
open syscall: fix error
This commit is contained in:
@@ -40,12 +40,12 @@ syscallret_t syscall_openat(context_t *context, int dirfd, char *path, int flags
|
||||
|
||||
retry_open:
|
||||
file_t *newfile = NULL;
|
||||
vnode_t *vnode = NULL;
|
||||
int newfd;
|
||||
ret.errno = fd_new(flags & O_CLOEXEC, &newfile, &newfd);
|
||||
if (ret.errno)
|
||||
goto cleanup;
|
||||
|
||||
vnode_t *vnode = NULL;
|
||||
ret.errno = vfs_open(dirnode, pathbuf, fileflagstovnodeflags(flags), &vnode);
|
||||
if (ret.errno == 0 && (flags & O_CREAT) && (flags & O_EXCL)) {
|
||||
// exclusive and file already exists
|
||||
|
||||
Reference in New Issue
Block a user