diff options
| author | Lukas Oesch <lukas.oesch@ost.ch> | 2026-05-12 08:58:18 +0200 |
|---|---|---|
| committer | Lukas Oesch <lukas.oesch@ost.ch> | 2026-05-12 08:58:18 +0200 |
| commit | fee33c0b2e2ab91a008bec16e143fba755b51974 (patch) | |
| tree | 4a88dfc1c2fbab3ce7d670e4289bdaa5df77352d /kernel/src/filesystem/mount.cpp | |
| parent | 5853b580c74411ecf196d241449411e0d01f0532 (diff) | |
| parent | ac5213633721fcf0e72da814d7ef70c51090c3f9 (diff) | |
| download | kernel-fee33c0b2e2ab91a008bec16e143fba755b51974.tar.xz kernel-fee33c0b2e2ab91a008bec16e143fba755b51974.zip | |
Merge branch 'refactoring' into 'develop-BA-FS26'
Refactoring
See merge request teachos/kernel!32
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 & |
