Commit in reactos/drivers/fs/vfat on MAIN
rw.c+3-31.68 -> 1.69
- Store always offsets on cluster boundaries in FCB->LastOffset.

reactos/drivers/fs/vfat
rw.c 1.68 -> 1.69
diff -u -r1.68 -r1.69
--- rw.c	5 Aug 2004 02:48:18 -0000	1.68
+++ rw.c	31 Aug 2004 20:02:24 -0000	1.69
@@ -1,5 +1,5 @@
 
-/* $Id: rw.c,v 1.68 2004/08/05 02:48:18 navaraf Exp $
+/* $Id: rw.c,v 1.69 2004/08/31 20:02:24 hbirr Exp $
  *
  * COPYRIGHT:        See COPYING in the top level directory
  * PROJECT:          ReactOS kernel
@@ -301,7 +301,7 @@
 
     ExAcquireFastMutex(&Fcb->LastMutex);
     Fcb->LastCluster = StartCluster + (ClusterCount - 1);
-    Fcb->LastOffset = ReadOffset.u.LowPart + (ClusterCount - 1) * BytesPerCluster;
+    Fcb->LastOffset = ROUND_DOWN(ReadOffset.u.LowPart, BytesPerCluster) + (ClusterCount - 1) * BytesPerCluster;
     ExReleaseFastMutex(&Fcb->LastMutex);
 
     // Fire up the read command
@@ -511,7 +511,7 @@
 
       ExAcquireFastMutex(&Fcb->LastMutex);
       Fcb->LastCluster = StartCluster + (ClusterCount - 1);
-      Fcb->LastOffset = WriteOffset.u.LowPart + (ClusterCount - 1) * BytesPerCluster;
+      Fcb->LastOffset = ROUND_DOWN(WriteOffset.u.LowPart, BytesPerCluster) + (ClusterCount - 1) * BytesPerCluster;
       ExReleaseFastMutex(&Fcb->LastMutex);
 
       // Fire up the write command
CVSspam 0.2.8