[Kernel/VFS] Specify root entry to open from + cleanup.

[VFS] Allow specifying root entry to open from with OpenFile.
[Kernel] NtCreateFile now opens from root entry when available instead
         of needlessly building a full path and resolving from that.
[VFS] Reduce code duplication by adding Entry::ResolvePath.
[VFS] Remove ResolveBasePath to avoid multiple calls to find_base_guest_path.
This commit is contained in:
gibbed
2020-04-20 00:44:19 -05:00
committed by Rick Gibbed
parent 725f3ce17f
commit 1c2d6753bb
9 changed files with 33 additions and 60 deletions

View File

@@ -37,12 +37,11 @@ class VirtualFileSystem {
bool FindSymbolicLink(const std::string_view path, std::string& target);
Entry* ResolvePath(const std::string_view path);
Entry* ResolveBasePath(const std::string_view path);
Entry* CreatePath(const std::string_view path, uint32_t attributes);
bool DeletePath(const std::string_view path);
X_STATUS OpenFile(const std::string_view path,
X_STATUS OpenFile(Entry* root_entry, const std::string_view path,
FileDisposition creation_disposition,
uint32_t desired_access, bool is_directory, File** out_file,
FileAction* out_action);