diff options
Diffstat (limited to 'kernel/src/filesystem/mount.cpp')
| -rw-r--r-- | kernel/src/filesystem/mount.cpp | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/kernel/src/filesystem/mount.cpp b/kernel/src/filesystem/mount.cpp index 67450b7..749c86a 100644 --- a/kernel/src/filesystem/mount.cpp +++ b/kernel/src/filesystem/mount.cpp @@ -13,10 +13,8 @@ namespace kernel::filesystem { mount::mount(kstd::shared_ptr<dentry> const & mount_dentry, kstd::shared_ptr<dentry> const & root_dentry, - kstd::shared_ptr<filesystem> const & fs, std::string_view mount_path, - kstd::shared_ptr<mount> const & parent_mount) - : m_mount_path(mount_path) - , m_mount_dentry(mount_dentry) + kstd::shared_ptr<filesystem> const & fs, kstd::shared_ptr<mount> const & parent_mount) + : m_mount_dentry(mount_dentry) , m_root_dentry(root_dentry) , m_filesystem(fs) , m_parent_mount(parent_mount) @@ -37,14 +35,18 @@ namespace kernel::filesystem return m_filesystem; } - auto mount::root_dentry() const -> kstd::shared_ptr<dentry> const & + auto mount::get_root_dentry() const -> kstd::shared_ptr<dentry> const & { return m_root_dentry; } - auto mount::get_mount_path() const -> std::string_view + auto mount::get_mount_path() const -> kstd::string { - return m_mount_path.view(); + if (m_mount_dentry) + { + return m_mount_dentry->get_absolute_path(); + } + return "/"; } auto mount::get_parent_mount() const -> kstd::shared_ptr<mount> const & |
