Fixed synchronous I/O bug in ZwWriteFile

svn path=/trunk/; revision=74
This commit is contained in:
Rex Jolliff 1998-10-20 05:56:26 +00:00
parent 74ff8524ad
commit dc5f3e0195

View file

@ -112,7 +112,7 @@ NTSTATUS ZwReadFile(HANDLE FileHandle,
DPRINT("FileObject->DeviceObject %x\n",FileObject->DeviceObject); DPRINT("FileObject->DeviceObject %x\n",FileObject->DeviceObject);
Status = IoCallDriver(FileObject->DeviceObject,Irp); Status = IoCallDriver(FileObject->DeviceObject,Irp);
if (Status == STATUS_PENDING) if (Status == STATUS_PENDING && (FileObject->Flags & FO_SYNCHRONOUS_IO))
{ {
KeWaitForSingleObject(&Event,Executive,KernelMode,FALSE,NULL); KeWaitForSingleObject(&Event,Executive,KernelMode,FALSE,NULL);
Status = Irp->IoStatus.Status; Status = Irp->IoStatus.Status;
@ -198,6 +198,7 @@ NTSTATUS ZwWriteFile(HANDLE FileHandle,
KeWaitForSingleObject(&Event,Executive,KernelMode,FALSE,NULL); KeWaitForSingleObject(&Event,Executive,KernelMode,FALSE,NULL);
Status = Irp->IoStatus.Status; Status = Irp->IoStatus.Status;
} }
return(Status); return(Status);
} }