Renamed XVolumeInfo to X_FILE_FS_VOLUME_INFORMATION.
This commit is contained in:
parent
d60870e9eb
commit
9104e0a288
|
@ -20,7 +20,7 @@ Device::Device(const std::string& path) : path_(path) {}
|
||||||
Device::~Device() = default;
|
Device::~Device() = default;
|
||||||
|
|
||||||
// TODO(gibbed): call into HostPathDevice?
|
// TODO(gibbed): call into HostPathDevice?
|
||||||
X_STATUS Device::QueryVolume(XVolumeInfo* out_info, size_t length) {
|
X_STATUS Device::QueryVolume(X_FILE_FS_VOLUME_INFORMATION* out_info, size_t length) {
|
||||||
assert_not_null(out_info);
|
assert_not_null(out_info);
|
||||||
const char* name = "test"; // TODO(gibbed): actual value
|
const char* name = "test"; // TODO(gibbed): actual value
|
||||||
|
|
||||||
|
|
|
@ -30,7 +30,7 @@ class Device {
|
||||||
|
|
||||||
virtual std::unique_ptr<Entry> ResolvePath(const char* path) = 0;
|
virtual std::unique_ptr<Entry> ResolvePath(const char* path) = 0;
|
||||||
|
|
||||||
virtual X_STATUS QueryVolume(XVolumeInfo* out_info, size_t length);
|
virtual X_STATUS QueryVolume(X_FILE_FS_VOLUME_INFORMATION* out_info, size_t length);
|
||||||
virtual X_STATUS QueryFileSystemAttributes(XFileSystemAttributeInfo* out_info,
|
virtual X_STATUS QueryFileSystemAttributes(XFileSystemAttributeInfo* out_info,
|
||||||
size_t length);
|
size_t length);
|
||||||
|
|
||||||
|
|
|
@ -40,7 +40,7 @@ X_STATUS DiscImageFile::QueryDirectory(X_FILE_DIRECTORY_INFORMATION* out_info, s
|
||||||
return entry_->QueryDirectory(out_info, length, file_name, restart);
|
return entry_->QueryDirectory(out_info, length, file_name, restart);
|
||||||
}
|
}
|
||||||
|
|
||||||
X_STATUS DiscImageFile::QueryVolume(XVolumeInfo* out_info, size_t length) {
|
X_STATUS DiscImageFile::QueryVolume(X_FILE_FS_VOLUME_INFORMATION* out_info, size_t length) {
|
||||||
return entry_->device()->QueryVolume(out_info, length);
|
return entry_->device()->QueryVolume(out_info, length);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -32,7 +32,7 @@ class DiscImageFile : public XFile {
|
||||||
X_STATUS QueryInfo(X_FILE_NETWORK_OPEN_INFORMATION* out_info) override;
|
X_STATUS QueryInfo(X_FILE_NETWORK_OPEN_INFORMATION* out_info) override;
|
||||||
X_STATUS QueryDirectory(X_FILE_DIRECTORY_INFORMATION* out_info, size_t length,
|
X_STATUS QueryDirectory(X_FILE_DIRECTORY_INFORMATION* 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(X_FILE_FS_VOLUME_INFORMATION* out_info, size_t length) override;
|
||||||
X_STATUS QueryFileSystemAttributes(XFileSystemAttributeInfo* out_info,
|
X_STATUS QueryFileSystemAttributes(XFileSystemAttributeInfo* out_info,
|
||||||
size_t length) override;
|
size_t length) override;
|
||||||
|
|
||||||
|
|
|
@ -40,7 +40,7 @@ X_STATUS HostPathFile::QueryDirectory(X_FILE_DIRECTORY_INFORMATION* out_info, si
|
||||||
return entry_->QueryDirectory(out_info, length, file_name, restart);
|
return entry_->QueryDirectory(out_info, length, file_name, restart);
|
||||||
}
|
}
|
||||||
|
|
||||||
X_STATUS HostPathFile::QueryVolume(XVolumeInfo* out_info, size_t length) {
|
X_STATUS HostPathFile::QueryVolume(X_FILE_FS_VOLUME_INFORMATION* out_info, size_t length) {
|
||||||
return entry_->device()->QueryVolume(out_info, length);
|
return entry_->device()->QueryVolume(out_info, length);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -34,7 +34,7 @@ class HostPathFile : public XFile {
|
||||||
X_STATUS QueryInfo(X_FILE_NETWORK_OPEN_INFORMATION* out_info) override;
|
X_STATUS QueryInfo(X_FILE_NETWORK_OPEN_INFORMATION* out_info) override;
|
||||||
X_STATUS QueryDirectory(X_FILE_DIRECTORY_INFORMATION* out_info, size_t length,
|
X_STATUS QueryDirectory(X_FILE_DIRECTORY_INFORMATION* 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(X_FILE_FS_VOLUME_INFORMATION* out_info, size_t length) override;
|
||||||
X_STATUS QueryFileSystemAttributes(XFileSystemAttributeInfo* out_info,
|
X_STATUS QueryFileSystemAttributes(XFileSystemAttributeInfo* out_info,
|
||||||
size_t length) override;
|
size_t length) override;
|
||||||
|
|
||||||
|
|
|
@ -41,7 +41,7 @@ X_STATUS STFSContainerFile::QueryDirectory(X_FILE_DIRECTORY_INFORMATION* out_inf
|
||||||
return entry_->QueryDirectory(out_info, length, file_name, restart);
|
return entry_->QueryDirectory(out_info, length, file_name, restart);
|
||||||
}
|
}
|
||||||
|
|
||||||
X_STATUS STFSContainerFile::QueryVolume(XVolumeInfo* out_info, size_t length) {
|
X_STATUS STFSContainerFile::QueryVolume(X_FILE_FS_VOLUME_INFORMATION* out_info, size_t length) {
|
||||||
return entry_->device()->QueryVolume(out_info, length);
|
return entry_->device()->QueryVolume(out_info, length);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -32,7 +32,7 @@ class STFSContainerFile : public XFile {
|
||||||
X_STATUS QueryInfo(X_FILE_NETWORK_OPEN_INFORMATION* out_info) override;
|
X_STATUS QueryInfo(X_FILE_NETWORK_OPEN_INFORMATION* out_info) override;
|
||||||
X_STATUS QueryDirectory(X_FILE_DIRECTORY_INFORMATION* out_info, size_t length,
|
X_STATUS QueryDirectory(X_FILE_DIRECTORY_INFORMATION* 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(X_FILE_FS_VOLUME_INFORMATION* out_info, size_t length) override;
|
||||||
X_STATUS QueryFileSystemAttributes(XFileSystemAttributeInfo* out_info,
|
X_STATUS QueryFileSystemAttributes(XFileSystemAttributeInfo* out_info,
|
||||||
size_t length) override;
|
size_t length) override;
|
||||||
|
|
||||||
|
|
|
@ -22,7 +22,7 @@ class XFile;
|
||||||
class X_FILE_NETWORK_OPEN_INFORMATION;
|
class X_FILE_NETWORK_OPEN_INFORMATION;
|
||||||
class XFileSystemAttributeInfo;
|
class XFileSystemAttributeInfo;
|
||||||
class X_FILE_DIRECTORY_INFORMATION;
|
class X_FILE_DIRECTORY_INFORMATION;
|
||||||
class XVolumeInfo;
|
class X_FILE_FS_VOLUME_INFORMATION;
|
||||||
} // namespace kernel
|
} // namespace kernel
|
||||||
} // namespace xe
|
} // namespace xe
|
||||||
|
|
||||||
|
|
|
@ -84,8 +84,8 @@ class X_FILE_DIRECTORY_INFORMATION {
|
||||||
};
|
};
|
||||||
static_assert_size(X_FILE_DIRECTORY_INFORMATION, 72);
|
static_assert_size(X_FILE_DIRECTORY_INFORMATION, 72);
|
||||||
|
|
||||||
// http://msdn.microsoft.com/en-us/library/windows/hardware/ff540287(v=vs.85).aspx
|
// http://msdn.microsoft.com/en-us/library/windows/hardware/ff540287.aspx
|
||||||
class XVolumeInfo {
|
class X_FILE_FS_VOLUME_INFORMATION {
|
||||||
public:
|
public:
|
||||||
// FILE_FS_VOLUME_INFORMATION
|
// FILE_FS_VOLUME_INFORMATION
|
||||||
uint64_t creation_time;
|
uint64_t creation_time;
|
||||||
|
@ -103,7 +103,7 @@ class XVolumeInfo {
|
||||||
memcpy(dst + 20, this->label, this->label_length);
|
memcpy(dst + 20, this->label, this->label_length);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
static_assert_size(XVolumeInfo, 24);
|
static_assert_size(X_FILE_FS_VOLUME_INFORMATION, 24);
|
||||||
|
|
||||||
// https://msdn.microsoft.com/en-us/library/windows/hardware/ff540282(v=vs.85).aspx
|
// https://msdn.microsoft.com/en-us/library/windows/hardware/ff540282(v=vs.85).aspx
|
||||||
class XFileSystemSizeInfo {
|
class XFileSystemSizeInfo {
|
||||||
|
@ -158,7 +158,7 @@ class XFile : public XObject {
|
||||||
virtual X_STATUS QueryInfo(X_FILE_NETWORK_OPEN_INFORMATION* out_info) = 0;
|
virtual X_STATUS QueryInfo(X_FILE_NETWORK_OPEN_INFORMATION* out_info) = 0;
|
||||||
virtual X_STATUS QueryDirectory(X_FILE_DIRECTORY_INFORMATION* out_info, size_t length,
|
virtual X_STATUS QueryDirectory(X_FILE_DIRECTORY_INFORMATION* 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(X_FILE_FS_VOLUME_INFORMATION* out_info, size_t length) = 0;
|
||||||
virtual X_STATUS QueryFileSystemAttributes(XFileSystemAttributeInfo* out_info,
|
virtual X_STATUS QueryFileSystemAttributes(XFileSystemAttributeInfo* out_info,
|
||||||
size_t length) = 0;
|
size_t length) = 0;
|
||||||
|
|
||||||
|
|
|
@ -616,7 +616,7 @@ SHIM_CALL NtQueryVolumeInformationFile_shim(PPCContext* ppc_state,
|
||||||
result = X_STATUS_SUCCESS;
|
result = X_STATUS_SUCCESS;
|
||||||
switch (fs_info_class) {
|
switch (fs_info_class) {
|
||||||
case 1: { // FileFsVolumeInformation
|
case 1: { // FileFsVolumeInformation
|
||||||
auto volume_info = (XVolumeInfo*)calloc(length, 1);
|
auto volume_info = (X_FILE_FS_VOLUME_INFORMATION*)calloc(length, 1);
|
||||||
result = file->QueryVolume(volume_info, length);
|
result = file->QueryVolume(volume_info, length);
|
||||||
if (XSUCCEEDED(result)) {
|
if (XSUCCEEDED(result)) {
|
||||||
volume_info->Write(SHIM_MEM_BASE, fs_info_ptr);
|
volume_info->Write(SHIM_MEM_BASE, fs_info_ptr);
|
||||||
|
|
Loading…
Reference in New Issue