Author: hbelusca
Date: Sat Feb 27 20:49:17 2016
New Revision: 70792
URL:
http://svn.reactos.org/svn/reactos?rev=70792&view=rev
Log:
[USETUP]
- Use a more complete list of partition type names for displaying the partition types in
the list.
CORE-4043 #resolve
- HACK (for ChkDsk): Guess the filesystem type of the current partition, based on its
partition type ID. This is hackish because partitions with the same ID can be formatted
with different file systems (e.g.: Linux partition ID 0x83 can cover EXT2/3/4, ReiserFS,
etc). Therefore do NOT use GetPartTypeStringFromPartitionType for that!! (see r68156 and
r70283).
Modified:
trunk/reactos/base/setup/usetup/bootsup.c
trunk/reactos/base/setup/usetup/interface/usetup.c
trunk/reactos/base/setup/usetup/lang/bg-BG.h
trunk/reactos/base/setup/usetup/lang/bn-BD.h
trunk/reactos/base/setup/usetup/lang/cs-CZ.h
trunk/reactos/base/setup/usetup/lang/da-DK.h
trunk/reactos/base/setup/usetup/lang/de-DE.h
trunk/reactos/base/setup/usetup/lang/el-GR.h
trunk/reactos/base/setup/usetup/lang/en-US.h
trunk/reactos/base/setup/usetup/lang/es-ES.h
trunk/reactos/base/setup/usetup/lang/et-EE.h
trunk/reactos/base/setup/usetup/lang/fr-FR.h
trunk/reactos/base/setup/usetup/lang/he-IL.h
trunk/reactos/base/setup/usetup/lang/it-IT.h
trunk/reactos/base/setup/usetup/lang/ja-JP.h
trunk/reactos/base/setup/usetup/lang/lt-LT.h
trunk/reactos/base/setup/usetup/lang/ms-MY.h
trunk/reactos/base/setup/usetup/lang/nl-NL.h
trunk/reactos/base/setup/usetup/lang/pl-PL.h
trunk/reactos/base/setup/usetup/lang/pt-BR.h
trunk/reactos/base/setup/usetup/lang/ro-RO.h
trunk/reactos/base/setup/usetup/lang/ru-RU.h
trunk/reactos/base/setup/usetup/lang/sk-SK.h
trunk/reactos/base/setup/usetup/lang/sq-AL.h
trunk/reactos/base/setup/usetup/lang/sv-SE.h
trunk/reactos/base/setup/usetup/lang/tr-TR.h
trunk/reactos/base/setup/usetup/lang/uk-UA.h
trunk/reactos/base/setup/usetup/partlist.c
trunk/reactos/base/setup/usetup/partlist.h
Modified: trunk/reactos/base/setup/usetup/bootsup.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/setup/usetup/bootsup.…
==============================================================================
--- trunk/reactos/base/setup/usetup/bootsup.c [iso-8859-1] (original)
+++ trunk/reactos/base/setup/usetup/bootsup.c [iso-8859-1] Sat Feb 27 20:49:17 2016
@@ -2657,7 +2657,7 @@
break;
default:
- DPRINT1("PartitionType 0x%02x unknown!\n", PartitionType);
+ DPRINT1("PartitionType 0x%02X unknown!\n", PartitionType);
break;
}
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] Sat Feb 27 20:49:17
2016
@@ -2398,9 +2398,7 @@
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 @@
}
/* adjust partition type */
- GetPartTypeStringFromPartitionTypeA(PartEntry->PartitionType,
- PartTypeString,
- 30);
+ GetPartTypeStringFromPartitionType(PartEntry->PartitionType, PartTypeString, 30);
if (PartEntry->AutoCreate == TRUE)
{
@@ -3068,7 +3064,7 @@
UNICODE_STRING PartitionRootPath;
WCHAR PathBuffer[MAX_PATH];
CHAR Buffer[MAX_PATH];
- WCHAR PartTypeString[32];
+ LPWSTR FileSystemName = NULL;
PDISKENTRY DiskEntry;
PPARTENTRY PartEntry;
NTSTATUS Status;
@@ -3101,14 +3097,49 @@
CurrentFileSystem = PartEntry->FileSystem;
if (CurrentFileSystem == NULL || CurrentFileSystem->FileSystemName == NULL)
{
- GetPartTypeStringFromPartitionTypeW(PartEntry->PartitionType, PartTypeString,
30);
-
- DPRINT("PartTypeString: %S\n", PartTypeString);
-
- if (PartTypeString != NULL)
+ /*
+ * 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! */
+ }
+
+ DPRINT1("CheckFileSystemPage -- PartitionType: 0x%02X ; FileSystemName
(guessed): %S\n",
+ PartEntry->PartitionType, FileSystemName);
+
+ 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)
Modified: trunk/reactos/base/setup/usetup/lang/bg-BG.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/setup/usetup/lang/bg-…
==============================================================================
--- trunk/reactos/base/setup/usetup/lang/bg-BG.h [iso-8859-1] (original)
+++ trunk/reactos/base/setup/usetup/lang/bg-BG.h [iso-8859-1] Sat Feb 27 20:49:17 2016
@@ -1805,7 +1805,7 @@
{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 @@
{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,
Modified: trunk/reactos/base/setup/usetup/lang/bn-BD.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/setup/usetup/lang/bn-…
==============================================================================
--- trunk/reactos/base/setup/usetup/lang/bn-BD.h [iso-8859-1] (original)
+++ trunk/reactos/base/setup/usetup/lang/bn-BD.h [iso-8859-1] Sat Feb 27 20:49:17 2016
@@ -1790,7 +1790,7 @@
{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 @@
{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,
Modified: trunk/reactos/base/setup/usetup/lang/cs-CZ.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/setup/usetup/lang/cs-…
==============================================================================
--- trunk/reactos/base/setup/usetup/lang/cs-CZ.h [iso-8859-1] (original)
+++ trunk/reactos/base/setup/usetup/lang/cs-CZ.h [iso-8859-1] Sat Feb 27 20:49:17 2016
@@ -1798,7 +1798,7 @@
{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 @@
{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,
Modified: trunk/reactos/base/setup/usetup/lang/da-DK.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/setup/usetup/lang/da-…
==============================================================================
--- trunk/reactos/base/setup/usetup/lang/da-DK.h [iso-8859-1] (original)
+++ trunk/reactos/base/setup/usetup/lang/da-DK.h [iso-8859-1] Sat Feb 27 20:49:17 2016
@@ -1810,7 +1810,7 @@
{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 @@
{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,
Modified: trunk/reactos/base/setup/usetup/lang/de-DE.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/setup/usetup/lang/de-…
==============================================================================
--- trunk/reactos/base/setup/usetup/lang/de-DE.h [iso-8859-1] (original)
+++ trunk/reactos/base/setup/usetup/lang/de-DE.h [iso-8859-1] Sat Feb 27 20:49:17 2016
@@ -1794,7 +1794,7 @@
{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 @@
{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,
Modified: trunk/reactos/base/setup/usetup/lang/el-GR.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/setup/usetup/lang/el-…
==============================================================================
--- trunk/reactos/base/setup/usetup/lang/el-GR.h [iso-8859-1] (original)
+++ trunk/reactos/base/setup/usetup/lang/el-GR.h [iso-8859-1] Sat Feb 27 20:49:17 2016
@@ -1809,7 +1809,7 @@
{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 @@
{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,
Modified: trunk/reactos/base/setup/usetup/lang/en-US.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/setup/usetup/lang/en-…
==============================================================================
--- trunk/reactos/base/setup/usetup/lang/en-US.h [iso-8859-1] (original)
+++ trunk/reactos/base/setup/usetup/lang/en-US.h [iso-8859-1] Sat Feb 27 20:49:17 2016
@@ -1790,7 +1790,7 @@
{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 @@
{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,
Modified: trunk/reactos/base/setup/usetup/lang/es-ES.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/setup/usetup/lang/es-…
==============================================================================
--- trunk/reactos/base/setup/usetup/lang/es-ES.h [iso-8859-1] (original)
+++ trunk/reactos/base/setup/usetup/lang/es-ES.h [iso-8859-1] Sat Feb 27 20:49:17 2016
@@ -1800,7 +1800,7 @@
{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 @@
{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,
Modified: trunk/reactos/base/setup/usetup/lang/et-EE.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/setup/usetup/lang/et-…
==============================================================================
--- trunk/reactos/base/setup/usetup/lang/et-EE.h [iso-8859-1] (original)
+++ trunk/reactos/base/setup/usetup/lang/et-EE.h [iso-8859-1] Sat Feb 27 20:49:17 2016
@@ -1790,7 +1790,7 @@
{STRING_HDDINFOUNK1,
"%I64u %s Kävaketas %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 Kävaketas %lu (Port=%hu, Siin=%hu, Id=%hu) - %wZ."},
{STRING_HDDINFOUNK3,
@@ -1798,7 +1798,7 @@
{STRING_HDINFOPARTZEROED,
"Kävaketas %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,
"Kävaketas %lu (%I64u %s), Port=%hu, Siin=%hu, Id=%hu (%wZ)."},
{STRING_HDDINFOUNK5,
Modified: trunk/reactos/base/setup/usetup/lang/fr-FR.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/setup/usetup/lang/fr-…
==============================================================================
--- trunk/reactos/base/setup/usetup/lang/fr-FR.h [iso-8859-1] (original)
+++ trunk/reactos/base/setup/usetup/lang/fr-FR.h [iso-8859-1] Sat Feb 27 20:49:17 2016
@@ -1803,7 +1803,7 @@
{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 @@
{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,
Modified: trunk/reactos/base/setup/usetup/lang/he-IL.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/setup/usetup/lang/he-…
==============================================================================
--- trunk/reactos/base/setup/usetup/lang/he-IL.h [iso-8859-1] (original)
+++ trunk/reactos/base/setup/usetup/lang/he-IL.h [iso-8859-1] Sat Feb 27 20:49:17 2016
@@ -1792,7 +1792,7 @@
{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 @@
{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,
Modified: trunk/reactos/base/setup/usetup/lang/it-IT.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/setup/usetup/lang/it-…
==============================================================================
--- trunk/reactos/base/setup/usetup/lang/it-IT.h [iso-8859-1] (original)
+++ trunk/reactos/base/setup/usetup/lang/it-IT.h [iso-8859-1] Sat Feb 27 20:49:17 2016
@@ -1800,7 +1800,7 @@
{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 @@
{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,
Modified: trunk/reactos/base/setup/usetup/lang/ja-JP.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/setup/usetup/lang/ja-…
==============================================================================
--- trunk/reactos/base/setup/usetup/lang/ja-JP.h [iso-8859-1] (original)
+++ trunk/reactos/base/setup/usetup/lang/ja-JP.h [iso-8859-1] Sat Feb 27 20:49:17 2016
@@ -1794,7 +1794,7 @@
{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 @@
{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,
Modified: trunk/reactos/base/setup/usetup/lang/lt-LT.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/setup/usetup/lang/lt-…
==============================================================================
--- trunk/reactos/base/setup/usetup/lang/lt-LT.h [iso-8859-1] (original)
+++ trunk/reactos/base/setup/usetup/lang/lt-LT.h [iso-8859-1] Sat Feb 27 20:49:17 2016
@@ -1800,7 +1800,7 @@
{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 @@
{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,
Modified: trunk/reactos/base/setup/usetup/lang/ms-MY.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/setup/usetup/lang/ms-…
==============================================================================
--- trunk/reactos/base/setup/usetup/lang/ms-MY.h [iso-8859-1] (original)
+++ trunk/reactos/base/setup/usetup/lang/ms-MY.h [iso-8859-1] Sat Feb 27 20:49:17 2016
@@ -1679,7 +1679,7 @@
{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 @@
{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,
Modified: trunk/reactos/base/setup/usetup/lang/nl-NL.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/setup/usetup/lang/nl-…
==============================================================================
--- trunk/reactos/base/setup/usetup/lang/nl-NL.h [iso-8859-1] (original)
+++ trunk/reactos/base/setup/usetup/lang/nl-NL.h [iso-8859-1] Sat Feb 27 20:49:17 2016
@@ -1832,7 +1832,7 @@
{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 @@
{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,
Modified: trunk/reactos/base/setup/usetup/lang/pl-PL.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/setup/usetup/lang/pl-…
==============================================================================
--- trunk/reactos/base/setup/usetup/lang/pl-PL.h [iso-8859-1] (original)
+++ trunk/reactos/base/setup/usetup/lang/pl-PL.h [iso-8859-1] Sat Feb 27 20:49:17 2016
@@ -1801,7 +1801,7 @@
{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 @@
{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,
Modified: trunk/reactos/base/setup/usetup/lang/pt-BR.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/setup/usetup/lang/pt-…
==============================================================================
--- trunk/reactos/base/setup/usetup/lang/pt-BR.h [iso-8859-1] (original)
+++ trunk/reactos/base/setup/usetup/lang/pt-BR.h [iso-8859-1] Sat Feb 27 20:49:17 2016
@@ -1830,7 +1830,7 @@
{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 @@
{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,
Modified: trunk/reactos/base/setup/usetup/lang/ro-RO.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/setup/usetup/lang/ro-…
==============================================================================
--- trunk/reactos/base/setup/usetup/lang/ro-RO.h [iso-8859-1] (original)
+++ trunk/reactos/base/setup/usetup/lang/ro-RO.h [iso-8859-1] Sat Feb 27 20:49:17 2016
@@ -1861,7 +1861,7 @@
{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 @@
{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,
Modified: trunk/reactos/base/setup/usetup/lang/ru-RU.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/setup/usetup/lang/ru-…
==============================================================================
--- trunk/reactos/base/setup/usetup/lang/ru-RU.h [iso-8859-1] (original)
+++ trunk/reactos/base/setup/usetup/lang/ru-RU.h [iso-8859-1] Sat Feb 27 20:49:17 2016
@@ -1791,7 +1791,7 @@
{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 @@
{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,
Modified: trunk/reactos/base/setup/usetup/lang/sk-SK.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/setup/usetup/lang/sk-…
==============================================================================
--- trunk/reactos/base/setup/usetup/lang/sk-SK.h [iso-8859-1] (original)
+++ trunk/reactos/base/setup/usetup/lang/sk-SK.h [iso-8859-1] Sat Feb 27 20:49:17 2016
@@ -1804,7 +1804,7 @@
{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 @@
{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,
Modified: trunk/reactos/base/setup/usetup/lang/sq-AL.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/setup/usetup/lang/sq-…
==============================================================================
--- trunk/reactos/base/setup/usetup/lang/sq-AL.h [iso-8859-1] (original)
+++ trunk/reactos/base/setup/usetup/lang/sq-AL.h [iso-8859-1] Sat Feb 27 20:49:17 2016
@@ -1797,7 +1797,7 @@
{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 @@
{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,
Modified: trunk/reactos/base/setup/usetup/lang/sv-SE.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/setup/usetup/lang/sv-…
==============================================================================
--- trunk/reactos/base/setup/usetup/lang/sv-SE.h [iso-8859-1] (original)
+++ trunk/reactos/base/setup/usetup/lang/sv-SE.h [iso-8859-1] Sat Feb 27 20:49:17 2016
@@ -1800,7 +1800,7 @@
{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 @@
{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,
Modified: trunk/reactos/base/setup/usetup/lang/tr-TR.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/setup/usetup/lang/tr-…
==============================================================================
--- trunk/reactos/base/setup/usetup/lang/tr-TR.h [iso-8859-1] (original)
+++ trunk/reactos/base/setup/usetup/lang/tr-TR.h [iso-8859-1] Sat Feb 27 20:49:17 2016
@@ -1771,7 +1771,7 @@
{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 @@
{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,
Modified: trunk/reactos/base/setup/usetup/lang/uk-UA.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/setup/usetup/lang/uk-…
==============================================================================
--- trunk/reactos/base/setup/usetup/lang/uk-UA.h [iso-8859-1] (original)
+++ trunk/reactos/base/setup/usetup/lang/uk-UA.h [iso-8859-1] Sat Feb 27 20:49:17 2016
@@ -1800,7 +1800,7 @@
{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 @@
{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,
Modified: trunk/reactos/base/setup/usetup/partlist.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/setup/usetup/partlist…
==============================================================================
--- trunk/reactos/base/setup/usetup/partlist.c [iso-8859-1] (original)
+++ trunk/reactos/base/setup/usetup/partlist.c [iso-8859-1] Sat Feb 27 20:49:17 2016
@@ -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 @@
}
-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 @@
}
else if (PartEntry->IsPartitioned == TRUE)
{
- GetPartTypeStringFromPartitionTypeA(PartEntry->PartitionType,
- PartTypeString,
- 30);
+ GetPartTypeStringFromPartitionType(PartEntry->PartitionType,
+ PartTypeString,
+ 30);
PartType = PartTypeString;
}
Modified: trunk/reactos/base/setup/usetup/partlist.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/setup/usetup/partlist…
==============================================================================
--- trunk/reactos/base/setup/usetup/partlist.h [iso-8859-1] (original)
+++ trunk/reactos/base/setup/usetup/partlist.h [iso-8859-1] Sat Feb 27 20:49:17 2016
@@ -291,15 +291,9 @@
OUT PPARTENTRY *pPartEntry);
VOID
-GetPartTypeStringFromPartitionTypeA(
+GetPartTypeStringFromPartitionType(
UCHAR partitionType,
- PSTR strPartType,
+ PCHAR strPartType,
DWORD cchPartType);
-VOID
-GetPartTypeStringFromPartitionTypeW(
- UCHAR partitionType,
- PWSTR strPartType,
- DWORD cchPartType);
-
/* EOF */