From d99e704728f77742e30c63073d8e113c1adac0e4 Mon Sep 17 00:00:00 2001 From: Bananymous Date: Mon, 19 Jun 2023 10:38:29 +0300 Subject: [PATCH] LibC: Fix syscall SYS_READ and SYS_WRITE arguments --- libc/unistd.cpp | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/libc/unistd.cpp b/libc/unistd.cpp index 3ada9dabc6..f22b5dc9a1 100644 --- a/libc/unistd.cpp +++ b/libc/unistd.cpp @@ -41,18 +41,16 @@ long syscall(long syscall, ...) { int fd = va_arg(args, int); void* buffer = va_arg(args, void*); - size_t offset = va_arg(args, size_t); size_t bytes = va_arg(args, size_t); - ret = Kernel::syscall(SYS_READ, fd, (uintptr_t)buffer, offset, bytes); + ret = Kernel::syscall(SYS_READ, fd, (uintptr_t)buffer, bytes); break; } case SYS_WRITE: { int fd = va_arg(args, int); - const char* string = va_arg(args, const char*); - size_t offset = va_arg(args, size_t); + const void* buffer = va_arg(args, const void*); size_t bytes = va_arg(args, size_t); - ret = Kernel::syscall(SYS_WRITE, fd, (uintptr_t)string, offset, bytes); + ret = Kernel::syscall(SYS_WRITE, fd, (uintptr_t)buffer, bytes); break; } case SYS_TERMID: