ntoskrnl: Set the PendingReturned field in IoCompleteRequest().

Signed-off-by: Zebediah Figura <zfigura@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Zebediah Figura 2021-08-24 16:11:44 -05:00 committed by Alexandre Julliard
parent b332f96208
commit 14d1855a0c
2 changed files with 5 additions and 6 deletions

View File

@ -1989,6 +1989,7 @@ VOID WINAPI IoCompleteRequest( IRP *irp, UCHAR priority_boost )
device = IoGetCurrentIrpStackLocation(irp)->DeviceObject;
else
device = NULL;
irp->PendingReturned = !!(irpsp->Control & SL_PENDING_RETURNED);
if (call_flag)
{
TRACE( "calling %p( %p, %p, %p )\n", routine, device, irp, irpsp->Context );

View File

@ -1746,9 +1746,8 @@ static NTSTATUS WINAPI completion_cb(DEVICE_OBJECT *device, IRP *irp, void *cont
if (device == upper_device)
{
todo_wine_if (completion_lower_pending)
ok(irp->PendingReturned == completion_lower_pending, "Got PendingReturned %u, expected %u.\n",
irp->PendingReturned, completion_lower_pending);
ok(irp->PendingReturned == completion_lower_pending, "Got PendingReturned %u, expected %u.\n",
irp->PendingReturned, completion_lower_pending);
ok(irp->CurrentLocation == 2, "Got current location %u.\n", irp->CurrentLocation);
ok(stack->Control == (SL_INVOKE_ON_CANCEL | SL_INVOKE_ON_ERROR | SL_INVOKE_ON_SUCCESS),
@ -1763,9 +1762,8 @@ static NTSTATUS WINAPI completion_cb(DEVICE_OBJECT *device, IRP *irp, void *cont
}
else
{
todo_wine_if (completion_upper_pending)
ok(irp->PendingReturned == completion_upper_pending, "Got PendingReturned %u, expected %u.\n",
irp->PendingReturned, completion_upper_pending);
ok(irp->PendingReturned == completion_upper_pending, "Got PendingReturned %u, expected %u.\n",
irp->PendingReturned, completion_upper_pending);
ok(irp->CurrentLocation == 3, "Got current location %u.\n", irp->CurrentLocation);
ok(!stack->Control, "Got control flags %#x.\n", stack->Control);