[PATCH] syscall: support getgid, getuid, lseek and statfs

8 views
Skip to first unread message

Waldemar Kozaczuk

unread,
May 16, 2022, 12:43:31 PM5/16/22
to osv...@googlegroups.com, Waldemar Kozaczuk
This patch adds 4 new syscalls that map one-to-one to the
four functions listed in the title above. These are required to
run SeaweedFS on OSv.

Refs #1188

Signed-off-by: Waldemar Kozaczuk <jwkoz...@gmail.com>
---
linux.cc | 5 +++++
1 file changed, 5 insertions(+)

diff --git a/linux.cc b/linux.cc
index d3823d00..c9b6b7b6 100644
--- a/linux.cc
+++ b/linux.cc
@@ -38,6 +38,7 @@
#include <sys/file.h>
#include <sys/unistd.h>
#include <sys/random.h>
+#include <sys/vfs.h>

#include <unordered_map>

@@ -490,6 +491,10 @@ OSV_LIBC_API long syscall(long number, ...)
#endif
SYSCALL3(mkdirat, int, char*, mode_t);
SYSCALL3(tgkill, int, int, int);
+ SYSCALL0(getgid);
+ SYSCALL0(getuid);
+ SYSCALL3(lseek, int, off_t, int);
+ SYSCALL2(statfs, const char *, struct statfs *);
}

debug_always("syscall(): unimplemented system call %d\n", number);
--
2.34.1

Commit Bot

unread,
May 18, 2022, 3:16:49 AM5/18/22
to osv...@googlegroups.com, Waldemar Kozaczuk
From: Waldemar Kozaczuk <jwkoz...@gmail.com>
Committer: Nadav Har'El <n...@scylladb.com>
Branch: master

syscall: support getgid, getuid, lseek and statfs

This patch adds 4 new syscalls that map one-to-one to the
four functions listed in the title above. These are required to
run SeaweedFS on OSv.

Refs #1188

Signed-off-by: Waldemar Kozaczuk <jwkoz...@gmail.com>
Message-Id: <20220516164321.13...@gmail.com>

---
diff --git a/linux.cc b/linux.cc
Reply all
Reply to author
Forward
0 new messages