From e12f26f1739b11128f86fb379563a4a92ae977c1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?G=C3=A9=20van=20Geldorp?= Date: Thu, 6 Nov 2003 20:43:45 +0000 Subject: [PATCH] Copy number of bytes specified by driver in IoStatus.Information to output buffer (METHOD_BUFFERED) svn path=/trunk/; revision=6552 --- reactos/ntoskrnl/io/cleanup.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/reactos/ntoskrnl/io/cleanup.c b/reactos/ntoskrnl/io/cleanup.c index 8f8ab270329..4441bc7b8fe 100644 --- a/reactos/ntoskrnl/io/cleanup.c +++ b/reactos/ntoskrnl/io/cleanup.c @@ -38,7 +38,8 @@ VOID IoDeviceControlCompletion(PDEVICE_OBJECT DeviceObject, else { IoControlCode = IoStack->Parameters.DeviceIoControl.IoControlCode; - OutputBufferLength = IoStack->Parameters.DeviceIoControl.OutputBufferLength; + OutputBufferLength = NT_SUCCESS(Irp->IoStatus.Status) + ? Irp->IoStatus.Information : 0; } switch (IO_METHOD_FROM_CTL_CODE(IoControlCode))