diff --git a/kernel/include/sys/Syscall.h b/kernel/include/sys/Syscall.h index 13d69c0f..9b480eed 100644 --- a/kernel/include/sys/Syscall.h +++ b/kernel/include/sys/Syscall.h @@ -8,13 +8,12 @@ #define SYS_write 3 #define SYS_paint 4 #define SYS_rand 5 -#define SYS_getversion 6 -#define SYS_gettid 7 -#define SYS_mmap 8 -#define SYS_munmap 9 -#define SYS_open 10 -#define SYS_read 11 -#define SYS_close 12 +#define SYS_gettid 6 +#define SYS_mmap 7 +#define SYS_munmap 8 +#define SYS_open 9 +#define SYS_read 10 +#define SYS_close 11 namespace Syscall { @@ -27,7 +26,6 @@ void sys_sleep(Context* context, uint64_t ms); void sys_write(Context* context, int fd, size_t size, const char* addr); void sys_paint(Context* context, uint64_t x, uint64_t y, uint64_t w, uint64_t h, uint64_t col); void sys_rand(Context* context); -void sys_getversion(Context* context, char* buffer, size_t max); void sys_gettid(Context* context); void sys_mmap(Context* context, void* address, size_t size, int flags); void sys_munmap(Context* context, void* address, size_t size); diff --git a/kernel/src/sys/Syscall.cpp b/kernel/src/sys/Syscall.cpp index b470acaf..79fbcc9a 100644 --- a/kernel/src/sys/Syscall.cpp +++ b/kernel/src/sys/Syscall.cpp @@ -22,7 +22,6 @@ void Syscall::entry(Context* context) break; case SYS_paint: sys_paint(context, context->rdi, context->rsi, context->rdx, context->r10, context->r8); break; case SYS_rand: sys_rand(context); break; - case SYS_getversion: sys_getversion(context, (char*)context->rdi, context->rsi); break; case SYS_gettid: sys_gettid(context); break; case SYS_mmap: sys_mmap(context, (void*)context->rdi, context->rsi, (int)context->rdx); break; case SYS_munmap: sys_munmap(context, (void*)context->rdi, context->rsi); break; diff --git a/kernel/src/sys/version.cpp b/kernel/src/sys/version.cpp deleted file mode 100644 index f8bd51a3..00000000 --- a/kernel/src/sys/version.cpp +++ /dev/null @@ -1,19 +0,0 @@ -#include "config.h" -#include "errno.h" -#include "interrupts/Context.h" -#include "std/stdio.h" - -void sys_getversion(Context* context, char* buffer, size_t max) -{ - if (!max) - { - context->rax = -EINVAL; - return; - } - if (!buffer) - { - context->rax = -EINVAL; - return; - } - context->rax = snprintf(buffer, max, "moon %s", moon_version()); -} \ No newline at end of file diff --git a/libs/libc/include/luna/syscall.h b/libs/libc/include/luna/syscall.h index 8c0715dc..1ba942c1 100644 --- a/libs/libc/include/luna/syscall.h +++ b/libs/libc/include/luna/syscall.h @@ -7,13 +7,12 @@ #define SYS_write 3 #define SYS_paint 4 #define SYS_rand 5 -#define SYS_getversion 6 -#define SYS_gettid 7 -#define SYS_mmap 8 -#define SYS_munmap 9 -#define SYS_open 10 -#define SYS_read 11 -#define SYS_close 12 +#define SYS_gettid 6 +#define SYS_mmap 7 +#define SYS_munmap 8 +#define SYS_open 9 +#define SYS_read 10 +#define SYS_close 11 #ifndef __want_syscalls #ifdef __cplusplus diff --git a/libs/libc/src/unistd.cpp b/libs/libc/src/unistd.cpp index 4841f861..f70ea179 100644 --- a/libs/libc/src/unistd.cpp +++ b/libs/libc/src/unistd.cpp @@ -38,8 +38,7 @@ extern "C" case SYS_close: case SYS_sleep: result = __luna_syscall1(number, va_arg(ap, arg)); break; case SYS_munmap: - case SYS_open: - case SYS_getversion: { + case SYS_open: { arg arg0 = va_arg(ap, arg); arg arg1 = va_arg(ap, arg); result = __luna_syscall2(number, arg0, arg1);