[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:
@@ -263,8 +263,8 @@ object_ref<XFile> XFile::Restore(KernelState* kernel_state,
|
||||
vfs::File* vfs_file = nullptr;
|
||||
vfs::FileAction action;
|
||||
auto res = kernel_state->file_system()->OpenFile(
|
||||
abs_path, vfs::FileDisposition::kOpen, access, is_directory, &vfs_file,
|
||||
&action);
|
||||
nullptr, abs_path, vfs::FileDisposition::kOpen, access, is_directory,
|
||||
&vfs_file, &action);
|
||||
if (XFAILED(res)) {
|
||||
XELOGE("Failed to open XFile: error {:08X}", res);
|
||||
return object_ref<XFile>(file);
|
||||
|
||||
Reference in New Issue
Block a user