Kernel: Inode/Device detection is done with overridden bool functions

This commit is contained in:
Bananymous
2023-06-03 13:28:15 +03:00
parent 402ad85583
commit 9228df0f23
6 changed files with 7 additions and 26 deletions

View File

@@ -137,8 +137,6 @@ namespace Kernel
virtual dev_t dev() const override { return 0; }
virtual dev_t rdev() const override { return 0; }
virtual InodeType inode_type() const override { return InodeType::Ext2; }
virtual BAN::StringView name() const override { return m_name; }
virtual BAN::ErrorOr<BAN::String> link_target() override;

View File

@@ -49,12 +49,6 @@ namespace Kernel
mode_t mode;
};
enum class InodeType
{
Device,
Ext2,
};
public:
virtual ~Inode() {}
@@ -74,7 +68,7 @@ namespace Kernel
virtual dev_t dev() const = 0;
virtual dev_t rdev() const = 0;
virtual InodeType inode_type() const = 0;
virtual bool is_device() const { return false; }
virtual BAN::StringView name() const = 0;