diff options
author | Anton Kling <anton@kling.gg> | 2024-11-22 22:33:06 +0100 |
---|---|---|
committer | Anton Kling <anton@kling.gg> | 2024-11-22 22:33:06 +0100 |
commit | 8fa2af9678b9e257a1dfb1e5111f35d22366f2c6 (patch) | |
tree | d82d3b9678b2fcfdc901455f4ca2ed13dc49aaa7 /kernel/cpu | |
parent | 8827f3033d76b0d9c7d8d8225077176a813f7f49 (diff) |
vfs: Add dup()
Diffstat (limited to 'kernel/cpu')
-rw-r--r-- | kernel/cpu/syscall.c | 5 |
1 files changed, 5 insertions, 0 deletions
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); |