mirror of
https://github.com/reactos/reactos.git
synced 2024-12-28 10:04:49 +00:00
Use FAT16 for partitions smaller than 512MB and FAT32 for larger ones.
svn path=/trunk/; revision=5716
This commit is contained in:
parent
a5e1765aa6
commit
e2dd45fd4a
2 changed files with 11 additions and 3 deletions
|
@ -426,6 +426,14 @@ VfatFormat(
|
||||||
return Status;
|
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 */
|
/* Calculate cluster size */
|
||||||
if (ClusterSize == 0)
|
if (ClusterSize == 0)
|
||||||
{
|
{
|
||||||
|
|
|
@ -1596,16 +1596,16 @@ FormatPartitionPage (PINPUT_RECORD Ir)
|
||||||
PartEntry->PartInfo[0].PartitionType = PARTITION_HUGE;
|
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);
|
DPRINT1("%x\n", PartEntry->PartInfo[0].PartitionType);
|
||||||
PartEntry->PartInfo[0].PartitionType = PARTITION_XINT13;
|
PartEntry->PartInfo[0].PartitionType = PARTITION_XINT13;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
DPRINT1("%x\n", PartEntry->PartInfo[0].PartitionType);
|
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;
|
PartEntry->PartInfo[0].PartitionType = PARTITION_FAT32_XINT13;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
Loading…
Reference in a new issue