diff options
Diffstat (limited to 'kernel/src/filesystem/vfs.cpp')
| -rw-r--r-- | kernel/src/filesystem/vfs.cpp | 21 |
1 files changed, 11 insertions, 10 deletions
diff --git a/kernel/src/filesystem/vfs.cpp b/kernel/src/filesystem/vfs.cpp index a111f23..2c4a4d5 100644 --- a/kernel/src/filesystem/vfs.cpp +++ b/kernel/src/filesystem/vfs.cpp @@ -38,10 +38,11 @@ namespace filesystem if (auto boot_device = storage_mgmt.determine_boot_device()) { active_vfs->m_root_fs = kstd::make_shared<ext2::ext2_filesystem>(); - if (active_vfs->do_mount("/", active_vfs->m_root_fs) != 0) - { - kapi::system::panic("[FILESYSTEM] Failed to mount root filesystem."); - } + active_vfs->m_root_dentry = kstd::make_shared<dentry>(nullptr, active_vfs->m_root_fs->root_inode()); + // if (active_vfs->do_mount("/", active_vfs->m_root_fs) != 0) + // { + // kapi::system::panic("[FILESYSTEM] Failed to mount root filesystem."); + // } // TODO BA-FS26 use do_mount when tempdevfs is implemented -> just call /dev/ with all devices in devtempfs std::ranges::for_each(storage_mgmt.all_controllers(), [&](auto controller) { @@ -92,12 +93,12 @@ namespace filesystem return -1; // TODO BA-FS26 panic or errorcode? } - if (path == "/") - { - m_root_fs = filesystem; - m_root_mount = mount{"/", filesystem}; - return 0; - } + // if (path == "/") + // { + // m_root_fs = filesystem; + // m_root_mount = mount{"/", filesystem}; + // return 0; + // } auto existing_mount = std::ranges::find_if(m_mount_table, [&](auto const & existing) { return existing.path() == path; }); |
