[XAM] Limit XContentQueryVolumeDeviceType to XContent packages
Some checks failed
Orchestrator / Commit Message Validation (push) Has been skipped
Orchestrator / Lint (push) Successful in 1m23s
Orchestrator / Windows (x86-64) (push) Failing after 5m18s
Orchestrator / Linux (x86-64) (push) Failing after 22m34s
Orchestrator / Create Release (push) Has been skipped
Some checks failed
Orchestrator / Commit Message Validation (push) Has been skipped
Orchestrator / Lint (push) Successful in 1m23s
Orchestrator / Windows (x86-64) (push) Failing after 5m18s
Orchestrator / Linux (x86-64) (push) Failing after 22m34s
Orchestrator / Create Release (push) Has been skipped
- Changed mount path for XContent packages from Cdrom to Package_0 Normally it should generate specific value instead of 0, but for now 0 is enough
This commit is contained in:
committed by
Radosław Gliński
parent
9478cda5d6
commit
99fd19d025
@@ -545,7 +545,7 @@ X_STATUS Emulator::LaunchPath(const std::filesystem::path& path) {
|
||||
case FileSignatureType::LIVE:
|
||||
case FileSignatureType::CON:
|
||||
case FileSignatureType::PIRS: {
|
||||
mount_result = MountPath(path, "\\Device\\Cdrom0");
|
||||
mount_result = MountPath(path, "\\Device\\Package_0");
|
||||
return mount_result ? mount_result : LaunchStfsContainer(path);
|
||||
} break;
|
||||
case FileSignatureType::XISO: {
|
||||
|
||||
@@ -111,6 +111,17 @@ X_HRESULT XamApp::DispatchMessageSync(uint32_t message, uint32_t buffer_ptr,
|
||||
}* data = reinterpret_cast<XContentQueryVolumeDeviceType*>(buffer);
|
||||
assert_true(buffer_length == sizeof(XContentQueryVolumeDeviceType));
|
||||
|
||||
std::string target;
|
||||
if (!kernel_state_->file_system()->FindSymbolicLink(
|
||||
std::string(data->root_name) + ':', target)) {
|
||||
return X_E_INVALIDARG;
|
||||
}
|
||||
|
||||
// Only apply this check to XContent packages
|
||||
if (!target.starts_with("\\Device\\Package_")) {
|
||||
return X_E_INVALIDARG;
|
||||
}
|
||||
|
||||
xe::be<DeviceType>* device_type_ptr =
|
||||
memory_->TranslateVirtual<xe::be<DeviceType>*>(
|
||||
static_cast<uint32_t>(data->device_type_ptr.get()));
|
||||
|
||||
Reference in New Issue
Block a user