fix(kernel/vfs): fully implement ustar driver implementation + mounting system

This commit is contained in:
2025-05-18 11:38:42 +00:00
parent 70a08e46bd
commit f06c0b19fa
7 changed files with 1209 additions and 120 deletions

View File

@ -18,7 +18,6 @@
#include <fs/ramfs.hpp>
#include "../../kernel.h"
#include <fs/ustar.hpp>
#include <ini.h>
namespace Subsystem::Linux
@ -78,13 +77,21 @@ namespace Subsystem::Linux
debug("path=%s", uPath);
ini_destroy(ini);
if (fs->Lookup(root, uPath) != false)
eNode ret = fs->Lookup(root, uPath);
if (ret != false)
{
root = fs->Lookup(root, uPath);
// if (TestAndInitializeUSTAR(moduleAddress, moduleSize, 0))
// {
// }
Node tar = ret;
FileSystemInfo *fsi = fs->Probe(tar);
if (fsi == nullptr)
{
warn("Couldn't probe rootfs %s", uPath);
__CreateStubRoot();
}
else
{
Node mnt = fs->Lookup(root, "/mnt");
auto node = fs->Mount(mnt, "linux", fsi, tar);
}
}
else
{