fix(kernel/vfs): support multiple roots

This commit is contained in:
2025-04-08 05:04:04 +00:00
parent a1b58bacd8
commit 3315d79742
10 changed files with 118 additions and 39 deletions

View File

@ -175,12 +175,13 @@ namespace vfs
return nullptr;
}
FileNode *Virtual::CacheLookup(const char *Path)
FileNode *Virtual::CacheLookup(FileNode *Parent, const char *Path)
{
debug("Cache lookup for \"%s\"", Path);
FileNode *rootNode = thisProcess ? thisProcess->Info.RootNode : this->GetRoot(0);
if (Parent == nullptr)
Parent = thisProcess ? thisProcess->Info.RootNode : this->GetRoot(0);
FileNode *ret = CacheRecursiveSearch(rootNode, Path, false);
FileNode *ret = CacheRecursiveSearch(Parent, Path, false);
if (ret)
return ret;