Also zero out first sector of root dir when formatting FAT12 and FAT16
authorGé van Geldorp <ge@gse.nl>
Thu, 19 Feb 2004 21:24:54 +0000 (21:24 +0000)
committerGé van Geldorp <ge@gse.nl>
Thu, 19 Feb 2004 21:24:54 +0000 (21:24 +0000)
volumes

svn path=/trunk/; revision=8274

reactos/lib/fslib/vfatlib/fat12.c
reactos/lib/fslib/vfatlib/fat16.c

index f22cb01..16dca94 100644 (file)
@@ -223,7 +223,7 @@ Fat12WriteRootDirectory(IN HANDLE FileHandle,
   memset(Buffer, 0, 32 * 1024);
 
   Sectors = 32 * 1024 / BootSector->BytesPerSector;
-  for (i = 1; i < RootDirSectors; i += Sectors)
+  for (i = 0; i < RootDirSectors; i += Sectors)
     {
       /* Zero some sectors of the root directory */
       FileOffset.QuadPart = (FirstRootDirSector + i) * BootSector->BytesPerSector;
index d7a2877..0867d8a 100644 (file)
@@ -226,7 +226,7 @@ Fat16WriteRootDirectory(IN HANDLE FileHandle,
   memset(Buffer, 0, 32 * 1024);
 
   Sectors = 32 * 1024 / BootSector->BytesPerSector;
-  for (i = 1; i < RootDirSectors; i += Sectors)
+  for (i = 0; i < RootDirSectors; i += Sectors)
     {
       /* Zero some sectors of the root directory */
       FileOffset.QuadPart = (FirstRootDirSector + i) * BootSector->BytesPerSector;