From cd64c1cfec761c5ddf8c0d9d26a41ac145f0f97e Mon Sep 17 00:00:00 2001 From: Bananymous Date: Mon, 24 Jul 2023 22:19:59 +0300 Subject: [PATCH] Kernel: add is_tty() to inode --- kernel/include/kernel/FS/Inode.h | 1 + kernel/include/kernel/Terminal/TTY.h | 1 + 2 files changed, 2 insertions(+) diff --git a/kernel/include/kernel/FS/Inode.h b/kernel/include/kernel/FS/Inode.h index 6c63d7328c..8f34ca5478 100644 --- a/kernel/include/kernel/FS/Inode.h +++ b/kernel/include/kernel/FS/Inode.h @@ -77,6 +77,7 @@ namespace Kernel virtual bool is_device() const { return false; } virtual bool is_pipe() const { return false; } + virtual bool is_tty() const { return false; } virtual BAN::ErrorOr link_target() { ASSERT_NOT_REACHED(); } diff --git a/kernel/include/kernel/Terminal/TTY.h b/kernel/include/kernel/Terminal/TTY.h index 29cddf3db1..bf83e7c6bb 100644 --- a/kernel/include/kernel/Terminal/TTY.h +++ b/kernel/include/kernel/Terminal/TTY.h @@ -109,6 +109,7 @@ namespace Kernel public: virtual dev_t rdev() const override { return m_rdev; } + virtual bool is_tty() const override { return true; } private: dev_t m_rdev;