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/include | |
| 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/include')
| -rw-r--r-- | kernel/include/kernel/filesystem/mount.hpp | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/kernel/include/kernel/filesystem/mount.hpp b/kernel/include/kernel/filesystem/mount.hpp index 232a9be..dd47ce7 100644 --- a/kernel/include/kernel/filesystem/mount.hpp +++ b/kernel/include/kernel/filesystem/mount.hpp @@ -1,23 +1,22 @@ #ifndef TEACH_OS_KERNEL_FILESYSTEM_MOUNT_HPP #define TEACH_OS_KERNEL_FILESYSTEM_MOUNT_HPP +#include "kernel/filesystem/dentry.hpp" #include "kernel/filesystem/filesystem.hpp" #include <kstd/memory> -#include <string_view> - namespace filesystem { struct mount { - mount(std::string_view const & path, kstd::shared_ptr<filesystem> const & fs); + mount(kstd::shared_ptr<dentry> const & mount_dentry, kstd::shared_ptr<filesystem> const & fs); - [[nodiscard]] auto path() const -> std::string_view; + [[nodiscard]] auto get_dentry() const -> kstd::shared_ptr<dentry>; [[nodiscard]] auto get_filesystem() const -> kstd::shared_ptr<filesystem> const &; private: - std::string_view m_path; + kstd::shared_ptr<dentry> m_dentry; kstd::shared_ptr<filesystem> m_filesystem{}; }; } // namespace filesystem |
