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() --- kernel/cpu/syscall.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'kernel/cpu') diff --git a/kernel/cpu/syscall.c b/kernel/cpu/syscall.c index aad0284..d4db1dd 100644 --- a/kernel/cpu/syscall.c +++ b/kernel/cpu/syscall.c @@ -439,6 +439,10 @@ int syscall_read(int fd, void *buf, size_t count) { return rc; } +int syscall_dup(int fd) { + return vfs_dup(fd); +} + int syscall_dup2(SYS_DUP2_PARAMS *args) { return vfs_dup2(args->org_fd, args->new_fd); } @@ -700,6 +704,7 @@ int (*syscall_functions[])() = { (void(*))syscall_queue_wait, (void(*))syscall_sendfile, (void(*))syscall_shm_unlink, + (void(*))syscall_dup, }; void int_syscall(reg_t *r); -- cgit v1.2.3