correct bug in write operations

svn path=/trunk/; revision=1436
This commit is contained in:
jean 2000-11-23 15:53:37 +00:00
parent 565277e563
commit e53fb528db

View file

@ -1,4 +1,4 @@
/* $Id: rw.c,v 1.8 2000/09/12 10:12:13 jean Exp $ /* $Id: rw.c,v 1.9 2000/11/23 15:53:37 jean Exp $
* *
* COPYRIGHT: See COPYING in the top level directory * COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS kernel * PROJECT: ReactOS kernel
@ -220,7 +220,7 @@ NTSTATUS FsdWriteFile(PDEVICE_EXTENSION DeviceExt, PFILE_OBJECT FileObject,
FileOffset < WriteOffset / DeviceExt->BytesPerCluster; FileOffset < WriteOffset / DeviceExt->BytesPerCluster;
FileOffset++) FileOffset++)
{ {
CurrentCluster = GetNextCluster(DeviceExt,CurrentCluster); CurrentCluster = GetNextWriteCluster(DeviceExt,CurrentCluster);
} }
} }
CHECKPOINT; CHECKPOINT;
@ -266,7 +266,7 @@ NTSTATUS FsdWriteFile(PDEVICE_EXTENSION DeviceExt, PFILE_OBJECT FileObject,
else else
{ {
VFATWriteCluster(DeviceExt,Temp,CurrentCluster); VFATWriteCluster(DeviceExt,Temp,CurrentCluster);
CurrentCluster = GetNextCluster(DeviceExt, CurrentCluster); CurrentCluster = GetNextWriteCluster(DeviceExt, CurrentCluster);
} }
Length2 -= TempLength; Length2 -= TempLength;
Buffer = Buffer + TempLength; Buffer = Buffer + TempLength;
@ -294,7 +294,7 @@ NTSTATUS FsdWriteFile(PDEVICE_EXTENSION DeviceExt, PFILE_OBJECT FileObject,
else else
{ {
VFATWriteCluster(DeviceExt,Buffer,CurrentCluster); VFATWriteCluster(DeviceExt,Buffer,CurrentCluster);
CurrentCluster = GetNextCluster(DeviceExt, CurrentCluster); CurrentCluster = GetNextWriteCluster(DeviceExt, CurrentCluster);
} }
Buffer = Buffer + DeviceExt->BytesPerCluster; Buffer = Buffer + DeviceExt->BytesPerCluster;
Length2 -= DeviceExt->BytesPerCluster; Length2 -= DeviceExt->BytesPerCluster;