- Fixed two really nasty bugs in I/O completion:
- The user buffer wasn't written for incomplete I/O (warning levels)
for METHOD_BUFFERED
- Incomplete I/Os (warning levels) took a completely wrong path for
completion.
Modified: trunk/reactos/ntoskrnl/io/irp.c
_____
Modified: trunk/reactos/ntoskrnl/io/irp.c
--- trunk/reactos/ntoskrnl/io/irp.c 2005-11-09 03:02:33 UTC (rev
19086)
+++ trunk/reactos/ntoskrnl/io/irp.c 2005-11-09 04:29:46 UTC (rev
19087)
@@ -159,7 +159,9 @@
if (Irp->Flags & IRP_BUFFERED_IO)
{
/* Check if we have an input buffer and if we suceeded */
- if (Irp->Flags & IRP_INPUT_OPERATION &&
NT_SUCCESS(Irp->IoStatus.Status))
+ if ((Irp->Flags & IRP_INPUT_OPERATION) &&
+ (Irp->IoStatus.Status != STATUS_VERIFY_REQUIRED) &&
+ !(NT_ERROR(Irp->IoStatus.Status)))
{
/* Copy the buffer back to the user */
RtlCopyMemory(Irp->UserBuffer,
@@ -191,10 +193,10 @@
#if 1
/* Check for Success but allow failure for Async IRPs */
- if (NT_SUCCESS(Irp->IoStatus.Status) ||
- (Irp->PendingReturned &&
- !SyncIrp &&
- (FileObject == NULL || FileObject->Flags & FO_SYNCHRONOUS_IO)))
+ if (!(NT_ERROR(Irp->IoStatus.Status)) ||
+ ((NT_ERROR(Irp->IoStatus.Status)) &&
+ (Irp->PendingReturned) && !(SyncIrp) &&
+ ((FileObject == NULL) || (FileObject->Flags &
FO_SYNCHRONOUS_IO))))
{
_SEH_TRY
{