Also zero out first sector of root dir when formatting FAT12 and FAT16

volumes

svn path=/trunk/; revision=8274
This commit is contained in:
Gé van Geldorp 2004-02-19 21:24:54 +00:00
parent 6bd07e5854
commit 59e447fc8f
2 changed files with 2 additions and 2 deletions

View 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;

View 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;