[VFATLIB]

- Fix default cluster size for floppy disks

svn path=/trunk/; revision=52275
This commit is contained in:
Cameron Gutman 2011-06-16 13:07:08 +00:00
parent 6220537b5f
commit 6e97490ee0

View file

@ -289,8 +289,16 @@ Fat12Format(IN HANDLE FileHandle,
/* Calculate cluster size */
if (ClusterSize == 0)
{
/* 4KB Cluster (Harddisk only) */
ClusterSize = 4096;
if (DiskGeometry.MediaType == FixedMedia)
{
/* 4KB Cluster (Harddisk only) */
ClusterSize = 4096;
}
else
{
/* 512 byte cluster (floppy) */
ClusterSize = 512;
}
}
SectorCount = PartitionInfo->PartitionLength.QuadPart >>