fix(kernel/vfs): 🎉 a complete rewrite of the vfs

This is the fourth time re-writing the VFS, hope this will be the last. Tried to make it as modular as possible so this won't be necessary in the future. 🙏

This change required the entire kernel code to be modified.
This commit is contained in:
2025-05-13 15:59:12 +00:00
parent 83a7f83f81
commit 557c7e6235
83 changed files with 3252 additions and 2487 deletions

View File

@ -20,7 +20,7 @@
#include "tests/t.h"
#endif
#include <filesystem/ustar.hpp>
#include <fs/ustar.hpp>
#include <subsystems.hpp>
#include <kshell.hpp>
#include <power.hpp>
@ -70,11 +70,11 @@ int SpawnLinuxInit()
"/startup/init"};
const char *foundPath = nullptr;
FileNode *root = fs->GetRoot(1);
Node root = fs->GetRoot(1);
for (const std::string &path : fallbackPaths)
{
const char *str = path.c_str();
if (!fs->PathExists(str, root))
if (fs->Lookup(root, str) == false)
continue;
foundPath = str;
break;
@ -123,8 +123,6 @@ void KernelMainThread()
KPrint("Initializing Driver Manager");
DriverManager = new Driver::Manager;
TaskManager->CreateThread(thisProcess, Tasking::IP(Driver::ManagerDaemonWrapper))
->Rename("Device Service");
KPrint("Loading Drivers");
DriverManager->PreloadDrivers();