diff options
author | Anton Kling <anton@kling.gg> | 2024-06-26 21:34:40 +0200 |
---|---|---|
committer | Anton Kling <anton@kling.gg> | 2024-06-26 21:34:40 +0200 |
commit | e15065fe45f8004adcc8b69bbbe680ced0d530a1 (patch) | |
tree | 19dab20babd5169a8266faf133d41a4ebd61f1f6 /kernel/syscalls/write.c | |
parent | 2e2f89c7508dede2c970e6061c2f66d4536162ca (diff) |
Kernel: Move all syscalls into one file
Diffstat (limited to 'kernel/syscalls/write.c')
-rw-r--r-- | kernel/syscalls/write.c | 13 |
1 files changed, 0 insertions, 13 deletions
diff --git a/kernel/syscalls/write.c b/kernel/syscalls/write.c deleted file mode 100644 index f88215d..0000000 --- a/kernel/syscalls/write.c +++ /dev/null @@ -1,13 +0,0 @@ -#include <errno.h> -#include <fs/vfs.h> -#include <syscalls.h> - -int syscall_write(int fd, const char *buf, size_t count) { - vfs_fd_t *fd_ptr = get_vfs_fd(fd, NULL); - if (!fd_ptr) { - return -EBADF; - } - int rc = vfs_pwrite(fd, (char *)buf, count, fd_ptr->offset); - fd_ptr->offset += rc; - return rc; -} |