summaryrefslogtreecommitdiff
path: root/src/init/syscalls.c
diff options
context:
space:
mode:
authordzwdz2022-07-10 23:17:27 +0200
committerdzwdz2022-07-10 23:17:27 +0200
commitd3be139a93c578d1e055bfd5f6f79eda312091f9 (patch)
tree0d2bf35333017e41c88fea49969d12fdad0a08c2 /src/init/syscalls.c
parent45c5bf044a063a289fad6a53b8d27ce675d9c272 (diff)
syscalls: implement dup
Diffstat (limited to 'src/init/syscalls.c')
-rw-r--r--src/init/syscalls.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/init/syscalls.c b/src/init/syscalls.c
index 25fa134..7c2bb68 100644
--- a/src/init/syscalls.c
+++ b/src/init/syscalls.c
@@ -26,6 +26,10 @@ int _syscall_mount(handle_t h, const char __user *path, int len) {
return _syscall(_SYSCALL_MOUNT, (int)h, (int)path, len, 0);
}
+handle_t _syscall_dup(handle_t from, handle_t to, int flags) {
+ return (handle_t)_syscall(_SYSCALL_DUP, (int)from, (int)to, flags, 0);
+}
+
int _syscall_read(handle_t h, void __user *buf, size_t len, int offset) {
return _syscall(_SYSCALL_READ, (int)h, (int)buf, (int)len, offset);
}