Module: wine Branch: master Commit: 9392aaa17fa029a05dbae780b0b85644ec72a1ad URL: https://source.winehq.org/git/wine.git/?a=commit;h=9392aaa17fa029a05dbae780b...
Author: Zebediah Figura z.figura12@gmail.com Date: Thu Jun 6 11:12:52 2019 -0400
ntoskrnl.exe: Send PnP IRPs to the top of the device stack.
Signed-off-by: Zebediah Figura z.figura12@gmail.com Signed-off-by: Alexandre Julliard julliard@winehq.org
---
dlls/ntoskrnl.exe/pnp.c | 6 ++++++ 1 file changed, 6 insertions(+)
diff --git a/dlls/ntoskrnl.exe/pnp.c b/dlls/ntoskrnl.exe/pnp.c index 20e1538..e7303b6 100644 --- a/dlls/ntoskrnl.exe/pnp.c +++ b/dlls/ntoskrnl.exe/pnp.c @@ -176,6 +176,8 @@ static NTSTATUS get_device_id( DEVICE_OBJECT *device, BUS_QUERY_ID_TYPE type, WC IO_STATUS_BLOCK irp_status; IRP *irp;
+ device = IoGetAttachedDevice( device ); + if (!(irp = IoBuildSynchronousFsdRequest( IRP_MJ_PNP, device, NULL, 0, NULL, NULL, &irp_status ))) return STATUS_NO_MEMORY;
@@ -192,6 +194,8 @@ static NTSTATUS send_pnp_irp( DEVICE_OBJECT *device, UCHAR minor ) IO_STATUS_BLOCK irp_status; IRP *irp;
+ device = IoGetAttachedDevice( device ); + if (!(irp = IoBuildSynchronousFsdRequest( IRP_MJ_PNP, device, NULL, 0, NULL, NULL, &irp_status ))) return STATUS_NO_MEMORY;
@@ -291,6 +295,8 @@ static NTSTATUS send_power_irp( DEVICE_OBJECT *device, DEVICE_POWER_STATE power IO_STACK_LOCATION *irpsp; IRP *irp;
+ device = IoGetAttachedDevice( device ); + if (!(irp = IoBuildSynchronousFsdRequest( IRP_MJ_POWER, device, NULL, 0, NULL, NULL, &irp_status ))) return STATUS_NO_MEMORY;