aboutsummaryrefslogtreecommitdiff
path: root/kernel/include/kernel/filesystem/inode.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'kernel/include/kernel/filesystem/inode.hpp')
-rw-r--r--kernel/include/kernel/filesystem/inode.hpp25
1 files changed, 5 insertions, 20 deletions
diff --git a/kernel/include/kernel/filesystem/inode.hpp b/kernel/include/kernel/filesystem/inode.hpp
index 5208be2b..d071a6bd 100644
--- a/kernel/include/kernel/filesystem/inode.hpp
+++ b/kernel/include/kernel/filesystem/inode.hpp
@@ -11,20 +11,9 @@ namespace kernel::filesystem
struct inode
{
/**
- @brief Represents the kind of an inode.
+ @brief Create an inode.
*/
- enum class inode_kind
- {
- regular,
- directory,
- device
- };
-
- /**
- @brief Create an inode with the given @p kind.
- @param kind The kind of the inode.
- */
- explicit inode(inode_kind kind);
+ inode() = default;
/**
@brief Virtual destructor for the inode.
@@ -55,23 +44,19 @@ namespace kernel::filesystem
@brief Returns whether the inode is a directory.
@return true if the inode is a directory, false otherwise.
*/
- [[nodiscard]] auto is_directory() const -> bool;
+ [[nodiscard]] virtual auto is_directory() const -> bool;
/**
@brief Returns whether the inode is a regular file.
@return true if the inode is a regular file, false otherwise.
*/
- [[nodiscard]] auto is_regular() const -> bool;
+ [[nodiscard]] virtual auto is_regular() const -> bool;
/**
@brief Returns whether the inode is a device.
@return true if the inode is a device, false otherwise.
*/
- [[nodiscard]] auto is_device() const -> bool;
-
- // TODO BA-FS26 avoid public member
- public:
- inode_kind m_kind{inode_kind::regular};
+ [[nodiscard]] virtual auto is_device() const -> bool;
};
} // namespace kernel::filesystem