mirror of
https://github.com/Fennix-Project/Kernel.git
synced 2025-05-28 15:34:33 +00:00
Create an empty root if initrd failed to be loaded
This commit is contained in:
parent
149d8ba790
commit
28ec505b78
@ -426,6 +426,15 @@ EXTERNC NIF void Main()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (vfs->GetRootNode()->Children.size() == 0)
|
||||||
|
{
|
||||||
|
VirtualFileSystem::FileSystemOperations null_op = {
|
||||||
|
.Name = "null",
|
||||||
|
};
|
||||||
|
|
||||||
|
vfs->CreateRoot("/", &null_op);
|
||||||
|
}
|
||||||
|
|
||||||
if (!vfs->PathExists("/system"))
|
if (!vfs->PathExists("/system"))
|
||||||
vfs->Create("/system", NodeFlags::DIRECTORY);
|
vfs->Create("/system", NodeFlags::DIRECTORY);
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user