Author: hbelusca
Date: Sun May 21 23:30:45 2017
New Revision: 74615
URL:
http://svn.reactos.org/svn/reactos?rev=74615&view=rev
Log:
[USETUP]: Addendum to r74614: Code adaptations for the "STRING_HDDINFOUNKx"
string labels renaming. The extra slot added to some of the strings is to indicate whether
the disk is MBR or GPT.
As attentive readers will notice, the code that "determines" whether the disk is
either MBR or GPT is of course wrong: it's just a temporary placeholder code that
should currently just show "MBR".
Having the NoMbr flag mostly signifies that the disk is uninitialized. A GPT disk also has
a MBR but it's for "backcompatibility" / "protective" reasons (so
that MBR-only tools would see the disk as just a big 1-partitioned only disk with which
they could barely do anything). A real involved test for the nature of the disk should
involve calling the correct IOCTLs in the disk detection code in partlist.c . This is for
the future (and when ReactOS will better support GPT disks).
Modified:
branches/setup_improvements/base/setup/usetup/interface/usetup.c
branches/setup_improvements/base/setup/usetup/partlist.c
Modified: branches/setup_improvements/base/setup/usetup/interface/usetup.c
URL:
http://svn.reactos.org/svn/reactos/branches/setup_improvements/base/setup/u…
==============================================================================
--- branches/setup_improvements/base/setup/usetup/interface/usetup.c [iso-8859-1]
(original)
+++ branches/setup_improvements/base/setup/usetup/interface/usetup.c [iso-8859-1] Sun May
21 23:30:45 2017
@@ -2068,25 +2068,27 @@
if (DiskEntry->DriverName.Length > 0)
{
CONSOLE_PrintTextXY(6, 10,
- MUIGetString(STRING_HDINFOPARTCREATE),
+ MUIGetString(STRING_HDINFOPARTCREATE_1),
DiskSize,
Unit,
DiskEntry->DiskNumber,
DiskEntry->Port,
DiskEntry->Bus,
DiskEntry->Id,
- &DiskEntry->DriverName);
+ &DiskEntry->DriverName,
+ DiskEntry->NoMbr ? "GPT" : "MBR");
}
else
{
CONSOLE_PrintTextXY(6, 10,
- MUIGetString(STRING_HDDINFOUNK1),
+ MUIGetString(STRING_HDINFOPARTCREATE_2),
DiskSize,
Unit,
DiskEntry->DiskNumber,
DiskEntry->Port,
DiskEntry->Bus,
- DiskEntry->Id);
+ DiskEntry->Id,
+ DiskEntry->NoMbr ? "GPT" : "MBR");
}
CONSOLE_SetTextXY(6, 12, MUIGetString(STRING_HDDSIZE));
@@ -2225,25 +2227,27 @@
if (DiskEntry->DriverName.Length > 0)
{
CONSOLE_PrintTextXY(6, 10,
- MUIGetString(STRING_HDINFOPARTCREATE),
+ MUIGetString(STRING_HDINFOPARTCREATE_1),
DiskSize,
Unit,
DiskEntry->DiskNumber,
DiskEntry->Port,
DiskEntry->Bus,
DiskEntry->Id,
- &DiskEntry->DriverName);
+ &DiskEntry->DriverName,
+ DiskEntry->NoMbr ? "GPT" : "MBR");
}
else
{
CONSOLE_PrintTextXY(6, 10,
- MUIGetString(STRING_HDDINFOUNK1),
+ MUIGetString(STRING_HDINFOPARTCREATE_2),
DiskSize,
Unit,
DiskEntry->DiskNumber,
DiskEntry->Port,
DiskEntry->Bus,
- DiskEntry->Id);
+ DiskEntry->Id,
+ DiskEntry->NoMbr ? "GPT" : "MBR");
}
CONSOLE_SetTextXY(6, 12, MUIGetString(STRING_HDDSIZE));
@@ -2381,25 +2385,27 @@
if (DiskEntry->DriverName.Length > 0)
{
CONSOLE_PrintTextXY(6, 10,
- MUIGetString(STRING_HDINFOPARTCREATE),
+ MUIGetString(STRING_HDINFOPARTCREATE_1),
DiskSize,
Unit,
DiskEntry->DiskNumber,
DiskEntry->Port,
DiskEntry->Bus,
DiskEntry->Id,
- &DiskEntry->DriverName);
+ &DiskEntry->DriverName,
+ DiskEntry->NoMbr ? "GPT" : "MBR");
}
else
{
CONSOLE_PrintTextXY(6, 10,
- MUIGetString(STRING_HDDINFOUNK1),
+ MUIGetString(STRING_HDINFOPARTCREATE_2),
DiskSize,
Unit,
DiskEntry->DiskNumber,
DiskEntry->Port,
DiskEntry->Bus,
- DiskEntry->Id);
+ DiskEntry->Id,
+ DiskEntry->NoMbr ? "GPT" : "MBR");
}
CONSOLE_SetTextXY(6, 12, MUIGetString(STRING_HDDSIZE));
@@ -2618,25 +2624,27 @@
if (DiskEntry->DriverName.Length > 0)
{
CONSOLE_PrintTextXY(6, 12,
- MUIGetString(STRING_HDINFOPARTDELETE),
+ MUIGetString(STRING_HDINFOPARTDELETE_1),
DiskSize,
Unit,
DiskEntry->DiskNumber,
DiskEntry->Port,
DiskEntry->Bus,
DiskEntry->Id,
- &DiskEntry->DriverName);
+ &DiskEntry->DriverName,
+ DiskEntry->NoMbr ? "GPT" : "MBR");
}
else
{
CONSOLE_PrintTextXY(6, 12,
- MUIGetString(STRING_HDDINFOUNK3),
+ MUIGetString(STRING_HDINFOPARTDELETE_2),
DiskSize,
Unit,
DiskEntry->DiskNumber,
DiskEntry->Port,
DiskEntry->Bus,
- DiskEntry->Id);
+ DiskEntry->Id,
+ DiskEntry->NoMbr ? "GPT" : "MBR");
}
while (TRUE)
@@ -2841,14 +2849,15 @@
PartTypeString);
#endif
- CONSOLE_PrintTextXY(8, 10, MUIGetString(STRING_HDINFOPARTZEROED),
+ CONSOLE_PrintTextXY(8, 10, MUIGetString(STRING_HDINFOPARTZEROED_1),
DiskEntry->DiskNumber,
DiskSize,
DiskUnit,
DiskEntry->Port,
DiskEntry->Bus,
DiskEntry->Id,
- &DiskEntry->DriverName);
+ &DiskEntry->DriverName,
+ DiskEntry->NoMbr ? "GPT" : "MBR");
CONSOLE_SetTextXY(6, 12, MUIGetString(STRING_PARTFORMAT));
@@ -2901,14 +2910,15 @@
PartUnit);
}
- CONSOLE_PrintTextXY(6, 12, MUIGetString(STRING_HDINFOPARTEXISTS),
+ CONSOLE_PrintTextXY(6, 12, MUIGetString(STRING_HDINFOPARTEXISTS_1),
DiskEntry->DiskNumber,
DiskSize,
DiskUnit,
DiskEntry->Port,
DiskEntry->Bus,
DiskEntry->Id,
- &DiskEntry->DriverName);
+ &DiskEntry->DriverName,
+ DiskEntry->NoMbr ? "GPT" : "MBR");
}
MUIDisplayPage(SELECT_FILE_SYSTEM_PAGE);
@@ -2923,8 +2933,6 @@
return QUIT_PAGE;
}
}
-
- DrawFileSystemList(FileSystemList);
if (RepairUpdateFlag)
{
@@ -2948,6 +2956,8 @@
return CHECK_FILE_SYSTEM_PAGE;
}
+
+ DrawFileSystemList(FileSystemList);
while (TRUE)
{
@@ -4451,15 +4461,12 @@
static PAGE_NUMBER
BootLoaderHarddiskVbrPage(PINPUT_RECORD Ir)
{
- UCHAR PartitionType;
NTSTATUS Status;
-
- PartitionType = PartitionList->SystemPartition->PartitionType;
Status = InstallVBRToPartition(&SystemRootPath,
&SourceRootPath,
&DestinationArcPath,
- PartitionType);
+ PartitionList->SystemPartition->PartitionType);
if (!NT_SUCCESS(Status))
{
MUIDisplayError(ERROR_WRITE_BOOT, Ir, POPUP_WAIT_ENTER);
@@ -4487,19 +4494,16 @@
static PAGE_NUMBER
BootLoaderHarddiskMbrPage(PINPUT_RECORD Ir)
{
- UCHAR PartitionType;
NTSTATUS Status;
WCHAR DestinationDevicePathBuffer[MAX_PATH];
WCHAR SourceMbrPathBuffer[MAX_PATH];
WCHAR DstPath[MAX_PATH];
/* Step 1: Write the VBR */
- PartitionType = PartitionList->SystemPartition->PartitionType;
-
Status = InstallVBRToPartition(&SystemRootPath,
&SourceRootPath,
&DestinationArcPath,
- PartitionType);
+ PartitionList->SystemPartition->PartitionType);
if (!NT_SUCCESS(Status))
{
MUIDisplayError(ERROR_WRITE_BOOT, Ir, POPUP_WAIT_ENTER);
@@ -4652,9 +4656,7 @@
MUIDisplayPage(SUCCESS_PAGE);
if (IsUnattendedSetup)
- {
return FLUSH_PAGE;
- }
while (TRUE)
{
Modified: branches/setup_improvements/base/setup/usetup/partlist.c
URL:
http://svn.reactos.org/svn/reactos/branches/setup_improvements/base/setup/u…
==============================================================================
--- branches/setup_improvements/base/setup/usetup/partlist.c [iso-8859-1] (original)
+++ branches/setup_improvements/base/setup/usetup/partlist.c [iso-8859-1] Sun May 21
23:30:45 2017
@@ -458,25 +458,27 @@
if (DiskEntry->DriverName.Length > 0)
{
sprintf(LineBuffer,
- MUIGetString(STRING_HDINFOPARTSELECT),
+ MUIGetString(STRING_HDINFOPARTSELECT_1),
DiskSize.u.LowPart,
Unit,
DiskEntry->DiskNumber,
DiskEntry->Port,
DiskEntry->Bus,
DiskEntry->Id,
- DiskEntry->DriverName.Buffer);
+ &DiskEntry->DriverName,
+ DiskEntry->NoMbr ? "GPT" : "MBR");
}
else
{
sprintf(LineBuffer,
- MUIGetString(STRING_HDDINFOUNK6),
+ MUIGetString(STRING_HDINFOPARTSELECT_2),
DiskSize.u.LowPart,
Unit,
DiskEntry->DiskNumber,
DiskEntry->Port,
DiskEntry->Bus,
- DiskEntry->Id);
+ DiskEntry->Id,
+ DiskEntry->NoMbr ? "GPT" : "MBR");
}
if (ListUi->Line >= 0 && ListUi->Line <= Height)