mirror of
https://github.com/reactos/reactos.git
synced 2025-08-04 16:26:02 +00:00
Added updating of FileObject->CurrentByteOffset in VfatRead()/VfatWrite.
svn path=/trunk/; revision=2152
This commit is contained in:
parent
b4a4e5c0be
commit
34b4c8f40b
1 changed files with 24 additions and 9 deletions
|
@ -1,5 +1,5 @@
|
|||
|
||||
/* $Id: rw.c,v 1.25 2001/07/20 08:00:20 ekohl Exp $
|
||||
/* $Id: rw.c,v 1.26 2001/08/04 11:02:47 hbirr Exp $
|
||||
*
|
||||
* COPYRIGHT: See COPYING in the top level directory
|
||||
* PROJECT: ReactOS kernel
|
||||
|
@ -369,7 +369,7 @@ VfatReadFile (PDEVICE_EXTENSION DeviceExt, PFILE_OBJECT FileObject,
|
|||
assert (FileObject != NULL);
|
||||
assert (FileObject->FsContext != NULL);
|
||||
|
||||
DPRINT("VfatReadFile(DeviceExt %x, FileObject %x, Buffer %x, "
|
||||
DPRINT1("VfatReadFile(DeviceExt %x, FileObject %x, Buffer %x, "
|
||||
"Length %d, ReadOffset 0x%x)\n", DeviceExt, FileObject, Buffer,
|
||||
Length, ReadOffset);
|
||||
|
||||
|
@ -786,7 +786,7 @@ VfatWriteFile (PDEVICE_EXTENSION DeviceExt, PFILE_OBJECT FileObject,
|
|||
NTSTATUS Status;
|
||||
BOOLEAN Extend;
|
||||
|
||||
DPRINT ("VfatWriteFile(FileObject %x, Buffer %x, Length %x, "
|
||||
DPRINT1 ("VfatWriteFile(FileObject %x, Buffer %x, Length %x, "
|
||||
"WriteOffset %x\n", FileObject, Buffer, Length, WriteOffset);
|
||||
|
||||
/* Locate the first cluster of the file */
|
||||
|
@ -965,6 +965,14 @@ VfatWrite (PDEVICE_OBJECT DeviceObject, PIRP Irp)
|
|||
Status = VfatWriteFile (DeviceExt, FileObject, Buffer, Length, Offset,
|
||||
NoCache);
|
||||
|
||||
if (FileObject->Flags & FO_SYNCHRONOUS_IO
|
||||
&& !(Irp->Flags & IRP_PAGING_IO)
|
||||
&& NT_SUCCESS(Status))
|
||||
{
|
||||
FileObject->CurrentByteOffset.QuadPart = Offset + Length;
|
||||
}
|
||||
|
||||
|
||||
Irp->IoStatus.Status = Status;
|
||||
Irp->IoStatus.Information = Length;
|
||||
IoCompleteRequest (Irp, IO_NO_INCREMENT);
|
||||
|
@ -1027,6 +1035,13 @@ VfatRead (PDEVICE_OBJECT DeviceObject, PIRP Irp)
|
|||
NoCache);
|
||||
}
|
||||
|
||||
if (FileObject->Flags & FO_SYNCHRONOUS_IO
|
||||
&& !(Irp->Flags & IRP_PAGING_IO)
|
||||
&& NT_SUCCESS(Status))
|
||||
{
|
||||
FileObject->CurrentByteOffset.QuadPart = Offset + LengthRead;
|
||||
}
|
||||
|
||||
Irp->IoStatus.Status = Status;
|
||||
Irp->IoStatus.Information = LengthRead;
|
||||
IoCompleteRequest (Irp, IO_NO_INCREMENT);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue