Loosely based on query_property in dlls/mountmgr.sys/device.c.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=57790
The implementation uses memcpy because the program calls DeviceIoControl(STORAGE_PROPERTY_QUERY) with query type PropertyStandardQuery and the output buffer size hardcoded to 8 bytes and expects it to succeed.
From: Alex Henrie alexhenrie24@gmail.com
Loosely based on query_property in dlls/mountmgr.sys/device.c.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=57790 --- dlls/ntdll/unix/cdrom.c | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+)
diff --git a/dlls/ntdll/unix/cdrom.c b/dlls/ntdll/unix/cdrom.c index 9e651414e9a..6b5789e538d 100644 --- a/dlls/ntdll/unix/cdrom.c +++ b/dlls/ntdll/unix/cdrom.c @@ -3109,6 +3109,34 @@ NTSTATUS cdrom_DeviceIoControl( HANDLE device, HANDLE event, PIO_APC_ROUTINE apc status = GetInquiryData(fd, out_buffer, out_size); break;
+ case IOCTL_STORAGE_QUERY_PROPERTY: + { + STORAGE_PROPERTY_QUERY *query = in_buffer; + + if (in_size < sizeof(STORAGE_PROPERTY_QUERY)) + { + status = STATUS_INVALID_PARAMETER; + break; + } + + switch (query->PropertyId) + { + case StorageDeviceProperty: + { + STORAGE_DEVICE_DESCRIPTOR descriptor = { .Version = sizeof(descriptor), .Size = sizeof(descriptor), + .DeviceType = FILE_DEVICE_CD_ROM, .RemovableMedia = TRUE }; + FIXME("Faking StorageDeviceProperty data\n"); + io->Information = min(sizeof(descriptor), out_size); + memcpy(out_buffer, &descriptor, io->Information); + status = STATUS_SUCCESS; + break; + } + default: + FIXME("Unsupported property %#x\n", query->PropertyId); + } + break; + } + default: status = STATUS_NOT_SUPPORTED; }
Hi,
It looks like your patch introduced the new failures shown below. Please investigate and fix them before resubmitting your patch. If they are not new, fixing them anyway would help a lot. Otherwise please ask for the known failures list to be updated.
The tests also ran into some preexisting test failures. If you know how to fix them that would be helpful. See the TestBot job for the details:
The full results can be found at: https://testbot.winehq.org/JobDetails.pl?Key=151198
Your paranoid android.
=== debian11b (64 bit WoW report) ===
user32: input.c:4306: Test succeeded inside todo block: button_down_hwnd_todo 1: got MSG_TEST_WIN hwnd 0000000000E200FA, msg WM_LBUTTONDOWN, wparam 0x1, lparam 0x320032