diff --git a/include/sys/amd64/sys_file.h b/include/sys/amd64/sys_file.h index dab0c30..2f636a6 100644 --- a/include/sys/amd64/sys_file.h +++ b/include/sys/amd64/sys_file.h @@ -36,6 +36,3 @@ int sys_chown(const char *path, uid_t uid, gid_t gid); off_t sys_lseek(int fd, off_t offset, int whence); int sys_ioctl(int fd, unsigned int cmd, void *arg); - -// XXX: Will be removed once ioctl(fd, TCGETS, ...) is possible -int sys_isatty(int fd); diff --git a/include/sys/syscall.h b/include/sys/syscall.h index ac713e7..30f0df2 100644 --- a/include/sys/syscall.h +++ b/include/sys/syscall.h @@ -18,7 +18,6 @@ #define SYSCALL_NR_READDIR 89 #define SYSCALL_NR_CHMOD 90 #define SYSCALL_NR_CHOWN 92 -#define SYSCALL_NRX_ISATTY 248 #define SYSCALL_NR_BRK 12 #define SYSCALL_NR_NANOSLEEP 35 diff --git a/sys/amd64/sys_file.c b/sys/amd64/sys_file.c index 0980641..60581a4 100644 --- a/sys/amd64/sys_file.c +++ b/sys/amd64/sys_file.c @@ -306,29 +306,3 @@ int sys_ioctl(int fd, unsigned int cmd, void *arg) { return vfs_ioctl(&thr->ioctx, of, cmd, arg); } - -int sys_isatty(int fd) { - struct thread *thr = get_cpu()->thread; - struct ofile *of; - _assert(thr); - - if (fd < 0 || fd >= THREAD_MAX_FDS) { - return -EBADF; - } - - if (!(of = thr->fds[fd])) { - return -EBADF; - } - - _assert(of->vnode); - if (of->vnode->type == VN_CHR) { - struct chrdev *chr = of->vnode->dev; - _assert(chr); - - // TODO: somehow check that this is a tty - // via flags - return 1; - } - - return -ENOTTY; -} diff --git a/sys/amd64/syscall.c b/sys/amd64/syscall.c index c087d9b..4708174 100644 --- a/sys/amd64/syscall.c +++ b/sys/amd64/syscall.c @@ -31,7 +31,6 @@ const void *amd64_syscall_jmp_table[256] = { [SYSCALL_NR_RMDIR] = sys_rmdir, [SYSCALL_NR_CHMOD] = sys_chmod, [SYSCALL_NR_CHOWN] = sys_chown, - [SYSCALL_NRX_ISATTY] = sys_isatty, // Process [SYSCALL_NR_EXIT] = sys_exit,