Renamed XFileInfo to X_FILE_NETWORK_OPEN_INFORMATION.
This commit is contained in:
parent
e97ddc25db
commit
e3e2b1a6d9
|
@ -34,7 +34,7 @@ DiscImageEntry::DiscImageEntry(Device* device, const char* path,
|
||||||
|
|
||||||
DiscImageEntry::~DiscImageEntry() {}
|
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);
|
assert_not_null(out_info);
|
||||||
out_info->creation_time = 0;
|
out_info->creation_time = 0;
|
||||||
out_info->last_access_time = 0;
|
out_info->last_access_time = 0;
|
||||||
|
|
|
@ -30,7 +30,7 @@ class DiscImageEntry : public Entry {
|
||||||
MappedMemory* mmap() const { return mmap_; }
|
MappedMemory* mmap() const { return mmap_; }
|
||||||
GDFXEntry* gdfx_entry() const { return gdfx_entry_; }
|
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,
|
X_STATUS QueryDirectory(XDirectoryInfo* out_info, size_t length,
|
||||||
const char* file_name, bool restart) override;
|
const char* file_name, bool restart) override;
|
||||||
|
|
||||||
|
|
|
@ -31,7 +31,7 @@ const std::string& DiscImageFile::name() const { return entry_->name(); }
|
||||||
|
|
||||||
Device* DiscImageFile::device() const { return entry_->device(); }
|
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);
|
return entry_->QueryInfo(out_info);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -29,7 +29,7 @@ class DiscImageFile : public XFile {
|
||||||
|
|
||||||
Device* device() const override;
|
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,
|
X_STATUS QueryDirectory(XDirectoryInfo* out_info, size_t length,
|
||||||
const char* file_name, bool restart) override;
|
const char* file_name, bool restart) override;
|
||||||
X_STATUS QueryVolume(XVolumeInfo* out_info, size_t length) override;
|
X_STATUS QueryVolume(XVolumeInfo* out_info, size_t length) override;
|
||||||
|
|
|
@ -40,7 +40,7 @@ HostPathEntry::~HostPathEntry() {
|
||||||
|
|
||||||
#define COMBINE_TIME(t) (((uint64_t)t.dwHighDateTime << 32) | t.dwLowDateTime)
|
#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);
|
assert_not_null(out_info);
|
||||||
|
|
||||||
WIN32_FILE_ATTRIBUTE_DATA data;
|
WIN32_FILE_ATTRIBUTE_DATA data;
|
||||||
|
|
|
@ -24,7 +24,7 @@ class HostPathEntry : public Entry {
|
||||||
|
|
||||||
const std::wstring& local_path() { return local_path_; }
|
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,
|
X_STATUS QueryDirectory(XDirectoryInfo* out_info, size_t length,
|
||||||
const char* file_name, bool restart) override;
|
const char* file_name, bool restart) override;
|
||||||
|
|
||||||
|
|
|
@ -31,7 +31,7 @@ const std::string& HostPathFile::name() const { return entry_->name(); }
|
||||||
|
|
||||||
Device* HostPathFile::device() const { return entry_->device(); }
|
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);
|
return entry_->QueryInfo(out_info);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -31,7 +31,7 @@ class HostPathFile : public XFile {
|
||||||
|
|
||||||
Device* device() const override;
|
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,
|
X_STATUS QueryDirectory(XDirectoryInfo* out_info, size_t length,
|
||||||
const char* file_name, bool restart) override;
|
const char* file_name, bool restart) override;
|
||||||
X_STATUS QueryVolume(XVolumeInfo* out_info, size_t length) override;
|
X_STATUS QueryVolume(XVolumeInfo* out_info, size_t length) override;
|
||||||
|
|
|
@ -25,7 +25,7 @@ STFSContainerEntry::STFSContainerEntry(Device* device, const char* path,
|
||||||
|
|
||||||
STFSContainerEntry::~STFSContainerEntry() = default;
|
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);
|
assert_not_null(out_info);
|
||||||
out_info->creation_time = stfs_entry_->update_timestamp;
|
out_info->creation_time = stfs_entry_->update_timestamp;
|
||||||
out_info->last_access_time = stfs_entry_->access_timestamp;
|
out_info->last_access_time = stfs_entry_->access_timestamp;
|
||||||
|
|
|
@ -31,7 +31,7 @@ class STFSContainerEntry : public Entry {
|
||||||
MappedMemory* mmap() const { return mmap_; }
|
MappedMemory* mmap() const { return mmap_; }
|
||||||
STFSEntry* stfs_entry() const { return stfs_entry_; }
|
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,
|
X_STATUS QueryDirectory(XDirectoryInfo* out_info, size_t length,
|
||||||
const char* file_name, bool restart) override;
|
const char* file_name, bool restart) override;
|
||||||
|
|
||||||
|
|
|
@ -31,7 +31,7 @@ const std::string& STFSContainerFile::name() const { return entry_->name(); }
|
||||||
|
|
||||||
Device* STFSContainerFile::device() const { return entry_->device(); }
|
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);
|
return entry_->QueryInfo(out_info);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -29,7 +29,7 @@ class STFSContainerFile : public XFile {
|
||||||
|
|
||||||
Device* device() const override;
|
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,
|
X_STATUS QueryDirectory(XDirectoryInfo* out_info, size_t length,
|
||||||
const char* file_name, bool restart) override;
|
const char* file_name, bool restart) override;
|
||||||
X_STATUS QueryVolume(XVolumeInfo* out_info, size_t length) override;
|
X_STATUS QueryVolume(XVolumeInfo* out_info, size_t length) override;
|
||||||
|
|
|
@ -19,7 +19,7 @@ namespace xe {
|
||||||
namespace kernel {
|
namespace kernel {
|
||||||
class KernelState;
|
class KernelState;
|
||||||
class XFile;
|
class XFile;
|
||||||
class XFileInfo;
|
class X_FILE_NETWORK_OPEN_INFORMATION;
|
||||||
class XFileSystemAttributeInfo;
|
class XFileSystemAttributeInfo;
|
||||||
class XDirectoryInfo;
|
class XDirectoryInfo;
|
||||||
class XVolumeInfo;
|
class XVolumeInfo;
|
||||||
|
@ -63,7 +63,7 @@ class Entry {
|
||||||
|
|
||||||
bool is_read_only() const;
|
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,
|
virtual X_STATUS QueryDirectory(XDirectoryInfo* out_info, size_t length,
|
||||||
const char* file_name, bool restart) = 0;
|
const char* file_name, bool restart) = 0;
|
||||||
|
|
||||||
|
|
|
@ -20,7 +20,8 @@ namespace kernel {
|
||||||
class XAsyncRequest;
|
class XAsyncRequest;
|
||||||
class XEvent;
|
class XEvent;
|
||||||
|
|
||||||
class XFileInfo {
|
// https://msdn.microsoft.com/en-us/library/windows/hardware/ff545822.aspx
|
||||||
|
class X_FILE_NETWORK_OPEN_INFORMATION {
|
||||||
public:
|
public:
|
||||||
// FILE_NETWORK_OPEN_INFORMATION
|
// FILE_NETWORK_OPEN_INFORMATION
|
||||||
uint64_t creation_time;
|
uint64_t creation_time;
|
||||||
|
@ -153,7 +154,7 @@ class XFile : public XObject {
|
||||||
size_t position() const { return position_; }
|
size_t position() const { return position_; }
|
||||||
void set_position(size_t value) { position_ = value; }
|
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,
|
virtual X_STATUS QueryDirectory(XDirectoryInfo* out_info, size_t length,
|
||||||
const char* file_name, bool restart) = 0;
|
const char* file_name, bool restart) = 0;
|
||||||
virtual X_STATUS QueryVolume(XVolumeInfo* out_info, size_t length) = 0;
|
virtual X_STATUS QueryVolume(XVolumeInfo* out_info, size_t length) = 0;
|
||||||
|
|
|
@ -60,7 +60,7 @@ X_STATUS XUserModule::LoadFromFile(std::string path) {
|
||||||
// Load the module.
|
// Load the module.
|
||||||
result = LoadFromMemory(mmap->address(), mmap->length());
|
result = LoadFromMemory(mmap->address(), mmap->length());
|
||||||
} else {
|
} else {
|
||||||
XFileInfo file_info;
|
X_FILE_NETWORK_OPEN_INFORMATION file_info;
|
||||||
result = fs_entry->QueryInfo(&file_info);
|
result = fs_entry->QueryInfo(&file_info);
|
||||||
if (result) {
|
if (result) {
|
||||||
if (file) {
|
if (file) {
|
||||||
|
|
|
@ -506,7 +506,7 @@ SHIM_CALL NtQueryInformationFile_shim(PPCContext* ppc_state,
|
||||||
// ULONG Unknown;
|
// ULONG Unknown;
|
||||||
// };
|
// };
|
||||||
assert_true(length == 56);
|
assert_true(length == 56);
|
||||||
XFileInfo file_info;
|
X_FILE_NETWORK_OPEN_INFORMATION file_info;
|
||||||
result = file->QueryInfo(&file_info);
|
result = file->QueryInfo(&file_info);
|
||||||
if (XSUCCEEDED(result)) {
|
if (XSUCCEEDED(result)) {
|
||||||
info = 56;
|
info = 56;
|
||||||
|
@ -583,7 +583,7 @@ SHIM_CALL NtQueryFullAttributesFile_shim(PPCContext* ppc_state,
|
||||||
auto entry = fs->ResolvePath(object_name);
|
auto entry = fs->ResolvePath(object_name);
|
||||||
if (entry) {
|
if (entry) {
|
||||||
// Found.
|
// Found.
|
||||||
XFileInfo file_info;
|
X_FILE_NETWORK_OPEN_INFORMATION file_info;
|
||||||
result = entry->QueryInfo(&file_info);
|
result = entry->QueryInfo(&file_info);
|
||||||
if (XSUCCEEDED(result)) {
|
if (XSUCCEEDED(result)) {
|
||||||
file_info.Write(SHIM_MEM_BASE, file_info_ptr);
|
file_info.Write(SHIM_MEM_BASE, file_info_ptr);
|
||||||
|
|
Loading…
Reference in New Issue