From 08b63b747f9a6b4d1460195f6ca68680abcdd656 Mon Sep 17 00:00:00 2001 From: Anton Kling Date: Fri, 24 Nov 2023 21:29:12 +0100 Subject: Refactor open() --- userland/libc/libc.c | 17 ----------------- 1 file changed, 17 deletions(-) (limited to 'userland/libc/libc.c') diff --git a/userland/libc/libc.c b/userland/libc/libc.c index 3597fe2..6985ff9 100644 --- a/userland/libc/libc.c +++ b/userland/libc/libc.c @@ -172,23 +172,6 @@ void perror(const char *s) { printf("%s\n", strerror(errno)); } -int open(const char *file, int flags, ...) { - mode_t mode = 0; - - if (flags & O_CREAT) { - va_list ap; - va_start(ap, flags); - mode = va_arg(ap, mode_t); - va_end(ap); - } - struct SYS_OPEN_PARAMS args = { - .file = file, - .flags = flags, - .mode = mode, - }; - RC_ERRNO(syscall(SYS_OPEN, (u32)&args, 0, 0, 0, 0)); -} - int close(int fd) { return syscall(SYS_CLOSE, (u32)fd, 0, 0, 0, 0); } int execv(char *path, char **argv) { -- cgit v1.2.3