Allows programs which demand support for StorageDeviceSeekPenaltyProperty to function.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=51065 Signed-off-by: David Koolhoven david@koolhoven-home.net --- v6: Padding was noticed, this ensures padding is consistent. --- dlls/mountmgr.sys/device.c | 17 +++++++++++++++++ 1 file changed, 17 insertions(+)
diff --git a/dlls/mountmgr.sys/device.c b/dlls/mountmgr.sys/device.c index 04e8fe3c0f5..8e18ed7ff22 100644 --- a/dlls/mountmgr.sys/device.c +++ b/dlls/mountmgr.sys/device.c @@ -1894,6 +1894,23 @@ static NTSTATUS query_property( struct disk_device *device, IRP *irp )
break; } + case StorageDeviceSeekPenaltyProperty: + { + DEVICE_SEEK_PENALTY_DESCRIPTOR *descriptor; + FIXME( "Faking StorageDeviceSeekPenaltyProperty data with no penalty\n" ); + if (irpsp->Parameters.DeviceIoControl.OutputBufferLength < sizeof(DEVICE_SEEK_PENALTY_DESCRIPTOR)) { + status = STATUS_INVALID_PARAMETER; + break; + } + memset( irp->AssociatedIrp.SystemBuffer, 0, sizeof(DEVICE_SEEK_PENALTY_DESCRIPTOR) ); + descriptor = irp->AssociatedIrp.SystemBuffer; + descriptor->Version = sizeof(DEVICE_SEEK_PENALTY_DESCRIPTOR); + descriptor->Size = sizeof(DEVICE_SEEK_PENALTY_DESCRIPTOR); + descriptor->IncursSeekPenalty = FALSE; + status = STATUS_SUCCESS; + irp->IoStatus.Information = sizeof(DEVICE_SEEK_PENALTY_DESCRIPTOR); + break; + } default: FIXME( "Unsupported property %#x\n", query->PropertyId ); status = STATUS_NOT_SUPPORTED;