[ui] improve partition scheme default selection

* Also rename our variable to PartitionStyle/ps for clarity
This commit is contained in:
Pete Batard 2018-03-26 18:58:22 +01:00
parent 61f46f7cdc
commit 1dbbe69a4b
7 changed files with 46 additions and 33 deletions

View file

@ -757,7 +757,7 @@ BOOL GetDrivePartitionData(DWORD DriveIndex, char* FileSystemName, DWORD FileSys
#endif
switch (DriveLayout->PartitionStyle) {
case PARTITION_STYLE_MBR:
SelectedDrive.PartitionType = PARTITION_STYLE_MBR;
SelectedDrive.PartitionStyle = PARTITION_STYLE_MBR;
for (i=0; i<DriveLayout->PartitionCount; i++) {
if (DriveLayout->PartitionEntry[i].Mbr.PartitionType != PARTITION_ENTRY_UNUSED) {
SelectedDrive.nPartitions++;
@ -804,7 +804,7 @@ BOOL GetDrivePartitionData(DWORD DriveIndex, char* FileSystemName, DWORD FileSys
}
break;
case PARTITION_STYLE_GPT:
SelectedDrive.PartitionType = PARTITION_STYLE_GPT;
SelectedDrive.PartitionStyle = PARTITION_STYLE_GPT;
suprintf("Partition type: GPT, NB Partitions: %d", DriveLayout->PartitionCount);
suprintf("Disk GUID: %s", GuidToString(&DriveLayout->Gpt.DiskId));
suprintf("Max parts: %d, Start Offset: %" PRIi64 ", Usable = %" PRIi64 " bytes",
@ -833,7 +833,7 @@ BOOL GetDrivePartitionData(DWORD DriveIndex, char* FileSystemName, DWORD FileSys
}
break;
default:
SelectedDrive.PartitionType = PARTITION_STYLE_MBR;
SelectedDrive.PartitionStyle = PARTITION_STYLE_MBR;
suprintf("Partition type: RAW");
break;
}