diff options
| author | Lukas Oesch <lukasoesch20@gmail.com> | 2026-05-10 19:08:07 +0200 |
|---|---|---|
| committer | Lukas Oesch <lukasoesch20@gmail.com> | 2026-05-11 22:34:54 +0200 |
| commit | 00aa2c8695b81944798010d81d600038e1f1ef3d (patch) | |
| tree | 94c8fcfa182a18d5ec9b70f0fb4fe507225a1ac6 /kernel/src/filesystem/mount.cpp | |
| parent | e05b52111d952c626c29d92a862ee0d1dce180f3 (diff) | |
| download | kernel-00aa2c8695b81944798010d81d600038e1f1ef3d.tar.xz kernel-00aa2c8695b81944798010d81d600038e1f1ef3d.zip | |
remove mount_path from mount struct (retrieve path from m_mount_dentry)
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 & |
