diff options
| author | Lukas Oesch <lukasoesch20@gmail.com> | 2026-05-10 19:08:07 +0200 |
|---|---|---|
| committer | Lukas Oesch <lukasoesch20@gmail.com> | 2026-05-11 22:34:54 +0200 |
| commit | 00aa2c8695b81944798010d81d600038e1f1ef3d (patch) | |
| tree | 94c8fcfa182a18d5ec9b70f0fb4fe507225a1ac6 /kernel/src/filesystem/vfs.cpp | |
| parent | e05b52111d952c626c29d92a862ee0d1dce180f3 (diff) | |
| download | kernel-00aa2c8695b81944798010d81d600038e1f1ef3d.tar.xz kernel-00aa2c8695b81944798010d81d600038e1f1ef3d.zip | |
remove mount_path from mount struct (retrieve path from m_mount_dentry)
Diffstat (limited to 'kernel/src/filesystem/vfs.cpp')
| -rw-r--r-- | kernel/src/filesystem/vfs.cpp | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/kernel/src/filesystem/vfs.cpp b/kernel/src/filesystem/vfs.cpp index 1410b2a..ea060a9 100644 --- a/kernel/src/filesystem/vfs.cpp +++ b/kernel/src/filesystem/vfs.cpp @@ -45,7 +45,7 @@ namespace kernel::filesystem root_fs->mount(nullptr); auto root_fs_root_dentry = kstd::make_shared<dentry>(nullptr, root_fs->root_inode(), "/"); - m_mount_table.add_mount(kstd::make_shared<mount>(nullptr, root_fs_root_dentry, root_fs, "/", nullptr)); + m_mount_table.add_mount(kstd::make_shared<mount>(nullptr, root_fs_root_dentry, root_fs, nullptr)); // Mount devfs at /dev in rootfs (temporary, will be shadowed) auto device_fs = kstd::make_shared<devfs::filesystem>(); @@ -142,9 +142,12 @@ namespace kernel::filesystem // TODO BA-FS26 refactoring, implement dentry lookup to get the parent mount... auto parent_mount = m_mount_table.find_longest_prefix_mount(mount_path.view()); + // auto parent_mount_dentry = mount_point_dentry->get_parent_mounted_dentry(); + // auto parent_mount = m_mount_table.find_exact_mount(parent_mount_dentry->get_full_path()); + auto new_fs_root = kstd::make_shared<dentry>(mount_point_dentry->get_parent(), fs->root_inode(), mount_point_dentry->get_name()); - auto new_mount = kstd::make_shared<mount>(mount_point_dentry, new_fs_root, fs, mount_path.view(), parent_mount); + auto new_mount = kstd::make_shared<mount>(mount_point_dentry, new_fs_root, fs, parent_mount); m_mount_table.add_mount(new_mount); } |
