#include #include #include #include #include #include #include namespace kernel::filesystem { mount::mount(kstd::shared_ptr const & mount_dentry, kstd::shared_ptr const & root_dentry, kstd::shared_ptr const & fs, kstd::shared_ptr const & parent_mount) : m_mount_dentry(mount_dentry) , m_root_dentry(root_dentry) , m_filesystem(fs) , m_parent_mount(parent_mount) { if (!m_filesystem) { kapi::system::panic("[FILESYSTEM] mount initialized with null filesystem."); } } auto mount::get_mount_dentry() const -> kstd::shared_ptr const & { return m_mount_dentry; } auto mount::get_filesystem() const -> kstd::shared_ptr const & { return m_filesystem; } auto mount::get_root_dentry() const -> kstd::shared_ptr const & { return m_root_dentry; } auto mount::get_mount_path() const -> kstd::string { if (m_mount_dentry) { return m_mount_dentry->get_absolute_path(); } return "/"; } auto mount::get_parent_mount() const -> kstd::shared_ptr const & { return m_parent_mount; } } // namespace kernel::filesystem