summaryrefslogtreecommitdiff
path: root/kernel/syscalls/isatty.c
diff options
context:
space:
mode:
authorAnton Kling <anton@kling.gg>2024-06-26 21:34:40 +0200
committerAnton Kling <anton@kling.gg>2024-06-26 21:34:40 +0200
commite15065fe45f8004adcc8b69bbbe680ced0d530a1 (patch)
tree19dab20babd5169a8266faf133d41a4ebd61f1f6 /kernel/syscalls/isatty.c
parent2e2f89c7508dede2c970e6061c2f66d4536162ca (diff)
Kernel: Move all syscalls into one file
Diffstat (limited to 'kernel/syscalls/isatty.c')
-rw-r--r--kernel/syscalls/isatty.c14
1 files changed, 0 insertions, 14 deletions
diff --git a/kernel/syscalls/isatty.c b/kernel/syscalls/isatty.c
deleted file mode 100644
index de3e918..0000000
--- a/kernel/syscalls/isatty.c
+++ /dev/null
@@ -1,14 +0,0 @@
-#include <errno.h>
-#include <fs/vfs.h>
-#include <syscalls.h>
-
-int syscall_isatty(int fd) {
- vfs_fd_t *fd_ptr = get_vfs_fd(fd, NULL);
- if (!fd_ptr) {
- return -EBADF;
- }
- if (!fd_ptr->is_tty) {
- return -ENOTTY;
- }
- return 1;
-}