diff options
| author | marcel.braun <marcel.braun@ost.ch> | 2026-03-24 16:53:21 +0100 |
|---|---|---|
| committer | Lukas Oesch <lukasoesch20@gmail.com> | 2026-03-26 21:19:00 +0100 |
| commit | b742349ba039d1a864462332bb7ae5a071afdec1 (patch) | |
| tree | aea94a31cc583215f0aa4a097778afb44023bc09 /kernel/src | |
| parent | 6110774495a10d1dd8766f8fa8597fb3bdc4aabd (diff) | |
| download | teachos-b742349ba039d1a864462332bb7ae5a071afdec1.tar.xz teachos-b742349ba039d1a864462332bb7ae5a071afdec1.zip | |
Refactor mount_table entry (mount) to use dentry as key instead of path
Diffstat (limited to 'kernel/src')
| -rw-r--r-- | kernel/src/filesystem/mount.cpp | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/kernel/src/filesystem/mount.cpp b/kernel/src/filesystem/mount.cpp index a2c501f..b65f331 100644 --- a/kernel/src/filesystem/mount.cpp +++ b/kernel/src/filesystem/mount.cpp @@ -2,6 +2,7 @@ #include "kapi/system.hpp" +#include "kernel/filesystem/dentry.hpp" #include "kernel/filesystem/filesystem.hpp" #include <kstd/memory> @@ -10,8 +11,8 @@ namespace filesystem { - mount::mount(std::string_view const & path, kstd::shared_ptr<filesystem> const & fs) - : m_path(path) + mount::mount(kstd::shared_ptr<dentry> const & mount_dentry, kstd::shared_ptr<filesystem> const & fs) + : m_dentry(mount_dentry) , m_filesystem(fs) { if (!m_filesystem) @@ -20,9 +21,9 @@ namespace filesystem } } - auto mount::path() const -> std::string_view + auto mount::get_dentry() const -> kstd::shared_ptr<dentry> { - return m_path; + return m_dentry; } auto mount::get_filesystem() const -> kstd::shared_ptr<filesystem> const & |
