this repo has no description
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Explicitly return `ENOSYS` for the `clonefileat` and `fclonefileat` syscalls

We were already returning ENOSYS in `__unknown_syscall`, but that prints a message saying the syscall is unimplemented.
This version is a valid implementation of the syscalls (it's not guaranteed to be available on all systems).

+24
+1
src/kernel/emulation/linux/CMakeLists.txt
··· 178 178 misc/csrctl.c 179 179 misc/fsgetpath.c 180 180 misc/abort_with_payload.c 181 + misc/clonefile.c 181 182 fcntl/open.c 182 183 fcntl/openat.c 183 184 fcntl/fcntl.c
+11
src/kernel/emulation/linux/misc/clonefile.c
··· 1 + #include "clonefile.h" 2 + #include "../duct_errno.h" 3 + #include <signal.h> 4 + 5 + long sys_clonefileat(int src_fd, const char* src_path, int dest_fd, const char* dest_path, uint32_t flags) { 6 + return -ENOSYS; 7 + }; 8 + 9 + long sys_fclonefileat(int src_fd, int dest_fd, const char* dest_path, uint32_t flags) { 10 + return -ENOSYS; 11 + };
+9
src/kernel/emulation/linux/misc/clonefile.h
··· 1 + #ifndef LINUX_CLONEFILE_H 2 + #define LINUX_CLONEFILE_H 3 + 4 + #include <stdint.h> 5 + 6 + long sys_clonefileat(int src_fd, const char* src_path, int dest_fd, const char* dest_path, uint32_t flags); 7 + long sys_fclonefileat(int src_fd, int dest_fd, const char* dest_path, uint32_t flags); 8 + 9 + #endif // LINUX_CLONEFILE_H
+3
src/kernel/emulation/linux/syscalls.c
··· 124 124 #include "misc/fileport_makeport.h" 125 125 #include "misc/fileport_makefd.h" 126 126 #include "misc/csrctl.h" 127 + #include "misc/clonefile.h" 127 128 #include "synch/semwait_signal.h" 128 129 #include "fcntl/open.h" 129 130 #include "fcntl/openat.h" ··· 453 454 [442] = sys_guarded_close_np, 454 455 [443] = sys_guarded_kqueue_np, 455 456 [461] = sys_getattrlistbulk, 457 + [462] = sys_clonefileat, 456 458 [463] = sys_openat, 457 459 [464] = sys_openat_nocancel, 458 460 [465] = sys_renameat, ··· 471 473 [500] = sys_getentropy, 472 474 [515] = sys_ulock_wait, 473 475 [516] = sys_ulock_wake, 476 + [517] = sys_fclonefileat, 474 477 [521] = sys_abort_with_payload, 475 478 [524] = sys_setattrlistat, 476 479 };