[PATCH 2/5] ntoskrnl: Copy the IRP I/O status block to the user I/O status block in IoCompleteRequest().
Zebediah Figura
z.figura12 at gmail.com
Wed Feb 10 17:13:25 CST 2021
Signed-off-by: Zebediah Figura <z.figura12 at gmail.com>
---
dlls/ntoskrnl.exe/ntoskrnl.c | 1 +
dlls/ntoskrnl.exe/tests/driver.c | 4 ++--
2 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/dlls/ntoskrnl.exe/ntoskrnl.c b/dlls/ntoskrnl.exe/ntoskrnl.c
index e003de33c2d..ee95155f301 100644
--- a/dlls/ntoskrnl.exe/ntoskrnl.c
+++ b/dlls/ntoskrnl.exe/ntoskrnl.c
@@ -2023,6 +2023,7 @@ VOID WINAPI IoCompleteRequest( IRP *irp, UCHAR priority_boost )
if (irp->Flags & IRP_DEALLOCATE_BUFFER)
HeapFree( GetProcessHeap(), 0, irp->AssociatedIrp.SystemBuffer );
+ if (irp->UserIosb) *irp->UserIosb = irp->IoStatus;
if (irp->UserEvent) KeSetEvent( irp->UserEvent, IO_NO_INCREMENT, FALSE );
IoFreeIrp( irp );
diff --git a/dlls/ntoskrnl.exe/tests/driver.c b/dlls/ntoskrnl.exe/tests/driver.c
index 29fc838a012..d84d519ea95 100644
--- a/dlls/ntoskrnl.exe/tests/driver.c
+++ b/dlls/ntoskrnl.exe/tests/driver.c
@@ -877,8 +877,8 @@ static void test_call_driver(DEVICE_OBJECT *device)
irp->IoStatus.Status = STATUS_SUCCESS;
irp->IoStatus.Information = 123;
IoCompleteRequest(irp, IO_NO_INCREMENT);
- todo_wine ok(iosb.Status == STATUS_SUCCESS, "got status %#x\n", iosb.Status);
- todo_wine ok(iosb.Information == 123, "got information %#x\n", iosb.Information);
+ ok(iosb.Status == STATUS_SUCCESS, "got status %#x\n", iosb.Status);
+ ok(iosb.Information == 123, "got information %#x\n", iosb.Information);
KeInitializeEvent(&event, NotificationEvent, FALSE);
--
2.20.1
More information about the wine-devel
mailing list