mirror of
https://github.com/ApfelTeeSaft/reactos.git
synced 2026-08-31 12:23:31 +00:00
Use FAT16 for partitions smaller than 512MB and FAT32 for larger ones.
svn path=/trunk/; revision=5716
This commit is contained in:
@@ -426,6 +426,14 @@ VfatFormat(
|
||||
return Status;
|
||||
}
|
||||
|
||||
if (PartitionInfo.PartitionLength.QuadPart < 512ULL * 1024ULL * 1024ULL)
|
||||
{
|
||||
DPRINT1("FIXME: Partition size is smaller than 512MB - use FAT16\n");
|
||||
NtClose(FileHandle);
|
||||
return STATUS_UNSUCCESSFUL;
|
||||
}
|
||||
|
||||
|
||||
/* Calculate cluster size */
|
||||
if (ClusterSize == 0)
|
||||
{
|
||||
|
||||
@@ -1596,16 +1596,16 @@ FormatPartitionPage (PINPUT_RECORD Ir)
|
||||
PartEntry->PartInfo[0].PartitionType = PARTITION_HUGE;
|
||||
}
|
||||
}
|
||||
else if (PartEntry->PartInfo[0].PartitionLength.QuadPart < (2ULL * 1024ULL * 1024ULL * 1024ULL))
|
||||
else if (PartEntry->PartInfo[0].PartitionLength.QuadPart < (512ULL * 1024ULL * 1024ULL))
|
||||
{
|
||||
/* FAT16 LBA partition (partition is smaller than 2GB) */
|
||||
/* FAT16 LBA partition (partition size is smaller than 512MB) */
|
||||
DPRINT1("%x\n", PartEntry->PartInfo[0].PartitionType);
|
||||
PartEntry->PartInfo[0].PartitionType = PARTITION_XINT13;
|
||||
}
|
||||
else
|
||||
{
|
||||
DPRINT1("%x\n", PartEntry->PartInfo[0].PartitionType);
|
||||
/* FAT32 LBA partition (partition is at least 2GB) */
|
||||
/* FAT32 LBA partition (partition size 512MB or larger) */
|
||||
PartEntry->PartInfo[0].PartitionType = PARTITION_FAT32_XINT13;
|
||||
}
|
||||
break;
|
||||
|
||||
Reference in New Issue
Block a user