Fixed FAT32 cluster size calculation (GB instead of MB).

svn path=/trunk/; revision=5705
This commit is contained in:
Eric Kohl 2003-08-20 15:15:30 +00:00
parent bd5999bd1a
commit e9042b4e5a

View file

@ -429,17 +429,17 @@ VfatFormat(
/* Calculate cluster size */
if (ClusterSize == 0)
{
if (PartitionInfo.PartitionLength.QuadPart < 8ULL * 1024ULL * 1024ULL)
if (PartitionInfo.PartitionLength.QuadPart < 8ULL * 1024ULL * 1024ULL * 1024ULL)
{
/* Partition < 8GB ==> 4KB Cluster */
ClusterSize = 4096;
}
else if (PartitionInfo.PartitionLength.QuadPart < 16ULL * 1024ULL * 1024ULL)
else if (PartitionInfo.PartitionLength.QuadPart < 16ULL * 1024ULL * 1024ULL * 1024ULL)
{
/* Partition 8GB - 16GB ==> 8KB Cluster */
ClusterSize = 8192;
}
else if (PartitionInfo.PartitionLength.QuadPart < 32ULL * 1024ULL * 1024ULL)
else if (PartitionInfo.PartitionLength.QuadPart < 32ULL * 1024ULL * 1024ULL * 1024ULL)
{
/* Partition 16GB - 32GB ==> 16KB Cluster */
ClusterSize = 16384;