From 8fa2af9678b9e257a1dfb1e5111f35d22366f2c6 Mon Sep 17 00:00:00 2001 From: Anton Kling Date: Fri, 22 Nov 2024 22:33:06 +0100 Subject: vfs: Add dup() --- userland/libc/unistd/dup.c | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 userland/libc/unistd/dup.c (limited to 'userland/libc/unistd/dup.c') diff --git a/userland/libc/unistd/dup.c b/userland/libc/unistd/dup.c new file mode 100644 index 0000000..176659b --- /dev/null +++ b/userland/libc/unistd/dup.c @@ -0,0 +1,6 @@ +#include +#include + +int dup(int fildes) { + RC_ERRNO(syscall(SYS_DUP, (u32)fildes, 0, 0, 0, 0)); +} -- cgit v1.2.3