diff options
| author | Lukas Oesch <lukasoesch20@gmail.com> | 2026-05-05 20:33:28 +0200 |
|---|---|---|
| committer | Lukas Oesch <lukasoesch20@gmail.com> | 2026-05-05 20:33:28 +0200 |
| commit | 7414148b662a33cf6c69f89b7b0c3162f6880d6c (patch) | |
| tree | f526d73349a14ad234c6b08339c7dfce0c159b1a /kernel/include | |
| parent | a0f1c6f2199f55d2faaa5d9eafa9f763b2b299e4 (diff) | |
| download | kernel-7414148b662a33cf6c69f89b7b0c3162f6880d6c.tar.xz kernel-7414148b662a33cf6c69f89b7b0c3162f6880d6c.zip | |
refactoring mount_table lookup
Diffstat (limited to 'kernel/include')
| -rw-r--r-- | kernel/include/kernel/filesystem/mount_table.hpp | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/kernel/include/kernel/filesystem/mount_table.hpp b/kernel/include/kernel/filesystem/mount_table.hpp index 00277ea..8e57d9e 100644 --- a/kernel/include/kernel/filesystem/mount_table.hpp +++ b/kernel/include/kernel/filesystem/mount_table.hpp @@ -39,13 +39,19 @@ namespace kernel::filesystem [[nodiscard]] auto remove_mount(std::string_view path) -> operation_result; /** - @brief Finds the mount with the longest prefix matching the given @p path. This method is used to determine which - mounted filesystem should handle a given path lookup. + @brief Finds the mount with the longest prefix matching the given @p path. @param path The path to match against the mount paths in the table. @return A pointer to the mount with the longest matching prefix, or a null pointer if no mount matches the path. */ [[nodiscard]] auto find_longest_prefix_mount(std::string_view path) const -> kstd::shared_ptr<mount>; + /** + @brief Finds the mount with the exact mount path matching the given @p path. + @param path The path to match against the mount paths in the table. + @return A pointer to the mount with the exact matching path, or a null pointer if no mount matches the path. + */ + [[nodiscard]] auto find_exact_mount(std::string_view path) const -> kstd::shared_ptr<mount>; + private: [[nodiscard]] auto has_child_mounts(kstd::shared_ptr<mount> const & parent_mount) const -> bool; |
