From 0e5f18fa2f7d8ed27252e0166dc467bb10c63b9d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andrius=20=C5=A0tikonas?= Date: Sun, 31 Dec 2023 21:24:01 +0000 Subject: [PATCH] Add sys_uname. --- posix-runner/posix-runner.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/posix-runner/posix-runner.c b/posix-runner/posix-runner.c index c23d73b..09887a9 100644 --- a/posix-runner/posix-runner.c +++ b/posix-runner/posix-runner.c @@ -228,6 +228,11 @@ int sys_wait4(int pid, int* status_ptr, int options) return 0; } +int sys_uname(struct utsname* unameData) +{ + return uname(unameData); +} + int sys_getcwd(char* buf, int size, void, void, void, void) { return getcwd(buf, size); @@ -238,6 +243,11 @@ int sys_chdir(char* path, void, void, void, void, void) return chdir(path); } +int sys_fchdir(int fd, void, void, void, void, void) +{ + return fchdir(fd); +} + int sys_mkdir(char const* a, mode_t b, void, void, void, void) { return mkdir(a, b); @@ -262,8 +272,10 @@ void init_syscalls() syscall_table[59] = sys_execve; syscall_table[60] = sys_exit; syscall_table[61] = sys_wait4; + syscall_table[63] = sys_uname; syscall_table[79] = sys_getcwd; syscall_table[80] = sys_chdir; + syscall_table[81] = sys_fchdir; syscall_table[83] = sys_mkdir; syscall_table[87] = sys_unlink; }