From 84d4476650b31dbfc52becf2ff65ddce9d31c9ec Mon Sep 17 00:00:00 2001 From: Lukas Oesch Date: Tue, 24 Mar 2026 23:54:28 +0100 Subject: implement a rootfs to handle / mounts correctly --- kernel/src/filesystem/mount.cpp | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) (limited to 'kernel/src/filesystem/mount.cpp') diff --git a/kernel/src/filesystem/mount.cpp b/kernel/src/filesystem/mount.cpp index b65f331..d9937dc 100644 --- a/kernel/src/filesystem/mount.cpp +++ b/kernel/src/filesystem/mount.cpp @@ -11,8 +11,10 @@ namespace filesystem { - mount::mount(kstd::shared_ptr const & mount_dentry, kstd::shared_ptr const & fs) - : m_dentry(mount_dentry) + mount::mount(kstd::shared_ptr const & mount_dentry, kstd::shared_ptr const & root_dentry, + kstd::shared_ptr const & fs) + : m_mount_dentry(mount_dentry) + , m_root_dentry(root_dentry) , m_filesystem(fs) { if (!m_filesystem) @@ -21,13 +23,18 @@ namespace filesystem } } - auto mount::get_dentry() const -> kstd::shared_ptr + auto mount::get_mount_dentry() const -> kstd::shared_ptr { - return m_dentry; + return m_mount_dentry; } auto mount::get_filesystem() const -> kstd::shared_ptr const & { return m_filesystem; } + + auto mount::root_dentry() const -> kstd::shared_ptr const & + { + return m_root_dentry; + } } // namespace filesystem \ No newline at end of file -- cgit v1.2.3