From 9a8512887fe9a52a6c68a20e8d166eea313ecc66 Mon Sep 17 00:00:00 2001 From: Bananymous Date: Mon, 29 May 2023 20:19:17 +0300 Subject: [PATCH] LibC: open() now just returns syscall(SYS_OPEN, ...) errno is handled in syscall() --- libc/fcntl.cpp | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/libc/fcntl.cpp b/libc/fcntl.cpp index 4495191f..6be03408 100644 --- a/libc/fcntl.cpp +++ b/libc/fcntl.cpp @@ -5,11 +5,5 @@ int open(const char* path, int oflag, ...) { - int ret = syscall(SYS_OPEN, path, oflag); - if (ret < 0) - { - errno = -ret; - return -1; - } - return ret; + return syscall(SYS_OPEN, path, oflag); }