Author: ekohl
Date: Fri Jun 11 04:13:29 2010
New Revision: 47751
URL:
http://svn.reactos.org/svn/reactos?rev=47751&view=rev
Log:
[USETUP]
- Set the type of the install partition even if it was not created by usetup.
This fixes bug #4368.
Modified:
trunk/reactos/base/setup/usetup/interface/usetup.c
Modified: trunk/reactos/base/setup/usetup/interface/usetup.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/setup/usetup/interfac…
==============================================================================
--- trunk/reactos/base/setup/usetup/interface/usetup.c [iso-8859-1] (original)
+++ trunk/reactos/base/setup/usetup/interface/usetup.c [iso-8859-1] Fri Jun 11 04:13:29
2010
@@ -2310,56 +2310,53 @@
{
CONSOLE_SetStatusText(MUIGetString(STRING_PLEASEWAIT));
- if (PartEntry->PartInfo[PartNum].PartitionType == PARTITION_ENTRY_UNUSED)
- {
- if (wcscmp(FileSystemList->Selected->FileSystem, L"FAT")
== 0)
+ if (wcscmp(FileSystemList->Selected->FileSystem, L"FAT") ==
0)
+ {
+ if (PartEntry->PartInfo[PartNum].PartitionLength.QuadPart < (4200LL
* 1024LL))
{
- if (PartEntry->PartInfo[PartNum].PartitionLength.QuadPart <
(4200LL * 1024LL))
+ /* FAT12 CHS partition (disk is smaller than 4.1MB) */
+ PartEntry->PartInfo[PartNum].PartitionType = PARTITION_FAT_12;
+ }
+ else if (PartEntry->PartInfo[PartNum].StartingOffset.QuadPart <
(1024LL * 255LL * 63LL * 512LL))
+ {
+ /* Partition starts below the 8.4GB boundary ==> CHS partition */
+
+ if (PartEntry->PartInfo[PartNum].PartitionLength.QuadPart <
(32LL * 1024LL * 1024LL))
{
- /* FAT12 CHS partition (disk is smaller than 4.1MB) */
- PartEntry->PartInfo[PartNum].PartitionType =
PARTITION_FAT_12;
+ /* FAT16 CHS partition (partiton size < 32MB) */
+ PartEntry->PartInfo[PartNum].PartitionType =
PARTITION_FAT_16;
}
- else if (PartEntry->PartInfo[PartNum].StartingOffset.QuadPart <
(1024LL * 255LL * 63LL * 512LL))
+ else if (PartEntry->PartInfo[PartNum].PartitionLength.QuadPart
< (512LL * 1024LL * 1024LL))
{
- /* Partition starts below the 8.4GB boundary ==> CHS partition
*/
-
- if (PartEntry->PartInfo[PartNum].PartitionLength.QuadPart <
(32LL * 1024LL * 1024LL))
- {
- /* FAT16 CHS partition (partiton size < 32MB) */
- PartEntry->PartInfo[PartNum].PartitionType =
PARTITION_FAT_16;
- }
- else if (PartEntry->PartInfo[PartNum].PartitionLength.QuadPart
< (512LL * 1024LL * 1024LL))
- {
- /* FAT16 CHS partition (partition size < 512MB) */
- PartEntry->PartInfo[PartNum].PartitionType =
PARTITION_HUGE;
- }
- else
- {
- /* FAT32 CHS partition (partition size >= 512MB) */
- PartEntry->PartInfo[PartNum].PartitionType =
PARTITION_FAT32;
- }
+ /* FAT16 CHS partition (partition size < 512MB) */
+ PartEntry->PartInfo[PartNum].PartitionType = PARTITION_HUGE;
}
else
{
- /* Partition starts above the 8.4GB boundary ==> LBA partition
*/
-
- if (PartEntry->PartInfo[PartNum].PartitionLength.QuadPart <
(512LL * 1024LL * 1024LL))
- {
- /* FAT16 LBA partition (partition size < 512MB) */
- PartEntry->PartInfo[PartNum].PartitionType =
PARTITION_XINT13;
- }
- else
- {
- /* FAT32 LBA partition (partition size >= 512MB) */
- PartEntry->PartInfo[PartNum].PartitionType =
PARTITION_FAT32_XINT13;
- }
+ /* FAT32 CHS partition (partition size >= 512MB) */
+ PartEntry->PartInfo[PartNum].PartitionType = PARTITION_FAT32;
}
}
- else if (wcscmp(FileSystemList->Selected->FileSystem,
L"EXT2") == 0)
- PartEntry->PartInfo[PartNum].PartitionType = PARTITION_EXT2;
- else if (!FileSystemList->Selected->FormatFunc)
- return QUIT_PAGE;
- }
+ else
+ {
+ /* Partition starts above the 8.4GB boundary ==> LBA partition */
+
+ if (PartEntry->PartInfo[PartNum].PartitionLength.QuadPart <
(512LL * 1024LL * 1024LL))
+ {
+ /* FAT16 LBA partition (partition size < 512MB) */
+ PartEntry->PartInfo[PartNum].PartitionType =
PARTITION_XINT13;
+ }
+ else
+ {
+ /* FAT32 LBA partition (partition size >= 512MB) */
+ PartEntry->PartInfo[PartNum].PartitionType =
PARTITION_FAT32_XINT13;
+ }
+ }
+ }
+ else if (wcscmp(FileSystemList->Selected->FileSystem,
L"EXT2") == 0)
+ PartEntry->PartInfo[PartNum].PartitionType = PARTITION_EXT2;
+ else if (!FileSystemList->Selected->FormatFunc)
+ return QUIT_PAGE;
CheckActiveBootPartition (PartitionList);