diff options
Diffstat (limited to 'kernel/src/filesystem/mount.cpp')
| -rw-r--r-- | kernel/src/filesystem/mount.cpp | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/kernel/src/filesystem/mount.cpp b/kernel/src/filesystem/mount.cpp index 67450b7..c474c8e 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) @@ -42,9 +40,13 @@ namespace kernel::filesystem 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_full_path(); + } + return "/"; } auto mount::get_parent_mount() const -> kstd::shared_ptr<mount> const & |
