diff options
author | Anton Kling <anton@kling.gg> | 2023-11-17 21:24:33 +0100 |
---|---|---|
committer | Anton Kling <anton@kling.gg> | 2023-11-17 21:27:26 +0100 |
commit | 99e5c8e046dfff53c331eb35394bfbcab4629fd0 (patch) | |
tree | 690994f164306688bfb3346f218c79301c0f0452 /kernel/drivers/pst.c | |
parent | 6723c96863425bda541e321127f6944bf008446a (diff) |
Kernel: Add isatty syscall
Diffstat (limited to 'kernel/drivers/pst.c')
-rw-r--r-- | kernel/drivers/pst.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/kernel/drivers/pst.c b/kernel/drivers/pst.c index d063ec9..f8a0414 100644 --- a/kernel/drivers/pst.c +++ b/kernel/drivers/pst.c @@ -1,16 +1,19 @@ #include <drivers/pst.h> #include <fs/tmpfs.h> +#include <fs/vfs.h> int openpty(int *amaster, int *aslave, char *name, /*const struct termios*/ void *termp, /*const struct winsize*/ void *winp) { - (void)name; - (void)termp; - (void) winp; + (void)name; + (void)termp; + (void)winp; int fd[2]; pipe(fd); // This depends upon that pipe will support read and write // through the same fd. In reality this should not be the // case. + get_vfs_fd(fd[0])->is_tty = 1; + get_vfs_fd(fd[1])->is_tty = 1; *amaster = fd[0]; *aslave = fd[1]; return 0; |