diff --git a/src/xenia/kernel/fs/devices/disc_image_entry.cc b/src/xenia/kernel/fs/devices/disc_image_entry.cc index 9d0db7f0b..493ef7cde 100644 --- a/src/xenia/kernel/fs/devices/disc_image_entry.cc +++ b/src/xenia/kernel/fs/devices/disc_image_entry.cc @@ -34,7 +34,7 @@ DiscImageEntry::DiscImageEntry(Device* device, const char* path, DiscImageEntry::~DiscImageEntry() {} -X_STATUS DiscImageEntry::QueryInfo(XFileInfo* out_info) { +X_STATUS DiscImageEntry::QueryInfo(X_FILE_NETWORK_OPEN_INFORMATION* out_info) { assert_not_null(out_info); out_info->creation_time = 0; out_info->last_access_time = 0; diff --git a/src/xenia/kernel/fs/devices/disc_image_entry.h b/src/xenia/kernel/fs/devices/disc_image_entry.h index 79544ebc1..05bfe6129 100644 --- a/src/xenia/kernel/fs/devices/disc_image_entry.h +++ b/src/xenia/kernel/fs/devices/disc_image_entry.h @@ -30,7 +30,7 @@ class DiscImageEntry : public Entry { MappedMemory* mmap() const { return mmap_; } GDFXEntry* gdfx_entry() const { return gdfx_entry_; } - X_STATUS QueryInfo(XFileInfo* out_info) override; + X_STATUS QueryInfo(X_FILE_NETWORK_OPEN_INFORMATION* out_info) override; X_STATUS QueryDirectory(XDirectoryInfo* out_info, size_t length, const char* file_name, bool restart) override; diff --git a/src/xenia/kernel/fs/devices/disc_image_file.cc b/src/xenia/kernel/fs/devices/disc_image_file.cc index b643fb61a..d32a434a5 100644 --- a/src/xenia/kernel/fs/devices/disc_image_file.cc +++ b/src/xenia/kernel/fs/devices/disc_image_file.cc @@ -31,7 +31,7 @@ const std::string& DiscImageFile::name() const { return entry_->name(); } Device* DiscImageFile::device() const { return entry_->device(); } -X_STATUS DiscImageFile::QueryInfo(XFileInfo* out_info) { +X_STATUS DiscImageFile::QueryInfo(X_FILE_NETWORK_OPEN_INFORMATION* out_info) { return entry_->QueryInfo(out_info); } diff --git a/src/xenia/kernel/fs/devices/disc_image_file.h b/src/xenia/kernel/fs/devices/disc_image_file.h index 5c08475d5..4be9740d5 100644 --- a/src/xenia/kernel/fs/devices/disc_image_file.h +++ b/src/xenia/kernel/fs/devices/disc_image_file.h @@ -29,7 +29,7 @@ class DiscImageFile : public XFile { Device* device() const override; - X_STATUS QueryInfo(XFileInfo* out_info) override; + X_STATUS QueryInfo(X_FILE_NETWORK_OPEN_INFORMATION* out_info) override; X_STATUS QueryDirectory(XDirectoryInfo* out_info, size_t length, const char* file_name, bool restart) override; X_STATUS QueryVolume(XVolumeInfo* out_info, size_t length) override; diff --git a/src/xenia/kernel/fs/devices/host_path_entry.cc b/src/xenia/kernel/fs/devices/host_path_entry.cc index 48a5883ca..8263011d7 100644 --- a/src/xenia/kernel/fs/devices/host_path_entry.cc +++ b/src/xenia/kernel/fs/devices/host_path_entry.cc @@ -40,7 +40,7 @@ HostPathEntry::~HostPathEntry() { #define COMBINE_TIME(t) (((uint64_t)t.dwHighDateTime << 32) | t.dwLowDateTime) -X_STATUS HostPathEntry::QueryInfo(XFileInfo* out_info) { +X_STATUS HostPathEntry::QueryInfo(X_FILE_NETWORK_OPEN_INFORMATION* out_info) { assert_not_null(out_info); WIN32_FILE_ATTRIBUTE_DATA data; diff --git a/src/xenia/kernel/fs/devices/host_path_entry.h b/src/xenia/kernel/fs/devices/host_path_entry.h index c023a14be..e5e40914d 100644 --- a/src/xenia/kernel/fs/devices/host_path_entry.h +++ b/src/xenia/kernel/fs/devices/host_path_entry.h @@ -24,7 +24,7 @@ class HostPathEntry : public Entry { const std::wstring& local_path() { return local_path_; } - X_STATUS QueryInfo(XFileInfo* out_info) override; + X_STATUS QueryInfo(X_FILE_NETWORK_OPEN_INFORMATION* out_info) override; X_STATUS QueryDirectory(XDirectoryInfo* out_info, size_t length, const char* file_name, bool restart) override; diff --git a/src/xenia/kernel/fs/devices/host_path_file.cc b/src/xenia/kernel/fs/devices/host_path_file.cc index 73d95bfb8..0fc223936 100644 --- a/src/xenia/kernel/fs/devices/host_path_file.cc +++ b/src/xenia/kernel/fs/devices/host_path_file.cc @@ -31,7 +31,7 @@ const std::string& HostPathFile::name() const { return entry_->name(); } Device* HostPathFile::device() const { return entry_->device(); } -X_STATUS HostPathFile::QueryInfo(XFileInfo* out_info) { +X_STATUS HostPathFile::QueryInfo(X_FILE_NETWORK_OPEN_INFORMATION* out_info) { return entry_->QueryInfo(out_info); } diff --git a/src/xenia/kernel/fs/devices/host_path_file.h b/src/xenia/kernel/fs/devices/host_path_file.h index 3527441ff..48ac50a7b 100644 --- a/src/xenia/kernel/fs/devices/host_path_file.h +++ b/src/xenia/kernel/fs/devices/host_path_file.h @@ -31,7 +31,7 @@ class HostPathFile : public XFile { Device* device() const override; - X_STATUS QueryInfo(XFileInfo* out_info) override; + X_STATUS QueryInfo(X_FILE_NETWORK_OPEN_INFORMATION* out_info) override; X_STATUS QueryDirectory(XDirectoryInfo* out_info, size_t length, const char* file_name, bool restart) override; X_STATUS QueryVolume(XVolumeInfo* out_info, size_t length) override; diff --git a/src/xenia/kernel/fs/devices/stfs_container_entry.cc b/src/xenia/kernel/fs/devices/stfs_container_entry.cc index 4686b0854..ce1c30d74 100644 --- a/src/xenia/kernel/fs/devices/stfs_container_entry.cc +++ b/src/xenia/kernel/fs/devices/stfs_container_entry.cc @@ -25,7 +25,7 @@ STFSContainerEntry::STFSContainerEntry(Device* device, const char* path, STFSContainerEntry::~STFSContainerEntry() = default; -X_STATUS STFSContainerEntry::QueryInfo(XFileInfo* out_info) { +X_STATUS STFSContainerEntry::QueryInfo(X_FILE_NETWORK_OPEN_INFORMATION* out_info) { assert_not_null(out_info); out_info->creation_time = stfs_entry_->update_timestamp; out_info->last_access_time = stfs_entry_->access_timestamp; diff --git a/src/xenia/kernel/fs/devices/stfs_container_entry.h b/src/xenia/kernel/fs/devices/stfs_container_entry.h index 8cc1f132d..9d3839764 100644 --- a/src/xenia/kernel/fs/devices/stfs_container_entry.h +++ b/src/xenia/kernel/fs/devices/stfs_container_entry.h @@ -31,7 +31,7 @@ class STFSContainerEntry : public Entry { MappedMemory* mmap() const { return mmap_; } STFSEntry* stfs_entry() const { return stfs_entry_; } - X_STATUS QueryInfo(XFileInfo* out_info) override; + X_STATUS QueryInfo(X_FILE_NETWORK_OPEN_INFORMATION* out_info) override; X_STATUS QueryDirectory(XDirectoryInfo* out_info, size_t length, const char* file_name, bool restart) override; diff --git a/src/xenia/kernel/fs/devices/stfs_container_file.cc b/src/xenia/kernel/fs/devices/stfs_container_file.cc index 993b33551..8ab9e8a33 100644 --- a/src/xenia/kernel/fs/devices/stfs_container_file.cc +++ b/src/xenia/kernel/fs/devices/stfs_container_file.cc @@ -31,7 +31,7 @@ const std::string& STFSContainerFile::name() const { return entry_->name(); } Device* STFSContainerFile::device() const { return entry_->device(); } -X_STATUS STFSContainerFile::QueryInfo(XFileInfo* out_info) { +X_STATUS STFSContainerFile::QueryInfo(X_FILE_NETWORK_OPEN_INFORMATION* out_info) { return entry_->QueryInfo(out_info); } diff --git a/src/xenia/kernel/fs/devices/stfs_container_file.h b/src/xenia/kernel/fs/devices/stfs_container_file.h index 76d0950e5..5e37aeff4 100644 --- a/src/xenia/kernel/fs/devices/stfs_container_file.h +++ b/src/xenia/kernel/fs/devices/stfs_container_file.h @@ -29,7 +29,7 @@ class STFSContainerFile : public XFile { Device* device() const override; - X_STATUS QueryInfo(XFileInfo* out_info) override; + X_STATUS QueryInfo(X_FILE_NETWORK_OPEN_INFORMATION* out_info) override; X_STATUS QueryDirectory(XDirectoryInfo* out_info, size_t length, const char* file_name, bool restart) override; X_STATUS QueryVolume(XVolumeInfo* out_info, size_t length) override; diff --git a/src/xenia/kernel/fs/entry.h b/src/xenia/kernel/fs/entry.h index 0cb5bacbf..744e9bcf7 100644 --- a/src/xenia/kernel/fs/entry.h +++ b/src/xenia/kernel/fs/entry.h @@ -19,7 +19,7 @@ namespace xe { namespace kernel { class KernelState; class XFile; -class XFileInfo; +class X_FILE_NETWORK_OPEN_INFORMATION; class XFileSystemAttributeInfo; class XDirectoryInfo; class XVolumeInfo; @@ -63,7 +63,7 @@ class Entry { bool is_read_only() const; - virtual X_STATUS QueryInfo(XFileInfo* out_info) = 0; + virtual X_STATUS QueryInfo(X_FILE_NETWORK_OPEN_INFORMATION* out_info) = 0; virtual X_STATUS QueryDirectory(XDirectoryInfo* out_info, size_t length, const char* file_name, bool restart) = 0; diff --git a/src/xenia/kernel/objects/xfile.h b/src/xenia/kernel/objects/xfile.h index 6597082bc..b085cf882 100644 --- a/src/xenia/kernel/objects/xfile.h +++ b/src/xenia/kernel/objects/xfile.h @@ -20,7 +20,8 @@ namespace kernel { class XAsyncRequest; class XEvent; -class XFileInfo { +// https://msdn.microsoft.com/en-us/library/windows/hardware/ff545822.aspx +class X_FILE_NETWORK_OPEN_INFORMATION { public: // FILE_NETWORK_OPEN_INFORMATION uint64_t creation_time; @@ -153,7 +154,7 @@ class XFile : public XObject { size_t position() const { return position_; } void set_position(size_t value) { position_ = value; } - virtual X_STATUS QueryInfo(XFileInfo* out_info) = 0; + virtual X_STATUS QueryInfo(X_FILE_NETWORK_OPEN_INFORMATION* out_info) = 0; virtual X_STATUS QueryDirectory(XDirectoryInfo* out_info, size_t length, const char* file_name, bool restart) = 0; virtual X_STATUS QueryVolume(XVolumeInfo* out_info, size_t length) = 0; diff --git a/src/xenia/kernel/objects/xuser_module.cc b/src/xenia/kernel/objects/xuser_module.cc index c05cd9435..e9afb1053 100644 --- a/src/xenia/kernel/objects/xuser_module.cc +++ b/src/xenia/kernel/objects/xuser_module.cc @@ -60,7 +60,7 @@ X_STATUS XUserModule::LoadFromFile(std::string path) { // Load the module. result = LoadFromMemory(mmap->address(), mmap->length()); } else { - XFileInfo file_info; + X_FILE_NETWORK_OPEN_INFORMATION file_info; result = fs_entry->QueryInfo(&file_info); if (result) { if (file) { diff --git a/src/xenia/kernel/xboxkrnl_io.cc b/src/xenia/kernel/xboxkrnl_io.cc index cab02898a..c5ffd12fc 100644 --- a/src/xenia/kernel/xboxkrnl_io.cc +++ b/src/xenia/kernel/xboxkrnl_io.cc @@ -506,7 +506,7 @@ SHIM_CALL NtQueryInformationFile_shim(PPCContext* ppc_state, // ULONG Unknown; // }; assert_true(length == 56); - XFileInfo file_info; + X_FILE_NETWORK_OPEN_INFORMATION file_info; result = file->QueryInfo(&file_info); if (XSUCCEEDED(result)) { info = 56; @@ -583,7 +583,7 @@ SHIM_CALL NtQueryFullAttributesFile_shim(PPCContext* ppc_state, auto entry = fs->ResolvePath(object_name); if (entry) { // Found. - XFileInfo file_info; + X_FILE_NETWORK_OPEN_INFORMATION file_info; result = entry->QueryInfo(&file_info); if (XSUCCEEDED(result)) { file_info.Write(SHIM_MEM_BASE, file_info_ptr);