diff options
Diffstat (limited to 'kernel/src/filesystem/vfs.cpp')
| -rw-r--r-- | kernel/src/filesystem/vfs.cpp | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/kernel/src/filesystem/vfs.cpp b/kernel/src/filesystem/vfs.cpp index 1bd6fb5..a111f23 100644 --- a/kernel/src/filesystem/vfs.cpp +++ b/kernel/src/filesystem/vfs.cpp @@ -4,7 +4,7 @@ #include "kernel/devices/device.hpp" #include "kernel/devices/storage/storage_management.hpp" -#include "kernel/filesystem/custody.hpp" +#include "kernel/filesystem/dentry.hpp" #include "kernel/filesystem/device_inode.hpp" #include "kernel/filesystem/ext2/ext2_filesystem.hpp" #include "kernel/filesystem/filesystem.hpp" @@ -66,9 +66,9 @@ namespace filesystem auto vfs::open(std::string_view path) -> kstd::shared_ptr<open_file_description> { - if (auto custody = resolve_path(path)) + if (auto dentry = resolve_path(path)) { - return kstd::make_shared<open_file_description>(custody->get_inode()); + return kstd::make_shared<open_file_description>(dentry->get_inode()); } return nullptr; @@ -100,14 +100,14 @@ namespace filesystem } auto existing_mount = - std::ranges::find_if(m_mounts, [&](auto const & existing) { return existing.path() == path; }); - if (existing_mount != m_mounts.end()) + std::ranges::find_if(m_mount_table, [&](auto const & existing) { return existing.path() == path; }); + if (existing_mount != m_mount_table.end()) { *existing_mount = mount{path, filesystem}; } else { - m_mounts.push_back(mount{path, filesystem}); + m_mount_table.push_back(mount{path, filesystem}); } return 0; @@ -123,7 +123,7 @@ namespace filesystem m_device_nodes.push_back(device_node_entry{device->name().view(), kstd::make_shared<device_inode>(device)}); } - auto vfs::resolve_path(std::string_view path) -> std::optional<custody> + auto vfs::resolve_path(std::string_view path) -> std::optional<dentry> { // TODO BA-FS26 implement real path resolution with mounts and directories etc. // For now, just support device nodes at /dev/<device_name>. @@ -140,7 +140,7 @@ namespace filesystem if (entry != m_device_nodes.end()) { - return custody{nullptr, entry->value().node}; + return dentry{nullptr, entry->value().node}; } return std::nullopt; |
