aboutsummaryrefslogtreecommitdiff
path: root/kernel/src/filesystem/mount_table.cpp
diff options
context:
space:
mode:
authorMarcel Braun <marcel.braun@ost.ch>2026-05-10 21:58:54 +0200
committerLukas Oesch <lukasoesch20@gmail.com>2026-05-11 22:36:03 +0200
commit763227e31adf924a5dfe3139db158e26162294a0 (patch)
treee80a1fff2eeec2c73a1f9ba734fd7447285d3de9 /kernel/src/filesystem/mount_table.cpp
parent636551d03ac725e015dd88631d531c02067ed3de (diff)
downloadkernel-763227e31adf924a5dfe3139db158e26162294a0.tar.xz
kernel-763227e31adf924a5dfe3139db158e26162294a0.zip
Remove find_longest_prefix_mount
Diffstat (limited to 'kernel/src/filesystem/mount_table.cpp')
-rw-r--r--kernel/src/filesystem/mount_table.cpp24
1 files changed, 0 insertions, 24 deletions
diff --git a/kernel/src/filesystem/mount_table.cpp b/kernel/src/filesystem/mount_table.cpp
index b67e05c..30a94f4 100644
--- a/kernel/src/filesystem/mount_table.cpp
+++ b/kernel/src/filesystem/mount_table.cpp
@@ -82,30 +82,6 @@ namespace kernel::filesystem
return operation_result::removed;
}
- // TODO BA-FS26 remove?
- auto mount_table::find_longest_prefix_mount(std::string_view path) const -> kstd::shared_ptr<mount>
- {
- kstd::shared_ptr<mount> mount_with_longest_prefix = nullptr;
- std::size_t best_len = 0;
-
- for (auto const & mount : m_mounts)
- {
- auto mp = mount->get_mount_path();
-
- // /a/b/c should match /a/b but not /a/bb or /a/b/c/d, / should match everything
- bool is_prefix = path.starts_with(mp.view()) && (mp == "/" || path.size() == mp.size() || path[mp.size()] == '/');
- bool visible = is_visible_mount(mount, m_mounts);
-
- if (is_prefix && visible && mp.size() >= best_len)
- {
- mount_with_longest_prefix = mount;
- best_len = mp.size();
- }
- }
-
- return mount_with_longest_prefix;
- }
-
auto mount_table::find_exact_mount(std::string_view path) const -> kstd::shared_ptr<mount>
{
auto reversed_mounts = std::ranges::reverse_view(m_mounts);