From 0358d37820a6e9676b12b09a36bf1c256bc53302 Mon Sep 17 00:00:00 2001 From: Matheus Date: Mon, 17 Feb 2025 13:08:38 -0300 Subject: [PATCH] open syscall: fix error --- kernel-src/sys/syscalls/open.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kernel-src/sys/syscalls/open.c b/kernel-src/sys/syscalls/open.c index 3bf84a60..a95e877c 100644 --- a/kernel-src/sys/syscalls/open.c +++ b/kernel-src/sys/syscalls/open.c @@ -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