diff --git a/reactos/lib/fslib/vfatlib/vfatlib.c b/reactos/lib/fslib/vfatlib/vfatlib.c index b2a27332d06..d466e581d4c 100755 --- a/reactos/lib/fslib/vfatlib/vfatlib.c +++ b/reactos/lib/fslib/vfatlib/vfatlib.c @@ -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) { diff --git a/reactos/subsys/system/usetup/usetup.c b/reactos/subsys/system/usetup/usetup.c index 42d678cd086..5765eb73af4 100644 --- a/reactos/subsys/system/usetup/usetup.c +++ b/reactos/subsys/system/usetup/usetup.c @@ -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;