diff --git a/reactos/base/setup/usetup/bootsup.c b/reactos/base/setup/usetup/bootsup.c index 59b58a8da2c..e588f63dbe9 100644 --- a/reactos/base/setup/usetup/bootsup.c +++ b/reactos/base/setup/usetup/bootsup.c @@ -2657,7 +2657,7 @@ InstallVBRToPartition( break; default: - DPRINT1("PartitionType 0x%02x unknown!\n", PartitionType); + DPRINT1("PartitionType 0x%02X unknown!\n", PartitionType); break; } diff --git a/reactos/base/setup/usetup/interface/usetup.c b/reactos/base/setup/usetup/interface/usetup.c index 326f69703bb..dbd10c63bd9 100644 --- a/reactos/base/setup/usetup/interface/usetup.c +++ b/reactos/base/setup/usetup/interface/usetup.c @@ -2398,9 +2398,7 @@ DeletePartitionPage(PINPUT_RECORD Ir) MUIDisplayPage(DELETE_PARTITION_PAGE); - GetPartTypeStringFromPartitionTypeA(PartEntry->PartitionType, - PartType, - 30); + GetPartTypeStringFromPartitionType(PartEntry->PartitionType, PartType, 30); PartSize = PartEntry->SectorCount.QuadPart * DiskEntry->BytesPerSector; #if 0 @@ -2665,9 +2663,7 @@ SelectFileSystemPage(PINPUT_RECORD Ir) } /* adjust partition type */ - GetPartTypeStringFromPartitionTypeA(PartEntry->PartitionType, - PartTypeString, - 30); + GetPartTypeStringFromPartitionType(PartEntry->PartitionType, PartTypeString, 30); if (PartEntry->AutoCreate == TRUE) { @@ -3068,7 +3064,7 @@ CheckFileSystemPage(PINPUT_RECORD Ir) UNICODE_STRING PartitionRootPath; WCHAR PathBuffer[MAX_PATH]; CHAR Buffer[MAX_PATH]; - WCHAR PartTypeString[32]; + LPWSTR FileSystemName = NULL; PDISKENTRY DiskEntry; PPARTENTRY PartEntry; NTSTATUS Status; @@ -3101,15 +3097,50 @@ CheckFileSystemPage(PINPUT_RECORD Ir) CurrentFileSystem = PartEntry->FileSystem; if (CurrentFileSystem == NULL || CurrentFileSystem->FileSystemName == NULL) { - GetPartTypeStringFromPartitionTypeW(PartEntry->PartitionType, PartTypeString, 30); + /* + * Try to infer a preferred file system for this partition, given its ID. + * + * WARNING: This is partly a hack, since partitions with the same ID can + * be formatted with different file systems: for example, usual Linux + * partitions that are formatted in EXT2/3/4, ReiserFS, etc... have the + * same partition ID 0x83. + * + * The proper fix is to make a function that detects the existing FS + * from a given partition (not based on the partition ID). + * On the contrary, for unformatted partitions with a given ID, the + * following code is OK. + */ + if ((PartEntry->PartitionType == PARTITION_FAT_12) || + (PartEntry->PartitionType == PARTITION_FAT_16) || + (PartEntry->PartitionType == PARTITION_HUGE) || + (PartEntry->PartitionType == PARTITION_XINT13) || + (PartEntry->PartitionType == PARTITION_FAT32) || + (PartEntry->PartitionType == PARTITION_FAT32_XINT13)) + { + FileSystemName = L"FAT"; + } + else if (PartEntry->PartitionType == PARTITION_EXT2) + { + // WARNING: See the warning above. + FileSystemName = L"EXT2"; + } + else if (PartEntry->PartitionType == PARTITION_IFS) + { + // WARNING: See the warning above. + FileSystemName = L"NTFS"; /* FIXME: Not quite correct! */ + } - DPRINT("PartTypeString: %S\n", PartTypeString); + DPRINT1("CheckFileSystemPage -- PartitionType: 0x%02X ; FileSystemName (guessed): %S\n", + PartEntry->PartitionType, FileSystemName); - if (PartTypeString != NULL) + if (FileSystemName != NULL) CurrentFileSystem = GetFileSystemByName(FileSystemList, - PartTypeString); + FileSystemName); } + DPRINT1("CheckFileSystemPage -- PartitionType: 0x%02X ; FileSystemName: %S\n", + PartEntry->PartitionType, (CurrentFileSystem ? CurrentFileSystem->FileSystemName : L"n/a")); + /* HACK: Do not try to check a partition with an unknown filesytem */ if (CurrentFileSystem == NULL) { diff --git a/reactos/base/setup/usetup/lang/bg-BG.h b/reactos/base/setup/usetup/lang/bg-BG.h index 9e9027e46d9..c04b094c9e7 100644 --- a/reactos/base/setup/usetup/lang/bg-BG.h +++ b/reactos/base/setup/usetup/lang/bg-BG.h @@ -1805,7 +1805,7 @@ MUI_STRING bgBGStrings[] = {STRING_HDDINFOUNK1, "%I64u %s %lu (=%hu, =%hu, =%hu)."}, {STRING_HDDINFOUNK2, - " %c%c %lu %I64u %s"}, + " %c%c 0x%02X %I64u %s"}, {STRING_HDINFOPARTDELETE, " %I64u %s %lu (=%hu, =%hu, =%hu) %wZ."}, {STRING_HDDINFOUNK3, @@ -1813,7 +1813,7 @@ MUI_STRING bgBGStrings[] = {STRING_HDINFOPARTZEROED, " %lu (%I64u %s), =%hu, =%hu, =%hu (%wZ)."}, {STRING_HDDINFOUNK4, - "%c%c %lu %I64u %s"}, + "%c%c 0x%02X %I64u %s"}, {STRING_HDINFOPARTEXISTS, " %lu (%I64u %s), =%hu, =%hu, =%hu (%wZ)."}, {STRING_HDDINFOUNK5, diff --git a/reactos/base/setup/usetup/lang/bn-BD.h b/reactos/base/setup/usetup/lang/bn-BD.h index 1e2bd2e71c4..f0193df9387 100644 --- a/reactos/base/setup/usetup/lang/bn-BD.h +++ b/reactos/base/setup/usetup/lang/bn-BD.h @@ -1790,7 +1790,7 @@ MUI_STRING bnBDStrings[] = {STRING_HDDINFOUNK1, "%I64u %s Harddisk %lu (Port=%hu, Bus=%hu, Id=%hu)."}, {STRING_HDDINFOUNK2, - " %c%c Type %lu %I64u %s"}, + " %c%c Type 0x%02X %I64u %s"}, {STRING_HDINFOPARTDELETE, "on %I64u %s Harddisk %lu (Port=%hu, Bus=%hu, Id=%hu) on %wZ."}, {STRING_HDDINFOUNK3, @@ -1798,7 +1798,7 @@ MUI_STRING bnBDStrings[] = {STRING_HDINFOPARTZEROED, "Harddisk %lu (%I64u %s), Port=%hu, Bus=%hu, Id=%hu (%wZ)."}, {STRING_HDDINFOUNK4, - "%c%c Type %lu %I64u %s"}, + "%c%c Type 0x%02X %I64u %s"}, {STRING_HDINFOPARTEXISTS, "on Harddisk %lu (%I64u %s), Port=%hu, Bus=%hu, Id=%hu (%wZ)."}, {STRING_HDDINFOUNK5, diff --git a/reactos/base/setup/usetup/lang/cs-CZ.h b/reactos/base/setup/usetup/lang/cs-CZ.h index c1fe40e0ad8..55c3c0a81c0 100644 --- a/reactos/base/setup/usetup/lang/cs-CZ.h +++ b/reactos/base/setup/usetup/lang/cs-CZ.h @@ -1798,7 +1798,7 @@ MUI_STRING csCZStrings[] = {STRING_HDDINFOUNK1, "%I64u %s Harddisk %lu (Port=%hu, Bus=%hu, Id=%hu)."}, {STRING_HDDINFOUNK2, - " %c%c Typ %lu %I64u %s"}, + " %c%c Typ 0x%02X %I64u %s"}, {STRING_HDINFOPARTDELETE, "na %I64u %s Harddisk %lu (Port=%hu, Bus=%hu, Id=%hu) na %wZ."}, {STRING_HDDINFOUNK3, @@ -1806,7 +1806,7 @@ MUI_STRING csCZStrings[] = {STRING_HDINFOPARTZEROED, "Harddisk %lu (%I64u %s), Port=%hu, Bus=%hu, Id=%hu (%wZ)."}, {STRING_HDDINFOUNK4, - "%c%c Typ %lu %I64u %s"}, + "%c%c Typ 0x%02X %I64u %s"}, {STRING_HDINFOPARTEXISTS, "na harddisku %lu (%I64u %s), Port=%hu, Bus=%hu, Id=%hu (%wZ)."}, {STRING_HDDINFOUNK5, diff --git a/reactos/base/setup/usetup/lang/da-DK.h b/reactos/base/setup/usetup/lang/da-DK.h index d88b83ec5df..ec5598fb247 100644 --- a/reactos/base/setup/usetup/lang/da-DK.h +++ b/reactos/base/setup/usetup/lang/da-DK.h @@ -1810,7 +1810,7 @@ MUI_STRING daDKStrings[] = {STRING_HDDINFOUNK1, "%I64u %s harddisk %lu (Port=%hu, Bus=%hu, Id=%hu)."}, {STRING_HDDINFOUNK2, - " %c%c type %lu %I64u %s"}, + " %c%c type 0x%02X %I64u %s"}, {STRING_HDINFOPARTDELETE, "p %I64u %s harddisk %lu (Port=%hu, Bus=%hu, Id=%hu) p %wZ."}, {STRING_HDDINFOUNK3, @@ -1818,7 +1818,7 @@ MUI_STRING daDKStrings[] = {STRING_HDINFOPARTZEROED, "Harddisk %lu (%I64u %s), Port=%hu, Bus=%hu, Id=%hu (%wZ)."}, {STRING_HDDINFOUNK4, - "%c%c type %lu %I64u %s"}, + "%c%c type 0x%02X %I64u %s"}, {STRING_HDINFOPARTEXISTS, "p harddisk %lu (%I64u %s), Port=%hu, Bus=%hu, Id=%hu (%wZ)."}, {STRING_HDDINFOUNK5, diff --git a/reactos/base/setup/usetup/lang/de-DE.h b/reactos/base/setup/usetup/lang/de-DE.h index 6537b5dab89..4583f8f4ab4 100644 --- a/reactos/base/setup/usetup/lang/de-DE.h +++ b/reactos/base/setup/usetup/lang/de-DE.h @@ -1794,7 +1794,7 @@ MUI_STRING deDEStrings[] = {STRING_HDDINFOUNK1, "%I64u %s Festplatte %lu (Port=%hu, Bus=%hu, Id=%hu)."}, {STRING_HDDINFOUNK2, - " %c%c Typ %lu %I64u %s"}, + " %c%c Typ 0x%02X %I64u %s"}, {STRING_HDINFOPARTDELETE, "auf %I64u %s Festplatte %lu (Port=%hu, Bus=%hu, Id=%hu) auf %wZ."}, {STRING_HDDINFOUNK3, @@ -1802,7 +1802,7 @@ MUI_STRING deDEStrings[] = {STRING_HDINFOPARTZEROED, "Festplatte %lu (%I64u %s), Port=%hu, Bus=%hu, Id=%hu (%wZ)."}, {STRING_HDDINFOUNK4, - "%c%c Typ %lu %I64u %s"}, + "%c%c Typ 0x%02X %I64u %s"}, {STRING_HDINFOPARTEXISTS, "auf Festplatte %lu (%I64u %s), Port=%hu, Bus=%hu, Id=%hu (%wZ)."}, {STRING_HDDINFOUNK5, diff --git a/reactos/base/setup/usetup/lang/el-GR.h b/reactos/base/setup/usetup/lang/el-GR.h index a3b7a77354d..721d4ab1300 100644 --- a/reactos/base/setup/usetup/lang/el-GR.h +++ b/reactos/base/setup/usetup/lang/el-GR.h @@ -1809,7 +1809,7 @@ MUI_STRING elGRStrings[] = {STRING_HDDINFOUNK1, "%I64u %s 婡 %lu (Port=%hu, Bus=%hu, Id=%hu)."}, {STRING_HDDINFOUNK2, - " %c%c Type %lu %I64u %s"}, + " %c%c Type 0x%02X %I64u %s"}, {STRING_HDINFOPARTDELETE, "on %I64u %s Harddisk %lu (Port=%hu, Bus=%hu, Id=%hu) on %wZ."}, {STRING_HDDINFOUNK3, @@ -1817,7 +1817,7 @@ MUI_STRING elGRStrings[] = {STRING_HDINFOPARTZEROED, " 婡 %lu (%I64u %s), Port=%hu, Bus=%hu, Id=%hu (%wZ)."}, {STRING_HDDINFOUNK4, - "%c%c Type %lu %I64u %s"}, + "%c%c Type 0x%02X %I64u %s"}, {STRING_HDINFOPARTEXISTS, " 婡 %lu (%I64u %s), Port=%hu, Bus=%hu, Id=%hu (%wZ)."}, {STRING_HDDINFOUNK5, diff --git a/reactos/base/setup/usetup/lang/en-US.h b/reactos/base/setup/usetup/lang/en-US.h index 06afe92637b..8b991009af8 100644 --- a/reactos/base/setup/usetup/lang/en-US.h +++ b/reactos/base/setup/usetup/lang/en-US.h @@ -1790,7 +1790,7 @@ MUI_STRING enUSStrings[] = {STRING_HDDINFOUNK1, "%I64u %s Harddisk %lu (Port=%hu, Bus=%hu, Id=%hu)."}, {STRING_HDDINFOUNK2, - " %c%c Type %lu %I64u %s"}, + " %c%c Type 0x%02X %I64u %s"}, {STRING_HDINFOPARTDELETE, "on %I64u %s Harddisk %lu (Port=%hu, Bus=%hu, Id=%hu) on %wZ."}, {STRING_HDDINFOUNK3, @@ -1798,7 +1798,7 @@ MUI_STRING enUSStrings[] = {STRING_HDINFOPARTZEROED, "Harddisk %lu (%I64u %s), Port=%hu, Bus=%hu, Id=%hu (%wZ)."}, {STRING_HDDINFOUNK4, - "%c%c Type %lu %I64u %s"}, + "%c%c Type 0x%02X %I64u %s"}, {STRING_HDINFOPARTEXISTS, "on Harddisk %lu (%I64u %s), Port=%hu, Bus=%hu, Id=%hu (%wZ)."}, {STRING_HDDINFOUNK5, diff --git a/reactos/base/setup/usetup/lang/es-ES.h b/reactos/base/setup/usetup/lang/es-ES.h index 3d689724b90..73522d4e9a7 100644 --- a/reactos/base/setup/usetup/lang/es-ES.h +++ b/reactos/base/setup/usetup/lang/es-ES.h @@ -1800,7 +1800,7 @@ MUI_STRING esESStrings[] = {STRING_HDDINFOUNK1, "%I64u %s Disco duro %lu (Port=%hu, Bus=%hu, Id=%hu)."}, {STRING_HDDINFOUNK2, - " %c%c Tipo %lu %I64u %s"}, + " %c%c Tipo 0x%02X %I64u %s"}, {STRING_HDINFOPARTDELETE, "en %I64u %s Disco duro %lu (Port=%hu, Bus=%hu, Id=%hu) en %wZ."}, {STRING_HDDINFOUNK3, @@ -1808,7 +1808,7 @@ MUI_STRING esESStrings[] = {STRING_HDINFOPARTZEROED, "Disco duro %lu (%I64u %s), Port=%hu, Bus=%hu, Id=%hu (%wZ)."}, {STRING_HDDINFOUNK4, - "%c%c Tipo %lu %I64u %s"}, + "%c%c Tipo 0x%02X %I64u %s"}, {STRING_HDINFOPARTEXISTS, "en Disco duro %lu (%I64u %s), Port=%hu, Bus=%hu, Id=%hu (%wZ)."}, {STRING_HDDINFOUNK5, diff --git a/reactos/base/setup/usetup/lang/et-EE.h b/reactos/base/setup/usetup/lang/et-EE.h index 6673e9dda51..9f288e60fb9 100644 --- a/reactos/base/setup/usetup/lang/et-EE.h +++ b/reactos/base/setup/usetup/lang/et-EE.h @@ -1790,7 +1790,7 @@ MUI_STRING etEEStrings[] = {STRING_HDDINFOUNK1, "%I64u %s Kvaketas %lu (Port=%hu, Siin=%hu, Id=%hu)."}, {STRING_HDDINFOUNK2, - " %c%c Type %lu %I64u %s"}, + " %c%c Type 0x%02X %I64u %s"}, {STRING_HDINFOPARTDELETE, "%I64u %s Kvaketas %lu (Port=%hu, Siin=%hu, Id=%hu) - %wZ."}, {STRING_HDDINFOUNK3, @@ -1798,7 +1798,7 @@ MUI_STRING etEEStrings[] = {STRING_HDINFOPARTZEROED, "Kvaketas %lu (%I64u %s), Port=%hu, Siin=%hu, Id=%hu (%wZ)."}, {STRING_HDDINFOUNK4, - "%c%c Type %lu %I64u %s"}, + "%c%c Type 0x%02X %I64u %s"}, {STRING_HDINFOPARTEXISTS, "Kvaketas %lu (%I64u %s), Port=%hu, Siin=%hu, Id=%hu (%wZ)."}, {STRING_HDDINFOUNK5, diff --git a/reactos/base/setup/usetup/lang/fr-FR.h b/reactos/base/setup/usetup/lang/fr-FR.h index bda28e84891..268267c0d5e 100644 --- a/reactos/base/setup/usetup/lang/fr-FR.h +++ b/reactos/base/setup/usetup/lang/fr-FR.h @@ -1803,7 +1803,7 @@ MUI_STRING frFRStrings[] = {STRING_HDDINFOUNK1, "%I64u %s Disque dur %lu (Port=%hu, Bus=%hu, Id=%hu)."}, {STRING_HDDINFOUNK2, - " %c%c Type %lu %I64u %s"}, + " %c%c Type 0x%02X %I64u %s"}, {STRING_HDINFOPARTDELETE, "sur %I64u %s Disque dur %lu (Port=%hu, Bus=%hu, Id=%hu) sur %wZ."}, {STRING_HDDINFOUNK3, @@ -1811,7 +1811,7 @@ MUI_STRING frFRStrings[] = {STRING_HDINFOPARTZEROED, "Disque dur %lu (%I64u %s), Port=%hu, Bus=%hu, Id=%hu (%wZ)."}, {STRING_HDDINFOUNK4, - "%c%c Type %lu %I64u %s"}, + "%c%c Type 0x%02X %I64u %s"}, {STRING_HDINFOPARTEXISTS, "sur Disque dur %lu (%I64u %s), Port=%hu, Bus=%hu, Id=%hu (%wZ)."}, {STRING_HDDINFOUNK5, diff --git a/reactos/base/setup/usetup/lang/he-IL.h b/reactos/base/setup/usetup/lang/he-IL.h index 59b548398ef..4349a9c7992 100644 --- a/reactos/base/setup/usetup/lang/he-IL.h +++ b/reactos/base/setup/usetup/lang/he-IL.h @@ -1792,7 +1792,7 @@ MUI_STRING heILStrings[] = {STRING_HDDINFOUNK1, "%I64u %s Harddisk %lu (Port=%hu, Bus=%hu, Id=%hu)."}, {STRING_HDDINFOUNK2, - " %c%c Type %lu %I64u %s"}, + " %c%c Type 0x%02X %I64u %s"}, {STRING_HDINFOPARTDELETE, "on %I64u %s Harddisk %lu (Port=%hu, Bus=%hu, Id=%hu) on %wZ."}, {STRING_HDDINFOUNK3, @@ -1800,7 +1800,7 @@ MUI_STRING heILStrings[] = {STRING_HDINFOPARTZEROED, "Harddisk %lu (%I64u %s), Port=%hu, Bus=%hu, Id=%hu (%wZ)."}, {STRING_HDDINFOUNK4, - "%c%c Type %lu %I64u %s"}, + "%c%c Type 0x%02X %I64u %s"}, {STRING_HDINFOPARTEXISTS, "on Harddisk %lu (%I64u %s), Port=%hu, Bus=%hu, Id=%hu (%wZ)."}, {STRING_HDDINFOUNK5, diff --git a/reactos/base/setup/usetup/lang/it-IT.h b/reactos/base/setup/usetup/lang/it-IT.h index 9af026b5daf..6a2a60af65c 100644 --- a/reactos/base/setup/usetup/lang/it-IT.h +++ b/reactos/base/setup/usetup/lang/it-IT.h @@ -1800,7 +1800,7 @@ MUI_STRING itITStrings[] = {STRING_HDDINFOUNK1, "%I64u %s Harddisk %lu (Port=%hu, Bus=%hu, Id=%hu)."}, {STRING_HDDINFOUNK2, - " %c%c Tipo %lu %I64u %s"}, + " %c%c Tipo 0x%02X %I64u %s"}, {STRING_HDINFOPARTDELETE, "su %I64u %s Harddisk %lu (Port=%hu, Bus=%hu, Id=%hu) su %wZ."}, {STRING_HDDINFOUNK3, @@ -1808,7 +1808,7 @@ MUI_STRING itITStrings[] = {STRING_HDINFOPARTZEROED, "Harddisk %lu (%I64u %s), Port=%hu, Bus=%hu, Id=%hu (%wZ)."}, {STRING_HDDINFOUNK4, - "%c%c Tipo %lu %I64u %s"}, + "%c%c Tipo 0x%02X %I64u %s"}, {STRING_HDINFOPARTEXISTS, "su Harddisk %lu (%I64u %s), Port=%hu, Bus=%hu, Id=%hu (%wZ)."}, {STRING_HDDINFOUNK5, diff --git a/reactos/base/setup/usetup/lang/ja-JP.h b/reactos/base/setup/usetup/lang/ja-JP.h index 4def947d647..efe2c869de1 100644 --- a/reactos/base/setup/usetup/lang/ja-JP.h +++ b/reactos/base/setup/usetup/lang/ja-JP.h @@ -1794,7 +1794,7 @@ MUI_STRING jaJPStrings[] = {STRING_HDDINFOUNK1, "%I64u %s ʰި %lu (߰=%hu, ޽=%hu, Id=%hu)."}, {STRING_HDDINFOUNK2, - " %c%c ٲ %lu %I64u %s"}, + " %c%c ٲ 0x%02X %I64u %s"}, {STRING_HDINFOPARTDELETE, "on %I64u %s ʰި %lu (߰=%hu, ޽=%hu, Id=%hu) on %wZ."}, {STRING_HDDINFOUNK3, @@ -1802,7 +1802,7 @@ MUI_STRING jaJPStrings[] = {STRING_HDINFOPARTZEROED, "ʰި %lu (%I64u %s), ߰=%hu, ޽=%hu, Id=%hu (%wZ)."}, {STRING_HDDINFOUNK4, - "%c%c ٲ %lu %I64u %s"}, + "%c%c ٲ 0x%02X %I64u %s"}, {STRING_HDINFOPARTEXISTS, "on ʰި %lu (%I64u %s), ߰=%hu, ޽=%hu, Id=%hu (%wZ)."}, {STRING_HDDINFOUNK5, diff --git a/reactos/base/setup/usetup/lang/lt-LT.h b/reactos/base/setup/usetup/lang/lt-LT.h index b29385022aa..d4955d21194 100644 --- a/reactos/base/setup/usetup/lang/lt-LT.h +++ b/reactos/base/setup/usetup/lang/lt-LT.h @@ -1800,7 +1800,7 @@ MUI_STRING ltLTStrings[] = {STRING_HDDINFOUNK1, "%I64u %s Harddisk %lu (Port=%hu, Bus=%hu, Id=%hu)."}, {STRING_HDDINFOUNK2, - " %c%c Type %lu %I64u %s"}, + " %c%c Type 0x%02X %I64u %s"}, {STRING_HDINFOPARTDELETE, "on %I64u %s Harddisk %lu (Port=%hu, Bus=%hu, Id=%hu) on %wZ."}, {STRING_HDDINFOUNK3, @@ -1808,7 +1808,7 @@ MUI_STRING ltLTStrings[] = {STRING_HDINFOPARTZEROED, "Harddisk %lu (%I64u %s), Port=%hu, Bus=%hu, Id=%hu (%wZ)."}, {STRING_HDDINFOUNK4, - "%c%c Type %lu %I64u %s"}, + "%c%c Type 0x%02X %I64u %s"}, {STRING_HDINFOPARTEXISTS, "on Harddisk %lu (%I64u %s), Port=%hu, Bus=%hu, Id=%hu (%wZ)."}, {STRING_HDDINFOUNK5, diff --git a/reactos/base/setup/usetup/lang/ms-MY.h b/reactos/base/setup/usetup/lang/ms-MY.h index 9ad6c84b21b..9c33468a3f8 100644 --- a/reactos/base/setup/usetup/lang/ms-MY.h +++ b/reactos/base/setup/usetup/lang/ms-MY.h @@ -1679,7 +1679,7 @@ MUI_STRING msMYStrings[] = {STRING_HDDINFOUNK1, "%I64u %s Harddisk %lu (Port=%hu, Bus=%hu, Id=%hu)."}, {STRING_HDDINFOUNK2, - " %c%c Type %lu %I64u %s"}, + " %c%c Type 0x%02X %I64u %s"}, {STRING_HDINFOPARTDELETE, "on %I64u %s Harddisk %lu (Port=%hu, Bus=%hu, Id=%hu) on %wZ."}, {STRING_HDDINFOUNK3, @@ -1687,7 +1687,7 @@ MUI_STRING msMYStrings[] = {STRING_HDINFOPARTZEROED, "Harddisk %lu (%I64u %s), Port=%hu, Bus=%hu, Id=%hu (%wZ)."}, {STRING_HDDINFOUNK4, - "%c%c Type %lu %I64u %s"}, + "%c%c Type 0x%02X %I64u %s"}, {STRING_HDINFOPARTEXISTS, "on Harddisk %lu (%I64u %s), Port=%hu, Bus=%hu, Id=%hu (%wZ)."}, {STRING_HDDINFOUNK5, diff --git a/reactos/base/setup/usetup/lang/nl-NL.h b/reactos/base/setup/usetup/lang/nl-NL.h index 8e98a925e18..d28705349e4 100644 --- a/reactos/base/setup/usetup/lang/nl-NL.h +++ b/reactos/base/setup/usetup/lang/nl-NL.h @@ -1832,7 +1832,7 @@ MUI_STRING nlNLStrings[] = {STRING_HDDINFOUNK1, "%I64u %s Schijf %lu (Poort=%hu, Bus=%hu, Id=%hu)."}, {STRING_HDDINFOUNK2, - " %c%c Type %lu %I64u %s"}, + " %c%c Type 0x%02X %I64u %s"}, {STRING_HDINFOPARTDELETE, "op %I64u %s Schijf %lu (Poort=%hu, Bus=%hu, Id=%hu) op %wZ."}, {STRING_HDDINFOUNK3, @@ -1840,7 +1840,7 @@ MUI_STRING nlNLStrings[] = {STRING_HDINFOPARTZEROED, "Schijf %lu (%I64u %s), Poort=%hu, Bus=%hu, Id=%hu (%wZ)."}, {STRING_HDDINFOUNK4, - "%c%c Type %lu %I64u %s"}, + "%c%c Type 0x%02X %I64u %s"}, {STRING_HDINFOPARTEXISTS, "op Schijf %lu (%I64u %s), Poort=%hu, Bus=%hu, Id=%hu (%wZ)."}, {STRING_HDDINFOUNK5, diff --git a/reactos/base/setup/usetup/lang/pl-PL.h b/reactos/base/setup/usetup/lang/pl-PL.h index 6bc3a4d68f4..4a36229b1fd 100644 --- a/reactos/base/setup/usetup/lang/pl-PL.h +++ b/reactos/base/setup/usetup/lang/pl-PL.h @@ -1801,7 +1801,7 @@ MUI_STRING plPLStrings[] = {STRING_HDDINFOUNK1, "%I64u %s Dysk 02 Twardy %lu (Port=%hu, Szyna=%hu, Id=%hu)."}, {STRING_HDDINFOUNK2, - " %c%c 03Typ %lu %I64u %s"}, + " %c%c 03Typ 0x%02X %I64u %s"}, {STRING_HDINFOPARTDELETE, "na %I64u %s Dysku Twardym %lu (Port=%hu, Szyna=%hu, Id=%hu) na %wZ."}, {STRING_HDDINFOUNK3, @@ -1809,7 +1809,7 @@ MUI_STRING plPLStrings[] = {STRING_HDINFOPARTZEROED, "Dysk Twardy %lu (%I64u %s), Port=%hu, Szyna=%hu, Id=%hu (%wZ)."}, {STRING_HDDINFOUNK4, - "%c%c 07Typ %lu %I64u %s"}, + "%c%c 07Typ 0x%02X %I64u %s"}, {STRING_HDINFOPARTEXISTS, "na Dysku Twardym %lu (%I64u %s), Port=%hu, Szyna=%hu, Id=%hu (%wZ)."}, {STRING_HDDINFOUNK5, diff --git a/reactos/base/setup/usetup/lang/pt-BR.h b/reactos/base/setup/usetup/lang/pt-BR.h index 73785228963..9f52b1b570a 100644 --- a/reactos/base/setup/usetup/lang/pt-BR.h +++ b/reactos/base/setup/usetup/lang/pt-BR.h @@ -1830,7 +1830,7 @@ MUI_STRING ptBRStrings[] = {STRING_HDDINFOUNK1, "%I64u %s Disco %lu (Porta=%hu, Barramento=%hu, Id=%hu)."}, {STRING_HDDINFOUNK2, - " %c%c Tipo %lu %I64u %s"}, + " %c%c Tipo 0x%02X %I64u %s"}, {STRING_HDINFOPARTDELETE, "em %I64u %s Disco %lu (Porta=%hu, Barramento=%hu, Id=%hu) em %wZ."}, {STRING_HDDINFOUNK3, @@ -1838,7 +1838,7 @@ MUI_STRING ptBRStrings[] = {STRING_HDINFOPARTZEROED, "Disco %lu (%I64u %s), Porta=%hu, Barramento=%hu, Id=%hu (%wZ)."}, {STRING_HDDINFOUNK4, - "%c%c Tipo %lu %I64u %s"}, + "%c%c Tipo 0x%02X %I64u %s"}, {STRING_HDINFOPARTEXISTS, "em Disco %lu (%I64u %s), Porta=%hu, Barramento=%hu, Id=%hu (%wZ)."}, {STRING_HDDINFOUNK5, diff --git a/reactos/base/setup/usetup/lang/ro-RO.h b/reactos/base/setup/usetup/lang/ro-RO.h index 2b461ba7b1c..4210f7e048a 100644 --- a/reactos/base/setup/usetup/lang/ro-RO.h +++ b/reactos/base/setup/usetup/lang/ro-RO.h @@ -1861,7 +1861,7 @@ MUI_STRING roROStrings[] = {STRING_HDDINFOUNK1, "%I64u %s Discul %lu (Port=%hu, Magistrala=%hu, Id=%hu)."}, {STRING_HDDINFOUNK2, - " %c%c Tip %lu %I64u %s"}, + " %c%c Tip 0x%02X %I64u %s"}, {STRING_HDINFOPARTDELETE, "de pe %I64u %s Discul %lu (Port=%hu, Magistrala=%hu, Id=%hu) de tip %wZ."}, {STRING_HDDINFOUNK3, @@ -1869,7 +1869,7 @@ MUI_STRING roROStrings[] = {STRING_HDINFOPARTZEROED, "Discul %lu (%I64u %s), Port=%hu, Magistrala=%hu, Id=%hu (%wZ)."}, {STRING_HDDINFOUNK4, - "%c%c Tip %lu %I64u %s"}, + "%c%c Tip 0x%02X %I64u %s"}, {STRING_HDINFOPARTEXISTS, "de pe Discul %lu (%I64u %s), Port=%hu, Magistrala=%hu, Id=%hu (%wZ)."}, {STRING_HDDINFOUNK5, diff --git a/reactos/base/setup/usetup/lang/ru-RU.h b/reactos/base/setup/usetup/lang/ru-RU.h index 9c5d41422dc..c95d240251b 100644 --- a/reactos/base/setup/usetup/lang/ru-RU.h +++ b/reactos/base/setup/usetup/lang/ru-RU.h @@ -1791,7 +1791,7 @@ MUI_STRING ruRUStrings[] = {STRING_HDDINFOUNK1, "%I64u %s ⪨ %lu (=%hu, =%hu, Id=%hu)."}, {STRING_HDDINFOUNK2, - " %c%c %lu %I64u %s"}, + " %c%c 0x%02X %I64u %s"}, {STRING_HDINFOPARTDELETE, " %I64u %s ⪨ %lu (=%hu, =%hu, Id=%hu) %wZ."}, {STRING_HDDINFOUNK3, @@ -1799,7 +1799,7 @@ MUI_STRING ruRUStrings[] = {STRING_HDINFOPARTZEROED, "⪨ %lu (%I64u %s), =%hu, =%hu, Id=%hu (%wZ)."}, {STRING_HDDINFOUNK4, - "%c%c %lu %I64u %s"}, + "%c%c 0x%02X %I64u %s"}, {STRING_HDINFOPARTEXISTS, " ⪮ ᪥ %lu (%I64u %s), =%hu, =%hu, Id=%hu (%wZ)."}, {STRING_HDDINFOUNK5, diff --git a/reactos/base/setup/usetup/lang/sk-SK.h b/reactos/base/setup/usetup/lang/sk-SK.h index 6d943e475d1..f75368db90e 100644 --- a/reactos/base/setup/usetup/lang/sk-SK.h +++ b/reactos/base/setup/usetup/lang/sk-SK.h @@ -1804,7 +1804,7 @@ MUI_STRING skSKStrings[] = {STRING_HDDINFOUNK1, "%I64u %s pevn disk %lu (Port=%hu, Bus=%hu, Id=%hu)."}, {STRING_HDDINFOUNK2, - " %c%c typ %lu %I64u %s"}, + " %c%c typ 0x%02X %I64u %s"}, {STRING_HDINFOPARTDELETE, "na %I64u %s pevnom disku %lu (Port=%hu, Bus=%hu, Id=%hu) na %wZ."}, {STRING_HDDINFOUNK3, @@ -1812,7 +1812,7 @@ MUI_STRING skSKStrings[] = {STRING_HDINFOPARTZEROED, "pevn disk %lu (%I64u %s), Port=%hu, Bus=%hu, Id=%hu (%wZ)."}, {STRING_HDDINFOUNK4, - "%c%c typ %lu %I64u %s"}, + "%c%c typ 0x%02X %I64u %s"}, {STRING_HDINFOPARTEXISTS, "na pevnom disku %lu (%I64u %s), Port=%hu, Bus=%hu, Id=%hu (%wZ)."}, {STRING_HDDINFOUNK5, diff --git a/reactos/base/setup/usetup/lang/sq-AL.h b/reactos/base/setup/usetup/lang/sq-AL.h index 8e1146e80cf..b8c8cc56321 100644 --- a/reactos/base/setup/usetup/lang/sq-AL.h +++ b/reactos/base/setup/usetup/lang/sq-AL.h @@ -1797,7 +1797,7 @@ MUI_STRING sqALStrings[] = {STRING_HDDINFOUNK1, "%I64u %s Harddisku %lu (Port=%hu, Bus=%hu, Id=%hu)."}, {STRING_HDDINFOUNK2, - " %c%c Tipi %lu %I64u %s"}, + " %c%c Tipi 0x%02X %I64u %s"}, {STRING_HDINFOPARTDELETE, "on %I64u %s Harddisku %lu (Port=%hu, Bus=%hu, Id=%hu) on %wZ."}, {STRING_HDDINFOUNK3, @@ -1805,7 +1805,7 @@ MUI_STRING sqALStrings[] = {STRING_HDINFOPARTZEROED, "Harddisku %lu (%I64u %s), Port=%hu, Bus=%hu, Id=%hu (%wZ)."}, {STRING_HDDINFOUNK4, - "%c%c Tipi %lu %I64u %s"}, + "%c%c Tipi 0x%02X %I64u %s"}, {STRING_HDINFOPARTEXISTS, "on Harddisku %lu (%I64u %s), Port=%hu, Bus=%hu, Id=%hu (%wZ)."}, {STRING_HDDINFOUNK5, diff --git a/reactos/base/setup/usetup/lang/sv-SE.h b/reactos/base/setup/usetup/lang/sv-SE.h index c9eedc083d4..cbadd080be9 100644 --- a/reactos/base/setup/usetup/lang/sv-SE.h +++ b/reactos/base/setup/usetup/lang/sv-SE.h @@ -1800,7 +1800,7 @@ MUI_STRING svSEStrings[] = {STRING_HDDINFOUNK1, "%I64u %s Hrddisk %lu (Port=%hu, Bus=%hu, Id=%hu)."}, {STRING_HDDINFOUNK2, - " %c%c Typ %lu %I64u %s"}, + " %c%c Typ 0x%02X %I64u %s"}, {STRING_HDINFOPARTDELETE, "on %I64u %s Hrddisk %lu (Port=%hu, Bus=%hu, Id=%hu) p %wZ."}, {STRING_HDDINFOUNK3, @@ -1808,7 +1808,7 @@ MUI_STRING svSEStrings[] = {STRING_HDINFOPARTZEROED, "Hrddisk %lu (%I64u %s), Port=%hu, Bus=%hu, Id=%hu (%wZ)."}, {STRING_HDDINFOUNK4, - "%c%c Typ %lu %I64u %s"}, + "%c%c Typ 0x%02X %I64u %s"}, {STRING_HDINFOPARTEXISTS, "p Hrddisk %lu (%I64u %s), Port=%hu, Bus=%hu, Id=%hu (%wZ)."}, {STRING_HDDINFOUNK5, diff --git a/reactos/base/setup/usetup/lang/tr-TR.h b/reactos/base/setup/usetup/lang/tr-TR.h index 94c6746855a..21007e308c0 100644 --- a/reactos/base/setup/usetup/lang/tr-TR.h +++ b/reactos/base/setup/usetup/lang/tr-TR.h @@ -1771,7 +1771,7 @@ MUI_STRING trTRStrings[] = {STRING_HDDINFOUNK1, "%I64u %s Sbit Disk %lu (Giri=%hu, Veriyolu=%hu, Kimlik=%hu)."}, {STRING_HDDINFOUNK2, - " %c%c Tr %lu %I64u %s"}, + " %c%c Tr 0x%02X %I64u %s"}, {STRING_HDINFOPARTDELETE, "zerinde: %I64u %s Sbit Disk %lu (Giri=%hu, Veriyolu=%hu, Kimlik=%hu), %wZ zerinde."}, {STRING_HDDINFOUNK3, @@ -1779,7 +1779,7 @@ MUI_STRING trTRStrings[] = {STRING_HDINFOPARTZEROED, "Sbit Disk %lu (%I64u %s), Giri=%hu, Veriyolu=%hu, Kimlik=%hu (%wZ)."}, {STRING_HDDINFOUNK4, - "%c%c Tr %lu %I64u %s"}, + "%c%c Tr 0x%02X %I64u %s"}, {STRING_HDINFOPARTEXISTS, "zerinde: Sbit Disk %lu (%I64u %s), Giri=%hu, Veriyolu=%hu, Kimlik=%hu (%wZ)."}, {STRING_HDDINFOUNK5, diff --git a/reactos/base/setup/usetup/lang/uk-UA.h b/reactos/base/setup/usetup/lang/uk-UA.h index 7a6032e0c0d..2b00f8562dd 100644 --- a/reactos/base/setup/usetup/lang/uk-UA.h +++ b/reactos/base/setup/usetup/lang/uk-UA.h @@ -1800,7 +1800,7 @@ MUI_STRING ukUAStrings[] = {STRING_HDDINFOUNK1, "%I64u %s ⪨ %lu (=%hu, =%hu, Id=%hu)."}, {STRING_HDDINFOUNK2, - " %c%c Type %lu %I64u %s"}, + " %c%c Type 0x%02X %I64u %s"}, {STRING_HDINFOPARTDELETE, " %I64u %s ⪨ %lu (=%hu, =%hu, Id=%hu) on %wZ."}, {STRING_HDDINFOUNK3, @@ -1808,7 +1808,7 @@ MUI_STRING ukUAStrings[] = {STRING_HDINFOPARTZEROED, "⪨ %lu (%I64u %s), =%hu, =%hu, Id=%hu (%wZ)."}, {STRING_HDDINFOUNK4, - "%c%c Type %lu %I64u %s"}, + "%c%c Type 0x%02X %I64u %s"}, {STRING_HDINFOPARTEXISTS, " ⪮ %lu (%I64u %s), =%hu, =%hu, Id=%hu (%wZ)."}, {STRING_HDDINFOUNK5, diff --git a/reactos/base/setup/usetup/partlist.c b/reactos/base/setup/usetup/partlist.c index 9ab1498af49..a18e671579e 100644 --- a/reactos/base/setup/usetup/partlist.c +++ b/reactos/base/setup/usetup/partlist.c @@ -33,6 +33,179 @@ //#define DUMP_PARTITION_TABLE +/* HELPERS FOR PARTITION TYPES **********************************************/ + +typedef struct _PARTITION_TYPE +{ + UCHAR Type; + PCHAR Description; +} PARTITION_TYPE, *PPARTITION_TYPE; + +/* + * This partiton type list was ripped off the kernelDisk.c module from: + * + * Visopsys Operating System + * Copyright (C) 1998-2015 J. Andrew McLaughlin + * + * This program is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by the Free + * Software Foundation; either version 2 of the License, or (at your option) + * any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY + * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * for more details. + * + * You should have received a copy of the GNU General Public License along + * with this program; if not, write to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + * + * + * See also https://en.wikipedia.org/wiki/Partition_type#List_of_partition_IDs + * and http://www.win.tue.nl/~aeb/partitions/partition_types-1.html + * for a complete list. + */ + +/* This is a table for keeping known partition type codes and descriptions */ +static PARTITION_TYPE PartitionTypes[] = +{ + { 0x00, "(Empty)" }, + { 0x01, "FAT12" }, + { 0x02, "XENIX root" }, + { 0x03, "XENIX /usr" }, + { 0x04, "FAT16 (small)" }, + { 0x05, "Extended" }, + { 0x06, "FAT16" }, + { 0x07, "NTFS/HPFS/exFAT" }, + { 0x08, "OS/2 or AIX boot" }, + { 0x09, "AIX data" }, + { 0x0A, "OS/2 Boot Manager" }, + { 0x0B, "FAT32" }, + { 0x0C, "FAT32 (LBA)" }, + { 0x0E, "FAT16 (LBA)" }, + { 0x0F, "Extended (LBA)" }, + { 0x11, "Hidden FAT12" }, + { 0x12, "FAT diagnostic" }, + { 0x14, "Hidden FAT16 (small)" }, + { 0x16, "Hidden FAT16" }, + { 0x17, "Hidden HPFS or NTFS" }, + { 0x1B, "Hidden FAT32" }, + { 0x1C, "Hidden FAT32 (LBA)" }, + { 0x1E, "Hidden FAT16 (LBA)" }, + { 0x35, "JFS" }, + { 0x39, "Plan 9" }, + { 0x3C, "PartitionMagic" }, + { 0x3D, "Hidden Netware" }, + { 0x41, "PowerPC PReP" }, + { 0x42, "Win2K dynamic extended" }, + { 0x43, "Old Linux" }, + { 0x44, "GoBack" }, + { 0x4D, "QNX4.x" }, + { 0x4D, "QNX4.x 2nd" }, + { 0x4D, "QNX4.x 3rd" }, + { 0x50, "Ontrack R/O" }, + { 0x51, "Ontrack R/W or Novell" }, + { 0x52, "CP/M" }, + { 0x63, "GNU HURD or UNIX SysV" }, + { 0x64, "Netware 2" }, + { 0x65, "Netware 3/4" }, + { 0x66, "Netware SMS" }, + { 0x67, "Novell" }, + { 0x68, "Novell" }, + { 0x69, "Netware 5+" }, + { 0x7E, "Veritas VxVM public" }, + { 0x7F, "Veritas VxVM private" }, + { 0x80, "Minix" }, + { 0x81, "Linux or Minix" }, + { 0x82, "Linux swap or Solaris" }, + { 0x83, "Linux" }, + { 0x84, "Hibernation" }, + { 0x85, "Linux extended" }, + { 0x86, "HPFS or NTFS mirrored" }, + { 0x87, "HPFS or NTFS mirrored" }, + { 0x8E, "Linux LVM" }, + { 0x93, "Hidden Linux" }, + { 0x9F, "BSD/OS" }, + { 0xA0, "Laptop hibernation" }, + { 0xA1, "Laptop hibernation" }, + { 0xA5, "BSD, NetBSD, FreeBSD" }, + { 0xA6, "OpenBSD" }, + { 0xA7, "NeXTSTEP" }, + { 0xA8, "OS-X UFS" }, + { 0xA9, "NetBSD" }, + { 0xAB, "OS-X boot" }, + { 0xAF, "OS-X HFS" }, + { 0xB6, "NT corrupt mirror" }, + { 0xB7, "BSDI" }, + { 0xB8, "BSDI swap" }, + { 0xBE, "Solaris 8 boot" }, + { 0xBF, "Solaris x86" }, + { 0xC0, "NTFT" }, + { 0xC1, "DR-DOS FAT12" }, + { 0xC2, "Hidden Linux" }, + { 0xC3, "Hidden Linux swap" }, + { 0xC4, "DR-DOS FAT16 (small)" }, + { 0xC5, "DR-DOS Extended" }, + { 0xC6, "DR-DOS FAT16" }, + { 0xC7, "HPFS mirrored" }, + { 0xCB, "DR-DOS FAT32" }, + { 0xCC, "DR-DOS FAT32 (LBA)" }, + { 0xCE, "DR-DOS FAT16 (LBA)" }, + { 0xD0, "MDOS" }, + { 0xD1, "MDOS FAT12" }, + { 0xD4, "MDOS FAT16 (small)" }, + { 0xD5, "MDOS Extended" }, + { 0xD6, "MDOS FAT16" }, + { 0xD8, "CP/M-86" }, + { 0xDF, "BootIt EMBRM(FAT16/32)" }, + { 0xEB, "BeOS BFS" }, + { 0xEE, "EFI GPT protective" }, + { 0xEF, "EFI filesystem" }, + { 0xF0, "Linux/PA-RISC boot" }, + { 0xF2, "DOS 3.3+ second" }, + { 0xFA, "Bochs" }, + { 0xFB, "VmWare" }, + { 0xFC, "VmWare swap" }, + { 0xFD, "Linux RAID" }, + { 0xFE, "NT hidden" }, +}; + +VOID +GetPartTypeStringFromPartitionType( + UCHAR partitionType, + PCHAR strPartType, + DWORD cchPartType) +{ + /* Determine partition type */ + + if (IsContainerPartition(partitionType)) + { + StringCchCopy(strPartType, cchPartType, MUIGetString(STRING_EXTENDED_PARTITION)); + } + else if (partitionType == PARTITION_ENTRY_UNUSED) + { + StringCchCopy(strPartType, cchPartType, MUIGetString(STRING_FORMATUNUSED)); + } + else + { + UINT i; + + /* Do the table lookup */ + for (i = 0; i < ARRAYSIZE(PartitionTypes); i++) + { + if (partitionType == PartitionTypes[i].Type) + { + StringCchCopy(strPartType, cchPartType, PartitionTypes[i].Description); + return; + } + } + + /* We are here because the partition type is unknown */ + StringCchCopy(strPartType, cchPartType, MUIGetString(STRING_FORMATUNKNOWN)); + } +} + /* FUNCTIONS ****************************************************************/ #ifdef DUMP_PARTITION_TABLE @@ -1448,66 +1621,6 @@ PrintEmptyLine( } -VOID -GetPartTypeStringFromPartitionTypeW( - UCHAR partitionType, - PWCHAR strPartType, - DWORD cchPartType) -{ - CHAR partTypeString[32]; - - GetPartTypeStringFromPartitionTypeA(partitionType, - partTypeString, - 30); - - mbstowcs(strPartType, - partTypeString, - (30 < cchPartType) ? 30 : cchPartType); -} - - -VOID -GetPartTypeStringFromPartitionTypeA( - UCHAR partitionType, - PCHAR strPartType, - DWORD cchPartType) -{ - /* Determine partition type */ - if ((partitionType == PARTITION_FAT_12) || - (partitionType == PARTITION_FAT_16) || - (partitionType == PARTITION_HUGE) || - (partitionType == PARTITION_XINT13)) - { - StringCchCopy(strPartType, cchPartType, "FAT"); - } - else if ((partitionType == PARTITION_FAT32) || - (partitionType == PARTITION_FAT32_XINT13)) - { - StringCchCopy(strPartType, cchPartType, "FAT32"); - } - else if (partitionType == PARTITION_EXT2) - { - StringCchCopy(strPartType, cchPartType, "EXT2"); - } - else if (partitionType == PARTITION_IFS) - { - StringCchCopy(strPartType, cchPartType, "NTFS"); /* FIXME: Not quite correct! */ - } - else if (IsContainerPartition(partitionType)) - { - StringCchCopy(strPartType, cchPartType, MUIGetString(STRING_EXTENDED_PARTITION)); - } - else if (partitionType == PARTITION_ENTRY_UNUSED) - { - StringCchCopy(strPartType, cchPartType, MUIGetString(STRING_FORMATUNUSED)); - } - else - { - StringCchCopy(strPartType, cchPartType, MUIGetString(STRING_FORMATUNKNOWN)); - } -} - - static VOID PrintPartitionData( @@ -1572,9 +1685,9 @@ PrintPartitionData( } else if (PartEntry->IsPartitioned == TRUE) { - GetPartTypeStringFromPartitionTypeA(PartEntry->PartitionType, - PartTypeString, - 30); + GetPartTypeStringFromPartitionType(PartEntry->PartitionType, + PartTypeString, + 30); PartType = PartTypeString; } diff --git a/reactos/base/setup/usetup/partlist.h b/reactos/base/setup/usetup/partlist.h index 049e2f75757..a4111b11d33 100644 --- a/reactos/base/setup/usetup/partlist.h +++ b/reactos/base/setup/usetup/partlist.h @@ -291,15 +291,9 @@ GetNextUncheckedPartition( OUT PPARTENTRY *pPartEntry); VOID -GetPartTypeStringFromPartitionTypeA( +GetPartTypeStringFromPartitionType( UCHAR partitionType, - PSTR strPartType, - DWORD cchPartType); - -VOID -GetPartTypeStringFromPartitionTypeW( - UCHAR partitionType, - PWSTR strPartType, + PCHAR strPartType, DWORD cchPartType); /* EOF */