mirror of
https://github.com/reactos/reactos.git
synced 2025-06-14 16:58:29 +00:00
[USETUP]
Implement pre-install 'select format' and 'format' pages. These enable the user to re-format an existing install partitition. CORE-9005 #resolve svn path=/trunk/; revision=65962
This commit is contained in:
parent
44c816e20c
commit
a5c4f052be
32 changed files with 563 additions and 137 deletions
|
@ -71,7 +71,8 @@ CreateFileSystemList(
|
||||||
IN SHORT Left,
|
IN SHORT Left,
|
||||||
IN SHORT Top,
|
IN SHORT Top,
|
||||||
IN BOOLEAN ForceFormat,
|
IN BOOLEAN ForceFormat,
|
||||||
IN LPCWSTR ForceFileSystem)
|
IN LPCWSTR ForceFileSystem,
|
||||||
|
IN UCHAR PartitionType)
|
||||||
{
|
{
|
||||||
PFILE_SYSTEM_LIST List;
|
PFILE_SYSTEM_LIST List;
|
||||||
PFILE_SYSTEM_ITEM Item;
|
PFILE_SYSTEM_ITEM Item;
|
||||||
|
@ -86,7 +87,7 @@ CreateFileSystemList(
|
||||||
List->Selected = NULL;
|
List->Selected = NULL;
|
||||||
InitializeListHead(&List->ListHead);
|
InitializeListHead(&List->ListHead);
|
||||||
|
|
||||||
HOST_CreateFileSystemList(List);
|
HOST_CreateFileSystemList(List, PartitionType);
|
||||||
|
|
||||||
if (!ForceFormat)
|
if (!ForceFormat)
|
||||||
{
|
{
|
||||||
|
|
|
@ -57,7 +57,8 @@ CreateFileSystemList(
|
||||||
IN SHORT Left,
|
IN SHORT Left,
|
||||||
IN SHORT Top,
|
IN SHORT Top,
|
||||||
IN BOOLEAN ForceFormat,
|
IN BOOLEAN ForceFormat,
|
||||||
IN LPCWSTR ForceFileSystem);
|
IN LPCWSTR ForceFileSystem,
|
||||||
|
IN UCHAR PartitionType);
|
||||||
|
|
||||||
VOID
|
VOID
|
||||||
DestroyFileSystemList(
|
DestroyFileSystemList(
|
||||||
|
|
|
@ -22,7 +22,8 @@ HOST_InitMemory(VOID);
|
||||||
|
|
||||||
BOOLEAN
|
BOOLEAN
|
||||||
HOST_CreateFileSystemList(
|
HOST_CreateFileSystemList(
|
||||||
IN PFILE_SYSTEM_LIST List);
|
IN PFILE_SYSTEM_LIST List,
|
||||||
|
IN UCHAR PartitionType);
|
||||||
|
|
||||||
BOOLEAN
|
BOOLEAN
|
||||||
HOST_FormatPartition(
|
HOST_FormatPartition(
|
||||||
|
|
|
@ -1606,7 +1606,7 @@ SelectPartitionPage(PINPUT_RECORD Ir)
|
||||||
{
|
{
|
||||||
MUIDisplayError(ERROR_INSUFFICIENT_PARTITION_SIZE, Ir, POPUP_WAIT_ANY_KEY,
|
MUIDisplayError(ERROR_INSUFFICIENT_PARTITION_SIZE, Ir, POPUP_WAIT_ANY_KEY,
|
||||||
RequiredPartitionDiskSpace);
|
RequiredPartitionDiskSpace);
|
||||||
continue; //return SELECT_PARTITION_PAGE; /* let the user select another partition */
|
return SELECT_PARTITION_PAGE; /* let the user select another partition */
|
||||||
}
|
}
|
||||||
|
|
||||||
if (PartitionList->CurrentPartition == NULL ||
|
if (PartitionList->CurrentPartition == NULL ||
|
||||||
|
@ -1622,7 +1622,7 @@ SelectPartitionPage(PINPUT_RECORD Ir)
|
||||||
|
|
||||||
DestinationDriveLetter = (WCHAR)PartitionList->CurrentPartition->DriveLetter;
|
DestinationDriveLetter = (WCHAR)PartitionList->CurrentPartition->DriveLetter;
|
||||||
|
|
||||||
return INSTALL_DIRECTORY_PAGE;
|
return PRE_INSTALL_SELECT_FORMAT_PAGE;
|
||||||
}
|
}
|
||||||
else if (Ir->Event.KeyEvent.wVirtualKeyCode == 'P') /* P */
|
else if (Ir->Event.KeyEvent.wVirtualKeyCode == 'P') /* P */
|
||||||
{
|
{
|
||||||
|
@ -2281,7 +2281,7 @@ DeletePartitionPage(PINPUT_RECORD Ir)
|
||||||
ULONGLONG DiskSize;
|
ULONGLONG DiskSize;
|
||||||
ULONGLONG PartSize;
|
ULONGLONG PartSize;
|
||||||
PCHAR Unit;
|
PCHAR Unit;
|
||||||
PCHAR PartType;
|
PCHAR PartType = NULL;
|
||||||
NTSTATUS Status;
|
NTSTATUS Status;
|
||||||
|
|
||||||
if (PartitionList == NULL ||
|
if (PartitionList == NULL ||
|
||||||
|
@ -2298,37 +2298,29 @@ DeletePartitionPage(PINPUT_RECORD Ir)
|
||||||
MUIDisplayPage(DELETE_PARTITION_PAGE);
|
MUIDisplayPage(DELETE_PARTITION_PAGE);
|
||||||
|
|
||||||
/* Determine partition type */
|
/* Determine partition type */
|
||||||
PartType = NULL;
|
if ((PartEntry->PartitionType == PARTITION_FAT_12) ||
|
||||||
if (PartEntry->New == TRUE)
|
(PartEntry->PartitionType == PARTITION_FAT_16) ||
|
||||||
|
(PartEntry->PartitionType == PARTITION_HUGE) ||
|
||||||
|
(PartEntry->PartitionType == PARTITION_XINT13))
|
||||||
{
|
{
|
||||||
PartType = MUIGetString(STRING_UNFORMATTED);
|
PartType = "FAT";
|
||||||
}
|
}
|
||||||
else if (PartEntry->IsPartitioned == TRUE)
|
else if ((PartEntry->PartitionType == PARTITION_FAT32) ||
|
||||||
|
(PartEntry->PartitionType == PARTITION_FAT32_XINT13))
|
||||||
{
|
{
|
||||||
if ((PartEntry->PartitionType == PARTITION_FAT_12) ||
|
PartType = "FAT32";
|
||||||
(PartEntry->PartitionType == PARTITION_FAT_16) ||
|
}
|
||||||
(PartEntry->PartitionType == PARTITION_HUGE) ||
|
else if (PartEntry->PartitionType == PARTITION_EXT2)
|
||||||
(PartEntry->PartitionType == PARTITION_XINT13))
|
{
|
||||||
{
|
PartType = "EXT2";
|
||||||
PartType = "FAT";
|
}
|
||||||
}
|
else if (PartEntry->PartitionType == PARTITION_IFS)
|
||||||
else if ((PartEntry->PartitionType == PARTITION_FAT32) ||
|
{
|
||||||
(PartEntry->PartitionType == PARTITION_FAT32_XINT13))
|
PartType = "NTFS"; /* FIXME: Not quite correct! */
|
||||||
{
|
}
|
||||||
PartType = "FAT32";
|
else if (IsContainerPartition(PartEntry->PartitionType))
|
||||||
}
|
{
|
||||||
else if (PartEntry->PartitionType == PARTITION_EXT2)
|
PartType = MUIGetString(STRING_EXTENDED_PARTITION);
|
||||||
{
|
|
||||||
PartType = "EXT2";
|
|
||||||
}
|
|
||||||
else if (PartEntry->PartitionType == PARTITION_IFS)
|
|
||||||
{
|
|
||||||
PartType = "NTFS"; /* FIXME: Not quite correct! */
|
|
||||||
}
|
|
||||||
else if (IsContainerPartition(PartEntry->PartitionType))
|
|
||||||
{
|
|
||||||
PartType = MUIGetString(STRING_EXTENDED_PARTITION);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
PartSize = PartEntry->SectorCount.QuadPart * DiskEntry->BytesPerSector;
|
PartSize = PartEntry->SectorCount.QuadPart * DiskEntry->BytesPerSector;
|
||||||
|
@ -2617,14 +2609,16 @@ SelectFileSystemPage(PINPUT_RECORD Ir)
|
||||||
|
|
||||||
PartEntry->AutoCreate = FALSE;
|
PartEntry->AutoCreate = FALSE;
|
||||||
}
|
}
|
||||||
|
#if 0
|
||||||
else if (PartEntry->New == TRUE)
|
else if (PartEntry->New == TRUE)
|
||||||
{
|
{
|
||||||
CONSOLE_SetTextXY(6, 8, MUIGetString(STRING_NONFORMATTEDPART));
|
CONSOLE_SetTextXY(6, 8, MUIGetString(STRING_NONFORMATTEDPART));
|
||||||
CONSOLE_SetTextXY(6, 10, MUIGetString(STRING_PARTFORMAT));
|
CONSOLE_SetTextXY(6, 10, MUIGetString(STRING_PARTFORMAT));
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
CONSOLE_SetTextXY(6, 8, MUIGetString(STRING_INSTALLONPART));
|
CONSOLE_SetTextXY(6, 8, MUIGetString(STRING_FORMATPART));
|
||||||
|
|
||||||
if (PartType == NULL)
|
if (PartType == NULL)
|
||||||
{
|
{
|
||||||
|
@ -2661,14 +2655,12 @@ SelectFileSystemPage(PINPUT_RECORD Ir)
|
||||||
|
|
||||||
if (FileSystemList == NULL)
|
if (FileSystemList == NULL)
|
||||||
{
|
{
|
||||||
FileSystemList = CreateFileSystemList(6, 26, PartEntry->New, L"FAT");
|
FileSystemList = CreateFileSystemList(6, 26, TRUE, L"FAT", PARTITION_ENTRY_UNUSED);
|
||||||
if (FileSystemList == NULL)
|
if (FileSystemList == NULL)
|
||||||
{
|
{
|
||||||
/* FIXME: show an error dialog */
|
/* FIXME: show an error dialog */
|
||||||
return QUIT_PAGE;
|
return QUIT_PAGE;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* FIXME: Add file systems to list */
|
|
||||||
}
|
}
|
||||||
|
|
||||||
DrawFileSystemList(FileSystemList);
|
DrawFileSystemList(FileSystemList);
|
||||||
|
@ -2691,6 +2683,8 @@ SelectFileSystemPage(PINPUT_RECORD Ir)
|
||||||
{
|
{
|
||||||
DPRINT1("WriteDirtyPartitions() failed (Status 0x%08lx)\n", Status);
|
DPRINT1("WriteDirtyPartitions() failed (Status 0x%08lx)\n", Status);
|
||||||
MUIDisplayError(ERROR_WRITE_PTABLE, Ir, POPUP_WAIT_ENTER);
|
MUIDisplayError(ERROR_WRITE_PTABLE, Ir, POPUP_WAIT_ENTER);
|
||||||
|
DestroyFileSystemList(FileSystemList);
|
||||||
|
FileSystemList = NULL;
|
||||||
return QUIT_PAGE;
|
return QUIT_PAGE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2709,6 +2703,8 @@ SelectFileSystemPage(PINPUT_RECORD Ir)
|
||||||
{
|
{
|
||||||
if (ConfirmQuit(Ir) == TRUE)
|
if (ConfirmQuit(Ir) == TRUE)
|
||||||
{
|
{
|
||||||
|
DestroyFileSystemList(FileSystemList);
|
||||||
|
FileSystemList = NULL;
|
||||||
return QUIT_PAGE;
|
return QUIT_PAGE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2717,6 +2713,8 @@ SelectFileSystemPage(PINPUT_RECORD Ir)
|
||||||
else if ((Ir->Event.KeyEvent.uChar.AsciiChar == 0x00) &&
|
else if ((Ir->Event.KeyEvent.uChar.AsciiChar == 0x00) &&
|
||||||
(Ir->Event.KeyEvent.wVirtualKeyCode == VK_ESCAPE)) /* ESC */
|
(Ir->Event.KeyEvent.wVirtualKeyCode == VK_ESCAPE)) /* ESC */
|
||||||
{
|
{
|
||||||
|
DestroyFileSystemList(FileSystemList);
|
||||||
|
FileSystemList = NULL;
|
||||||
return SELECT_PARTITION_PAGE;
|
return SELECT_PARTITION_PAGE;
|
||||||
}
|
}
|
||||||
else if ((Ir->Event.KeyEvent.uChar.AsciiChar == 0x00) &&
|
else if ((Ir->Event.KeyEvent.uChar.AsciiChar == 0x00) &&
|
||||||
|
@ -2767,6 +2765,434 @@ FormatPartitionPage(PINPUT_RECORD Ir)
|
||||||
PPARTENTRY PartEntry;
|
PPARTENTRY PartEntry;
|
||||||
NTSTATUS Status;
|
NTSTATUS Status;
|
||||||
|
|
||||||
|
#ifndef NDEBUG
|
||||||
|
ULONG Line;
|
||||||
|
ULONG i;
|
||||||
|
PLIST_ENTRY Entry;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
MUIDisplayPage(FORMAT_PARTITION_PAGE);
|
||||||
|
|
||||||
|
if (PartitionList == NULL ||
|
||||||
|
PartitionList->CurrentDisk == NULL ||
|
||||||
|
PartitionList->CurrentPartition == NULL)
|
||||||
|
{
|
||||||
|
/* FIXME: show an error dialog */
|
||||||
|
DestroyFileSystemList(FileSystemList);
|
||||||
|
FileSystemList = NULL;
|
||||||
|
return QUIT_PAGE;
|
||||||
|
}
|
||||||
|
|
||||||
|
// DiskEntry = PartitionList->CurrentDisk;
|
||||||
|
PartEntry = PartitionList->CurrentPartition;
|
||||||
|
|
||||||
|
while (TRUE)
|
||||||
|
{
|
||||||
|
if (!IsUnattendedSetup)
|
||||||
|
{
|
||||||
|
CONSOLE_ConInKey(Ir);
|
||||||
|
}
|
||||||
|
|
||||||
|
if ((Ir->Event.KeyEvent.uChar.AsciiChar == 0x00) &&
|
||||||
|
(Ir->Event.KeyEvent.wVirtualKeyCode == VK_F3)) /* F3 */
|
||||||
|
{
|
||||||
|
if (ConfirmQuit(Ir) == TRUE)
|
||||||
|
{
|
||||||
|
DestroyFileSystemList(FileSystemList);
|
||||||
|
FileSystemList = NULL;
|
||||||
|
return QUIT_PAGE;
|
||||||
|
}
|
||||||
|
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
else if (Ir->Event.KeyEvent.wVirtualKeyCode == VK_RETURN || IsUnattendedSetup) /* ENTER */
|
||||||
|
{
|
||||||
|
CONSOLE_SetStatusText(MUIGetString(STRING_PLEASEWAIT));
|
||||||
|
|
||||||
|
if (!FileSystemList->Selected->FormatFunc)
|
||||||
|
{
|
||||||
|
DestroyFileSystemList(FileSystemList);
|
||||||
|
FileSystemList = NULL;
|
||||||
|
return QUIT_PAGE;
|
||||||
|
}
|
||||||
|
|
||||||
|
#ifndef NDEBUG
|
||||||
|
CONSOLE_PrintTextXY(6, 12,
|
||||||
|
"Disk: %I64u Cylinder: %I64u Track: %I64u",
|
||||||
|
DiskEntry->DiskSize,
|
||||||
|
DiskEntry->CylinderSize,
|
||||||
|
DiskEntry->TrackSize);
|
||||||
|
|
||||||
|
Line = 13;
|
||||||
|
DiskEntry = PartitionList->CurrentDisk;
|
||||||
|
Entry = DiskEntry->PartListHead.Flink;
|
||||||
|
|
||||||
|
while (Entry != &DiskEntry->PrimaryPartListHead)
|
||||||
|
{
|
||||||
|
PartEntry = CONTAINING_RECORD(Entry, PARTENTRY, ListEntry);
|
||||||
|
|
||||||
|
if (PartEntry->IsPartitioned == TRUE)
|
||||||
|
{
|
||||||
|
CONSOLE_PrintTextXY(6, Line,
|
||||||
|
"%2u: %2u %c %12I64u %12I64u %2u %c",
|
||||||
|
i,
|
||||||
|
PartEntry->PartitionNumber,
|
||||||
|
PartEntry->BootIndicator ? 'A' : '-',
|
||||||
|
PartEntry->StartSector.QuadPart,
|
||||||
|
PartEntry->SectorCount.QuadPart,
|
||||||
|
PartEntry->PartitionType,
|
||||||
|
PartEntry->Dirty ? '*' : ' ');
|
||||||
|
Line++;
|
||||||
|
}
|
||||||
|
|
||||||
|
Entry = Entry->Flink;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Restore the old entry */
|
||||||
|
PartEntry = PartitionList->CurrentPartition;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/* Set DestinationRootPath */
|
||||||
|
RtlFreeUnicodeString(&DestinationRootPath);
|
||||||
|
swprintf(PathBuffer,
|
||||||
|
L"\\Device\\Harddisk%lu\\Partition%lu",
|
||||||
|
PartitionList->CurrentDisk->DiskNumber,
|
||||||
|
PartitionList->CurrentPartition->PartitionNumber);
|
||||||
|
RtlCreateUnicodeString(&DestinationRootPath,
|
||||||
|
PathBuffer);
|
||||||
|
DPRINT("DestinationRootPath: %wZ\n", &DestinationRootPath);
|
||||||
|
|
||||||
|
if (FileSystemList->Selected->FormatFunc)
|
||||||
|
{
|
||||||
|
Status = FormatPartition(&DestinationRootPath,
|
||||||
|
FileSystemList->Selected);
|
||||||
|
if (!NT_SUCCESS(Status))
|
||||||
|
{
|
||||||
|
DPRINT1("FormatPartition() failed with status 0x%08lx\n", Status);
|
||||||
|
/* FIXME: show an error dialog */
|
||||||
|
DestroyFileSystemList(FileSystemList);
|
||||||
|
FileSystemList = NULL;
|
||||||
|
return QUIT_PAGE;
|
||||||
|
}
|
||||||
|
|
||||||
|
PartEntry->FormatState = Formatted;
|
||||||
|
}
|
||||||
|
|
||||||
|
#ifndef NDEBUG
|
||||||
|
CONSOLE_SetStatusText(" Done. Press any key ...");
|
||||||
|
CONSOLE_ConInKey(Ir);
|
||||||
|
#endif
|
||||||
|
|
||||||
|
DestroyFileSystemList(FileSystemList);
|
||||||
|
FileSystemList = NULL;
|
||||||
|
|
||||||
|
if (IsUnattendedSetup || InstallShortcut)
|
||||||
|
return INSTALL_DIRECTORY_PAGE;
|
||||||
|
else
|
||||||
|
return SELECT_PARTITION_PAGE;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return FORMAT_PARTITION_PAGE;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
static ULONG
|
||||||
|
CheckFileSystemPage(PINPUT_RECORD Ir)
|
||||||
|
{
|
||||||
|
PFILE_SYSTEM_ITEM CurrentFileSystem;
|
||||||
|
WCHAR PathBuffer[MAX_PATH];
|
||||||
|
CHAR Buffer[MAX_PATH];
|
||||||
|
NTSTATUS Status;
|
||||||
|
|
||||||
|
/* FIXME: code duplicated in FormatPartitionPage */
|
||||||
|
/* Set DestinationRootPath */
|
||||||
|
RtlFreeUnicodeString(&DestinationRootPath);
|
||||||
|
swprintf(PathBuffer,
|
||||||
|
L"\\Device\\Harddisk%lu\\Partition%lu",
|
||||||
|
PartitionList->CurrentDisk->DiskNumber,
|
||||||
|
PartitionList->CurrentPartition->PartitionNumber);
|
||||||
|
RtlCreateUnicodeString(&DestinationRootPath, PathBuffer);
|
||||||
|
DPRINT("DestinationRootPath: %wZ\n", &DestinationRootPath);
|
||||||
|
|
||||||
|
CONSOLE_SetTextXY(6, 8, MUIGetString(STRING_CHECKINGPART));
|
||||||
|
|
||||||
|
CONSOLE_SetStatusText(MUIGetString(STRING_PLEASEWAIT));
|
||||||
|
|
||||||
|
/* WRONG: first filesystem is not necesseraly the one of the current partition! */
|
||||||
|
CurrentFileSystem = CONTAINING_RECORD(FileSystemList->ListHead.Flink, FILE_SYSTEM_ITEM, ListEntry);
|
||||||
|
|
||||||
|
if (!CurrentFileSystem->ChkdskFunc)
|
||||||
|
{
|
||||||
|
sprintf(Buffer,
|
||||||
|
"Setup is currently unable to check a partition formatted in %S.\n"
|
||||||
|
"\n"
|
||||||
|
" \x07 Press ENTER to continue Setup.\n"
|
||||||
|
" \x07 Press F3 to quit Setup.",
|
||||||
|
CurrentFileSystem->FileSystem);
|
||||||
|
|
||||||
|
PopupError(Buffer,
|
||||||
|
MUIGetString(STRING_QUITCONTINUE),
|
||||||
|
NULL, POPUP_WAIT_NONE);
|
||||||
|
|
||||||
|
while (TRUE)
|
||||||
|
{
|
||||||
|
CONSOLE_ConInKey(Ir);
|
||||||
|
|
||||||
|
if (Ir->Event.KeyEvent.uChar.AsciiChar == 0x00 &&
|
||||||
|
Ir->Event.KeyEvent.wVirtualKeyCode == VK_F3) /* F3 */
|
||||||
|
{
|
||||||
|
if (ConfirmQuit(Ir))
|
||||||
|
return QUIT_PAGE;
|
||||||
|
else
|
||||||
|
return CHECK_FILE_SYSTEM_PAGE;
|
||||||
|
}
|
||||||
|
else if (Ir->Event.KeyEvent.uChar.AsciiChar == VK_RETURN) /* ENTER */
|
||||||
|
{
|
||||||
|
return INSTALL_DIRECTORY_PAGE;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
Status = ChkdskPartition(&DestinationRootPath, CurrentFileSystem);
|
||||||
|
if (!NT_SUCCESS(Status))
|
||||||
|
{
|
||||||
|
DPRINT("ChkdskPartition() failed with status 0x%08lx\n", Status);
|
||||||
|
sprintf(Buffer, "Setup failed to verify the selected partition.\n"
|
||||||
|
"(Status 0x%08lx).\n", Status);
|
||||||
|
|
||||||
|
PopupError(Buffer,
|
||||||
|
MUIGetString(STRING_REBOOTCOMPUTER),
|
||||||
|
Ir, POPUP_WAIT_ENTER);
|
||||||
|
|
||||||
|
return QUIT_PAGE;
|
||||||
|
}
|
||||||
|
|
||||||
|
return INSTALL_DIRECTORY_PAGE;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
static PAGE_NUMBER
|
||||||
|
PreInstallSelectFormatPage(PINPUT_RECORD Ir)
|
||||||
|
{
|
||||||
|
PDISKENTRY DiskEntry;
|
||||||
|
PPARTENTRY PartEntry;
|
||||||
|
ULONGLONG DiskSize;
|
||||||
|
ULONGLONG PartSize;
|
||||||
|
PCHAR DiskUnit;
|
||||||
|
PCHAR PartUnit;
|
||||||
|
PCHAR PartType;
|
||||||
|
|
||||||
|
if (PartitionList == NULL ||
|
||||||
|
PartitionList->CurrentDisk == NULL ||
|
||||||
|
PartitionList->CurrentPartition == NULL)
|
||||||
|
{
|
||||||
|
/* FIXME: show an error dialog */
|
||||||
|
return QUIT_PAGE;
|
||||||
|
}
|
||||||
|
|
||||||
|
DiskEntry = PartitionList->CurrentDisk;
|
||||||
|
PartEntry = PartitionList->CurrentPartition;
|
||||||
|
|
||||||
|
if (PartEntry->FormatState == Formatted)
|
||||||
|
return INSTALL_DIRECTORY_PAGE;
|
||||||
|
|
||||||
|
/* adjust disk size */
|
||||||
|
DiskSize = DiskEntry->SectorCount.QuadPart * DiskEntry->BytesPerSector;
|
||||||
|
if (DiskSize >= 10737418240) /* 10 GB */
|
||||||
|
{
|
||||||
|
DiskSize = DiskSize / 1073741824;
|
||||||
|
DiskUnit = MUIGetString(STRING_GB);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
DiskSize = DiskSize / 1048576;
|
||||||
|
DiskUnit = MUIGetString(STRING_MB);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* adjust partition size */
|
||||||
|
PartSize = PartEntry->SectorCount.QuadPart * DiskEntry->BytesPerSector;
|
||||||
|
if (PartSize >= 10737418240) /* 10 GB */
|
||||||
|
{
|
||||||
|
PartSize = PartSize / 1073741824;
|
||||||
|
PartUnit = MUIGetString(STRING_GB);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
PartSize = PartSize / 1048576;
|
||||||
|
PartUnit = MUIGetString(STRING_MB);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* adjust partition type */
|
||||||
|
if ((PartEntry->PartitionType == PARTITION_FAT_12) ||
|
||||||
|
(PartEntry->PartitionType == PARTITION_FAT_16) ||
|
||||||
|
(PartEntry->PartitionType == PARTITION_HUGE) ||
|
||||||
|
(PartEntry->PartitionType == PARTITION_XINT13))
|
||||||
|
{
|
||||||
|
PartType = "FAT";
|
||||||
|
}
|
||||||
|
else if ((PartEntry->PartitionType == PARTITION_FAT32) ||
|
||||||
|
(PartEntry->PartitionType == PARTITION_FAT32_XINT13))
|
||||||
|
{
|
||||||
|
PartType = "FAT32";
|
||||||
|
}
|
||||||
|
else if (PartEntry->PartitionType == PARTITION_EXT2)
|
||||||
|
{
|
||||||
|
PartType = "EXT2";
|
||||||
|
}
|
||||||
|
else if (PartEntry->PartitionType == PARTITION_IFS)
|
||||||
|
{
|
||||||
|
PartType = "NTFS"; /* FIXME: Not quite correct! */
|
||||||
|
}
|
||||||
|
else if (PartEntry->PartitionType == PARTITION_ENTRY_UNUSED)
|
||||||
|
{
|
||||||
|
PartType = MUIGetString(STRING_FORMATUNUSED);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
PartType = MUIGetString(STRING_FORMATUNKNOWN);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (PartEntry->AutoCreate == TRUE)
|
||||||
|
{
|
||||||
|
CONSOLE_SetTextXY(6, 8, MUIGetString(STRING_NEWPARTITION));
|
||||||
|
|
||||||
|
#if 0
|
||||||
|
CONSOLE_PrintTextXY(8, 10, "Partition %lu (%I64u %s) %s of",
|
||||||
|
PartEntry->PartitionNumber,
|
||||||
|
PartSize,
|
||||||
|
PartUnit,
|
||||||
|
PartType);
|
||||||
|
#endif
|
||||||
|
|
||||||
|
CONSOLE_PrintTextXY(8, 10, MUIGetString(STRING_HDINFOPARTZEROED),
|
||||||
|
DiskEntry->DiskNumber,
|
||||||
|
DiskSize,
|
||||||
|
DiskUnit,
|
||||||
|
DiskEntry->Port,
|
||||||
|
DiskEntry->Bus,
|
||||||
|
DiskEntry->Id,
|
||||||
|
&DiskEntry->DriverName);
|
||||||
|
|
||||||
|
CONSOLE_SetTextXY(6, 12, MUIGetString(STRING_PARTFORMAT));
|
||||||
|
|
||||||
|
|
||||||
|
PartEntry->AutoCreate = FALSE;
|
||||||
|
}
|
||||||
|
#if 0
|
||||||
|
else if (PartEntry->New == TRUE)
|
||||||
|
{
|
||||||
|
CONSOLE_SetTextXY(6, 8, MUIGetString(STRING_NONFORMATTEDPART));
|
||||||
|
CONSOLE_SetTextXY(6, 10, MUIGetString(STRING_PARTFORMAT));
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
else
|
||||||
|
{
|
||||||
|
CONSOLE_SetTextXY(6, 8, MUIGetString(STRING_INSTALLONPART));
|
||||||
|
|
||||||
|
if (PartType == NULL)
|
||||||
|
{
|
||||||
|
CONSOLE_PrintTextXY(8, 10,
|
||||||
|
MUIGetString(STRING_HDDINFOUNK4),
|
||||||
|
(PartEntry->DriveLetter == 0) ? '-' : PartEntry->DriveLetter,
|
||||||
|
(PartEntry->DriveLetter == 0) ? '-' : ':',
|
||||||
|
PartEntry->PartitionType,
|
||||||
|
PartSize,
|
||||||
|
PartUnit);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
CONSOLE_PrintTextXY(8, 10,
|
||||||
|
"%c%c %s %I64u %s",
|
||||||
|
(PartEntry->DriveLetter == 0) ? '-' : PartEntry->DriveLetter,
|
||||||
|
(PartEntry->DriveLetter == 0) ? '-' : ':',
|
||||||
|
PartType,
|
||||||
|
PartSize,
|
||||||
|
PartUnit);
|
||||||
|
}
|
||||||
|
|
||||||
|
CONSOLE_PrintTextXY(6, 12, MUIGetString(STRING_HDINFOPARTEXISTS),
|
||||||
|
DiskEntry->DiskNumber,
|
||||||
|
DiskSize,
|
||||||
|
DiskUnit,
|
||||||
|
DiskEntry->Port,
|
||||||
|
DiskEntry->Bus,
|
||||||
|
DiskEntry->Id,
|
||||||
|
&DiskEntry->DriverName);
|
||||||
|
}
|
||||||
|
|
||||||
|
MUIDisplayPage(SELECT_FILE_SYSTEM_PAGE);
|
||||||
|
|
||||||
|
if (FileSystemList != NULL)
|
||||||
|
{
|
||||||
|
DestroyFileSystemList(FileSystemList);
|
||||||
|
FileSystemList = NULL;
|
||||||
|
}
|
||||||
|
|
||||||
|
FileSystemList = CreateFileSystemList(6, 26, FALSE, L"FAT",
|
||||||
|
PartEntry->PartitionType);
|
||||||
|
if (FileSystemList == NULL)
|
||||||
|
{
|
||||||
|
/* FIXME: show an error dialog */
|
||||||
|
return QUIT_PAGE;
|
||||||
|
}
|
||||||
|
|
||||||
|
DrawFileSystemList(FileSystemList);
|
||||||
|
|
||||||
|
while (TRUE)
|
||||||
|
{
|
||||||
|
CONSOLE_ConInKey(Ir);
|
||||||
|
|
||||||
|
if ((Ir->Event.KeyEvent.uChar.AsciiChar == 0x00) &&
|
||||||
|
(Ir->Event.KeyEvent.wVirtualKeyCode == VK_F3)) /* F3 */
|
||||||
|
{
|
||||||
|
if (ConfirmQuit(Ir) == TRUE)
|
||||||
|
{
|
||||||
|
return QUIT_PAGE;
|
||||||
|
}
|
||||||
|
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
else if ((Ir->Event.KeyEvent.uChar.AsciiChar == 0x00) &&
|
||||||
|
(Ir->Event.KeyEvent.wVirtualKeyCode == VK_ESCAPE)) /* ESC */
|
||||||
|
{
|
||||||
|
return SELECT_PARTITION_PAGE;
|
||||||
|
}
|
||||||
|
else if ((Ir->Event.KeyEvent.uChar.AsciiChar == 0x00) &&
|
||||||
|
(Ir->Event.KeyEvent.wVirtualKeyCode == VK_DOWN)) /* DOWN */
|
||||||
|
{
|
||||||
|
ScrollDownFileSystemList(FileSystemList);
|
||||||
|
}
|
||||||
|
else if ((Ir->Event.KeyEvent.uChar.AsciiChar == 0x00) &&
|
||||||
|
(Ir->Event.KeyEvent.wVirtualKeyCode == VK_UP)) /* UP */
|
||||||
|
{
|
||||||
|
ScrollUpFileSystemList(FileSystemList);
|
||||||
|
}
|
||||||
|
else if (Ir->Event.KeyEvent.wVirtualKeyCode == VK_RETURN) /* ENTER */
|
||||||
|
{
|
||||||
|
if (FileSystemList->Selected->FormatFunc)
|
||||||
|
{
|
||||||
|
return PRE_INSTALL_FORMAT_PAGE;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return PRE_INSTALL_SELECT_FORMAT_PAGE;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
static ULONG
|
||||||
|
PreInstallFormatPage(PINPUT_RECORD Ir)
|
||||||
|
{
|
||||||
|
WCHAR PathBuffer[MAX_PATH];
|
||||||
|
// PDISKENTRY DiskEntry;
|
||||||
|
PPARTENTRY PartEntry;
|
||||||
|
NTSTATUS Status;
|
||||||
|
|
||||||
#ifndef NDEBUG
|
#ifndef NDEBUG
|
||||||
ULONG Line;
|
ULONG Line;
|
||||||
ULONG i;
|
ULONG i;
|
||||||
|
@ -2867,8 +3293,7 @@ FormatPartitionPage(PINPUT_RECORD Ir)
|
||||||
return QUIT_PAGE;
|
return QUIT_PAGE;
|
||||||
}
|
}
|
||||||
|
|
||||||
PartEntry->New = FALSE;
|
PartEntry->FormatState = Formatted;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifndef NDEBUG
|
#ifndef NDEBUG
|
||||||
|
@ -2879,92 +3304,15 @@ FormatPartitionPage(PINPUT_RECORD Ir)
|
||||||
DestroyFileSystemList(FileSystemList);
|
DestroyFileSystemList(FileSystemList);
|
||||||
FileSystemList = NULL;
|
FileSystemList = NULL;
|
||||||
|
|
||||||
if (IsUnattendedSetup || InstallShortcut)
|
return INSTALL_DIRECTORY_PAGE;
|
||||||
return INSTALL_DIRECTORY_PAGE;
|
|
||||||
else
|
|
||||||
return SELECT_PARTITION_PAGE;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return FORMAT_PARTITION_PAGE;
|
return PRE_INSTALL_FORMAT_PAGE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
static ULONG
|
|
||||||
CheckFileSystemPage(PINPUT_RECORD Ir)
|
|
||||||
{
|
|
||||||
PFILE_SYSTEM_ITEM CurrentFileSystem;
|
|
||||||
WCHAR PathBuffer[MAX_PATH];
|
|
||||||
CHAR Buffer[MAX_PATH];
|
|
||||||
NTSTATUS Status;
|
|
||||||
|
|
||||||
/* FIXME: code duplicated in FormatPartitionPage */
|
|
||||||
/* Set DestinationRootPath */
|
|
||||||
RtlFreeUnicodeString(&DestinationRootPath);
|
|
||||||
swprintf(PathBuffer,
|
|
||||||
L"\\Device\\Harddisk%lu\\Partition%lu",
|
|
||||||
PartitionList->CurrentDisk->DiskNumber,
|
|
||||||
PartitionList->CurrentPartition->PartitionNumber);
|
|
||||||
RtlCreateUnicodeString(&DestinationRootPath, PathBuffer);
|
|
||||||
DPRINT("DestinationRootPath: %wZ\n", &DestinationRootPath);
|
|
||||||
|
|
||||||
CONSOLE_SetTextXY(6, 8, MUIGetString(STRING_CHECKINGPART));
|
|
||||||
|
|
||||||
CONSOLE_SetStatusText(MUIGetString(STRING_PLEASEWAIT));
|
|
||||||
|
|
||||||
/* WRONG: first filesystem is not necesseraly the one of the current partition! */
|
|
||||||
CurrentFileSystem = CONTAINING_RECORD(FileSystemList->ListHead.Flink, FILE_SYSTEM_ITEM, ListEntry);
|
|
||||||
|
|
||||||
if (!CurrentFileSystem->ChkdskFunc)
|
|
||||||
{
|
|
||||||
sprintf(Buffer,
|
|
||||||
"Setup is currently unable to check a partition formatted in %S.\n"
|
|
||||||
"\n"
|
|
||||||
" \x07 Press ENTER to continue Setup.\n"
|
|
||||||
" \x07 Press F3 to quit Setup.",
|
|
||||||
CurrentFileSystem->FileSystem);
|
|
||||||
|
|
||||||
PopupError(Buffer,
|
|
||||||
MUIGetString(STRING_QUITCONTINUE),
|
|
||||||
NULL, POPUP_WAIT_NONE);
|
|
||||||
|
|
||||||
while (TRUE)
|
|
||||||
{
|
|
||||||
CONSOLE_ConInKey(Ir);
|
|
||||||
|
|
||||||
if (Ir->Event.KeyEvent.uChar.AsciiChar == 0x00 &&
|
|
||||||
Ir->Event.KeyEvent.wVirtualKeyCode == VK_F3) /* F3 */
|
|
||||||
{
|
|
||||||
if (ConfirmQuit(Ir))
|
|
||||||
return QUIT_PAGE;
|
|
||||||
else
|
|
||||||
return CHECK_FILE_SYSTEM_PAGE;
|
|
||||||
}
|
|
||||||
else if (Ir->Event.KeyEvent.uChar.AsciiChar == VK_RETURN) /* ENTER */
|
|
||||||
{
|
|
||||||
return INSTALL_DIRECTORY_PAGE;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
Status = ChkdskPartition(&DestinationRootPath, CurrentFileSystem);
|
|
||||||
if (!NT_SUCCESS(Status))
|
|
||||||
{
|
|
||||||
DPRINT("ChkdskPartition() failed with status 0x%08lx\n", Status);
|
|
||||||
sprintf(Buffer, "Setup failed to verify the selected partition.\n"
|
|
||||||
"(Status 0x%08lx).\n", Status);
|
|
||||||
|
|
||||||
PopupError(Buffer,
|
|
||||||
MUIGetString(STRING_REBOOTCOMPUTER),
|
|
||||||
Ir, POPUP_WAIT_ENTER);
|
|
||||||
|
|
||||||
return QUIT_PAGE;
|
|
||||||
}
|
|
||||||
|
|
||||||
return INSTALL_DIRECTORY_PAGE;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
static PAGE_NUMBER
|
static PAGE_NUMBER
|
||||||
|
@ -4278,11 +4626,19 @@ RunUSetup(VOID)
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case FORMAT_PARTITION_PAGE:
|
case FORMAT_PARTITION_PAGE:
|
||||||
Page = (PAGE_NUMBER) FormatPartitionPage(&Ir);
|
Page = FormatPartitionPage(&Ir);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case CHECK_FILE_SYSTEM_PAGE:
|
case CHECK_FILE_SYSTEM_PAGE:
|
||||||
Page = (PAGE_NUMBER) CheckFileSystemPage(&Ir);
|
Page = CheckFileSystemPage(&Ir);
|
||||||
|
break;
|
||||||
|
|
||||||
|
case PRE_INSTALL_SELECT_FORMAT_PAGE:
|
||||||
|
Page = PreInstallSelectFormatPage(&Ir);
|
||||||
|
break;
|
||||||
|
|
||||||
|
case PRE_INSTALL_FORMAT_PAGE:
|
||||||
|
Page = PreInstallFormatPage(&Ir);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case INSTALL_DIRECTORY_PAGE:
|
case INSTALL_DIRECTORY_PAGE:
|
||||||
|
|
|
@ -1753,5 +1753,7 @@ MUI_STRING bgBGStrings[] =
|
||||||
"ƒ<EFBFBD>"},
|
"ƒ<EFBFBD>"},
|
||||||
{STRING_ADDKBLAYOUTS,
|
{STRING_ADDKBLAYOUTS,
|
||||||
"„®¡ ¢ï¥ ª« ¢¨ âãਠ¯®¤à¥¤¡¨"},
|
"„®¡ ¢ï¥ ª« ¢¨ âãਠ¯®¤à¥¤¡¨"},
|
||||||
|
{STRING_FORMATPART,
|
||||||
|
"Setup formats Partition"},
|
||||||
{0, 0}
|
{0, 0}
|
||||||
};
|
};
|
||||||
|
|
|
@ -1737,5 +1737,7 @@ MUI_STRING bnBDStrings[] =
|
||||||
"GB"},
|
"GB"},
|
||||||
{STRING_ADDKBLAYOUTS,
|
{STRING_ADDKBLAYOUTS,
|
||||||
"Adding keyboard layouts"},
|
"Adding keyboard layouts"},
|
||||||
|
{STRING_FORMATPART,
|
||||||
|
"Setup formats Partition"},
|
||||||
{0, 0}
|
{0, 0}
|
||||||
};
|
};
|
||||||
|
|
|
@ -1746,5 +1746,7 @@ MUI_STRING csCZStrings[] =
|
||||||
"GB"},
|
"GB"},
|
||||||
{STRING_ADDKBLAYOUTS,
|
{STRING_ADDKBLAYOUTS,
|
||||||
"Pýid v m rozlo§en¡ kl ves"},
|
"Pýid v m rozlo§en¡ kl ves"},
|
||||||
|
{STRING_FORMATPART,
|
||||||
|
"Setup formats Partition"},
|
||||||
{0, 0}
|
{0, 0}
|
||||||
};
|
};
|
||||||
|
|
|
@ -1742,5 +1742,7 @@ MUI_STRING deDEStrings[] =
|
||||||
"GB"},
|
"GB"},
|
||||||
{STRING_ADDKBLAYOUTS,
|
{STRING_ADDKBLAYOUTS,
|
||||||
"Tastaturlayout hinzuf<75>gen"},
|
"Tastaturlayout hinzuf<75>gen"},
|
||||||
|
{STRING_FORMATPART,
|
||||||
|
"Setup formats Partition"},
|
||||||
{0, 0}
|
{0, 0}
|
||||||
};
|
};
|
||||||
|
|
|
@ -1763,5 +1763,7 @@ MUI_STRING elGRStrings[] =
|
||||||
"GB"},
|
"GB"},
|
||||||
{STRING_ADDKBLAYOUTS,
|
{STRING_ADDKBLAYOUTS,
|
||||||
"‚夜«˜ §¨¦©Ÿã¡ž «à¤ › ˜«á¥œà¤ §¢ž¡«¨¦¢¦šå¦¬"},
|
"‚夜«˜ §¨¦©Ÿã¡ž «à¤ › ˜«á¥œà¤ §¢ž¡«¨¦¢¦šå¦¬"},
|
||||||
|
{STRING_FORMATPART,
|
||||||
|
"Setup formats Partition"},
|
||||||
{0, 0}
|
{0, 0}
|
||||||
};
|
};
|
||||||
|
|
|
@ -1737,5 +1737,7 @@ MUI_STRING enUSStrings[] =
|
||||||
"GB"},
|
"GB"},
|
||||||
{STRING_ADDKBLAYOUTS,
|
{STRING_ADDKBLAYOUTS,
|
||||||
"Adding keyboard layouts"},
|
"Adding keyboard layouts"},
|
||||||
|
{STRING_FORMATPART,
|
||||||
|
"Setup formats Partition"},
|
||||||
{0, 0}
|
{0, 0}
|
||||||
};
|
};
|
||||||
|
|
|
@ -1745,5 +1745,7 @@ MUI_STRING esESStrings[] =
|
||||||
"GB"},
|
"GB"},
|
||||||
{STRING_ADDKBLAYOUTS,
|
{STRING_ADDKBLAYOUTS,
|
||||||
"A¤adiendo distribuci¢n de teclado"},
|
"A¤adiendo distribuci¢n de teclado"},
|
||||||
|
{STRING_FORMATPART,
|
||||||
|
"Setup formats Partition"},
|
||||||
{0, 0}
|
{0, 0}
|
||||||
};
|
};
|
||||||
|
|
|
@ -1738,5 +1738,7 @@ MUI_STRING etEEStrings[] =
|
||||||
"GB"},
|
"GB"},
|
||||||
{STRING_ADDKBLAYOUTS,
|
{STRING_ADDKBLAYOUTS,
|
||||||
"Klaviatuuriasetuste lisamine"},
|
"Klaviatuuriasetuste lisamine"},
|
||||||
|
{STRING_FORMATPART,
|
||||||
|
"Setup formats Partition"},
|
||||||
{0, 0}
|
{0, 0}
|
||||||
};
|
};
|
||||||
|
|
|
@ -1751,5 +1751,7 @@ MUI_STRING frFRStrings[] =
|
||||||
"Go"},
|
"Go"},
|
||||||
{STRING_ADDKBLAYOUTS,
|
{STRING_ADDKBLAYOUTS,
|
||||||
"Ajout des dispositions clavier"},
|
"Ajout des dispositions clavier"},
|
||||||
|
{STRING_FORMATPART,
|
||||||
|
"Setup formats Partition"},
|
||||||
{0, 0}
|
{0, 0}
|
||||||
};
|
};
|
||||||
|
|
|
@ -1739,5 +1739,7 @@ MUI_STRING heILStrings[] =
|
||||||
"‚‰‚„<EFBFBD>‰‰ˆ"},
|
"‚‰‚„<EFBFBD>‰‰ˆ"},
|
||||||
{STRING_ADDKBLAYOUTS,
|
{STRING_ADDKBLAYOUTS,
|
||||||
"Adding keyboard layouts"},
|
"Adding keyboard layouts"},
|
||||||
|
{STRING_FORMATPART,
|
||||||
|
"Setup formats Partition"},
|
||||||
{0, 0}
|
{0, 0}
|
||||||
};
|
};
|
||||||
|
|
|
@ -1740,5 +1740,7 @@ MUI_STRING itITStrings[] =
|
||||||
"GB"},
|
"GB"},
|
||||||
{STRING_ADDKBLAYOUTS,
|
{STRING_ADDKBLAYOUTS,
|
||||||
"Aggiunta delle nazionalit… di tastiera"},
|
"Aggiunta delle nazionalit… di tastiera"},
|
||||||
|
{STRING_FORMATPART,
|
||||||
|
"Setup formats Partition"},
|
||||||
{0, 0}
|
{0, 0}
|
||||||
};
|
};
|
||||||
|
|
|
@ -1741,5 +1741,7 @@ MUI_STRING jaJPStrings[] =
|
||||||
"GB"},
|
"GB"},
|
||||||
{STRING_ADDKBLAYOUTS,
|
{STRING_ADDKBLAYOUTS,
|
||||||
"·°ÎÞ°ÄÞ Ú²±³ÄÉ Â²¶ Á³"},
|
"·°ÎÞ°ÄÞ Ú²±³ÄÉ Â²¶ Á³"},
|
||||||
|
{STRING_FORMATPART,
|
||||||
|
"Setup formats Partition"},
|
||||||
{0, 0}
|
{0, 0}
|
||||||
};
|
};
|
||||||
|
|
|
@ -1748,5 +1748,7 @@ MUI_STRING ltLTStrings[] =
|
||||||
"GB"},
|
"GB"},
|
||||||
{STRING_ADDKBLAYOUTS,
|
{STRING_ADDKBLAYOUTS,
|
||||||
"Adding keyboard layouts"},
|
"Adding keyboard layouts"},
|
||||||
|
{STRING_FORMATPART,
|
||||||
|
"Setup formats Partition"},
|
||||||
{0, 0}
|
{0, 0}
|
||||||
};
|
};
|
||||||
|
|
|
@ -1786,5 +1786,7 @@ MUI_STRING nlNLStrings[] =
|
||||||
"GB"},
|
"GB"},
|
||||||
{STRING_ADDKBLAYOUTS,
|
{STRING_ADDKBLAYOUTS,
|
||||||
"Toevoegen toetsenbordindelingen"},
|
"Toevoegen toetsenbordindelingen"},
|
||||||
|
{STRING_FORMATPART,
|
||||||
|
"Setup formats Partition"},
|
||||||
{0, 0}
|
{0, 0}
|
||||||
};
|
};
|
||||||
|
|
|
@ -1746,5 +1746,7 @@ MUI_STRING plPLStrings[] =
|
||||||
"GB"},
|
"GB"},
|
||||||
{STRING_ADDKBLAYOUTS,
|
{STRING_ADDKBLAYOUTS,
|
||||||
"Dodawanie uk<75>ad˘w klawiatury"},
|
"Dodawanie uk<75>ad˘w klawiatury"},
|
||||||
|
{STRING_FORMATPART,
|
||||||
|
"Setup formats Partition"},
|
||||||
{0, 0}
|
{0, 0}
|
||||||
};
|
};
|
||||||
|
|
|
@ -1777,5 +1777,7 @@ MUI_STRING ptBRStrings[] =
|
||||||
"GB"},
|
"GB"},
|
||||||
{STRING_ADDKBLAYOUTS,
|
{STRING_ADDKBLAYOUTS,
|
||||||
"Adicionando leiautes de teclado"},
|
"Adicionando leiautes de teclado"},
|
||||||
|
{STRING_FORMATPART,
|
||||||
|
"Setup formats Partition"},
|
||||||
{0, 0}
|
{0, 0}
|
||||||
};
|
};
|
||||||
|
|
|
@ -1814,5 +1814,7 @@ MUI_STRING roROStrings[] =
|
||||||
"Go"},
|
"Go"},
|
||||||
{STRING_ADDKBLAYOUTS,
|
{STRING_ADDKBLAYOUTS,
|
||||||
"AdÇugare configuraîii de tastaturÇ"},
|
"AdÇugare configuraîii de tastaturÇ"},
|
||||||
|
{STRING_FORMATPART,
|
||||||
|
"Setup formats Partition"},
|
||||||
{0, 0}
|
{0, 0}
|
||||||
};
|
};
|
||||||
|
|
|
@ -1742,5 +1742,7 @@ MUI_STRING ruRUStrings[] =
|
||||||
"ƒ<EFBFBD>"},
|
"ƒ<EFBFBD>"},
|
||||||
{STRING_ADDKBLAYOUTS,
|
{STRING_ADDKBLAYOUTS,
|
||||||
"Adding keyboard layouts"},
|
"Adding keyboard layouts"},
|
||||||
|
{STRING_FORMATPART,
|
||||||
|
"Setup formats Partition"},
|
||||||
{0, 0}
|
{0, 0}
|
||||||
};
|
};
|
||||||
|
|
|
@ -1752,5 +1752,7 @@ MUI_STRING skSKStrings[] =
|
||||||
"GB"},
|
"GB"},
|
||||||
{STRING_ADDKBLAYOUTS,
|
{STRING_ADDKBLAYOUTS,
|
||||||
"Prid vam rozlo§enia kl vesnice"},
|
"Prid vam rozlo§enia kl vesnice"},
|
||||||
|
{STRING_FORMATPART,
|
||||||
|
"Setup formats Partition"},
|
||||||
{0, 0}
|
{0, 0}
|
||||||
};
|
};
|
||||||
|
|
|
@ -1744,5 +1744,7 @@ MUI_STRING sqALStrings[] =
|
||||||
"GB"},
|
"GB"},
|
||||||
{STRING_ADDKBLAYOUTS,
|
{STRING_ADDKBLAYOUTS,
|
||||||
"Shtim e p‰rzgjedhjes s‰ tastier‰s"},
|
"Shtim e p‰rzgjedhjes s‰ tastier‰s"},
|
||||||
|
{STRING_FORMATPART,
|
||||||
|
"Setup formats Partition"},
|
||||||
{0, 0}
|
{0, 0}
|
||||||
};
|
};
|
||||||
|
|
|
@ -1747,5 +1747,7 @@ MUI_STRING svSEStrings[] =
|
||||||
"GB"},
|
"GB"},
|
||||||
{STRING_ADDKBLAYOUTS,
|
{STRING_ADDKBLAYOUTS,
|
||||||
"L„gger till tangentbordslayouter"},
|
"L„gger till tangentbordslayouter"},
|
||||||
|
{STRING_FORMATPART,
|
||||||
|
"Setup formats Partition"},
|
||||||
{0, 0}
|
{0, 0}
|
||||||
};
|
};
|
||||||
|
|
|
@ -1725,5 +1725,7 @@ MUI_STRING trTRStrings[] =
|
||||||
"GB"},
|
"GB"},
|
||||||
{STRING_ADDKBLAYOUTS,
|
{STRING_ADDKBLAYOUTS,
|
||||||
"D<EFBFBD>§me tak<61>m<EFBFBD> d<>zenleri ekleniyor..."},
|
"D<EFBFBD>§me tak<61>m<EFBFBD> d<>zenleri ekleniyor..."},
|
||||||
|
{STRING_FORMATPART,
|
||||||
|
"Setup formats Partition"},
|
||||||
{0, 0}
|
{0, 0}
|
||||||
};
|
};
|
||||||
|
|
|
@ -1747,5 +1747,7 @@ MUI_STRING ukUAStrings[] =
|
||||||
"GB"},
|
"GB"},
|
||||||
{STRING_ADDKBLAYOUTS,
|
{STRING_ADDKBLAYOUTS,
|
||||||
"„®¤ ¢ ï à®§ª« ¤®ª ª« ¢i âãà¨"},
|
"„®¤ ¢ ï à®§ª« ¤®ª ª« ¢i âãà¨"},
|
||||||
|
{STRING_FORMATPART,
|
||||||
|
"Setup formats Partition"},
|
||||||
{0, 0}
|
{0, 0}
|
||||||
};
|
};
|
||||||
|
|
|
@ -156,3 +156,5 @@ MUIGetString(
|
||||||
#define STRING_MB 54
|
#define STRING_MB 54
|
||||||
#define STRING_GB 55
|
#define STRING_GB 55
|
||||||
#define STRING_ADDKBLAYOUTS 56
|
#define STRING_ADDKBLAYOUTS 56
|
||||||
|
#define STRING_FORMATPART 62
|
||||||
|
|
||||||
|
|
|
@ -2,12 +2,36 @@
|
||||||
|
|
||||||
BOOLEAN
|
BOOLEAN
|
||||||
NATIVE_CreateFileSystemList(
|
NATIVE_CreateFileSystemList(
|
||||||
IN PFILE_SYSTEM_LIST List)
|
IN PFILE_SYSTEM_LIST List,
|
||||||
|
IN UCHAR PartitionType)
|
||||||
{
|
{
|
||||||
FS_AddProvider(List, L"FAT", VfatFormat, VfatChkdsk);
|
if (PartitionType == PARTITION_ENTRY_UNUSED ||
|
||||||
|
PartitionType == PARTITION_FAT_12 ||
|
||||||
|
PartitionType == PARTITION_FAT_16 ||
|
||||||
|
PartitionType == PARTITION_HUGE ||
|
||||||
|
PartitionType == PARTITION_XINT13 ||
|
||||||
|
PartitionType == PARTITION_FAT32 ||
|
||||||
|
PartitionType == PARTITION_FAT32_XINT13)
|
||||||
|
{
|
||||||
|
FS_AddProvider(List, L"FAT", VfatFormat, VfatChkdsk);
|
||||||
|
}
|
||||||
|
|
||||||
#if 0
|
#if 0
|
||||||
FS_AddProvider(List, L"EXT2", Ext2Format, Ext2Chkdsk);
|
if (PartitionType == PARTITION_ENTRY_UNUSED ||
|
||||||
|
PartitionType == PARTITION_EXT2)
|
||||||
|
{
|
||||||
|
FS_AddProvider(List, L"EXT2", Ext2Format, Ext2Chkdsk);
|
||||||
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#if 0
|
||||||
|
if (PartitionType == PARTITION_ENTRY_UNUSED ||
|
||||||
|
PartitionType == PARTITION_IFS)
|
||||||
|
{
|
||||||
|
FS_AddProvider(List, L"NTFS", NtfsFormat, NtfsChkdsk);
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -558,7 +558,7 @@ AddPartitionToDisk(
|
||||||
|
|
||||||
if (IsContainerPartition(PartEntry->PartitionType))
|
if (IsContainerPartition(PartEntry->PartitionType))
|
||||||
{
|
{
|
||||||
PartEntry->FormatState = Unformatted;
|
PartEntry->FormatState = Formatted;
|
||||||
|
|
||||||
if (LogicalPartition == FALSE && DiskEntry->ExtendedPartition == NULL)
|
if (LogicalPartition == FALSE && DiskEntry->ExtendedPartition == NULL)
|
||||||
DiskEntry->ExtendedPartition = PartEntry;
|
DiskEntry->ExtendedPartition = PartEntry;
|
||||||
|
@ -1499,11 +1499,7 @@ PrintPartitionData(
|
||||||
{
|
{
|
||||||
/* Determine partition type */
|
/* Determine partition type */
|
||||||
PartType = NULL;
|
PartType = NULL;
|
||||||
if (PartEntry->New == TRUE)
|
if (PartEntry->IsPartitioned == TRUE)
|
||||||
{
|
|
||||||
PartType = MUIGetString(STRING_UNFORMATTED);
|
|
||||||
}
|
|
||||||
else if (PartEntry->IsPartitioned == TRUE)
|
|
||||||
{
|
{
|
||||||
if ((PartEntry->PartitionType == PARTITION_FAT_12) ||
|
if ((PartEntry->PartitionType == PARTITION_FAT_12) ||
|
||||||
(PartEntry->PartitionType == PARTITION_FAT_16) ||
|
(PartEntry->PartitionType == PARTITION_FAT_16) ||
|
||||||
|
@ -2386,7 +2382,6 @@ DPRINT1("Convert existing partition entry\n");
|
||||||
PartEntry->PartitionType = PARTITION_ENTRY_UNUSED;
|
PartEntry->PartitionType = PARTITION_ENTRY_UNUSED;
|
||||||
PartEntry->FormatState = Unformatted;
|
PartEntry->FormatState = Unformatted;
|
||||||
PartEntry->AutoCreate = AutoCreate;
|
PartEntry->AutoCreate = AutoCreate;
|
||||||
PartEntry->New = TRUE;
|
|
||||||
PartEntry->BootIndicator = FALSE;
|
PartEntry->BootIndicator = FALSE;
|
||||||
|
|
||||||
DPRINT1("First Sector: %I64u\n", PartEntry->StartSector.QuadPart);
|
DPRINT1("First Sector: %I64u\n", PartEntry->StartSector.QuadPart);
|
||||||
|
@ -2420,7 +2415,6 @@ DPRINT1("First Sector: %I64u\n", NewPartEntry->StartSector.QuadPart);
|
||||||
DPRINT1("Last Sector: %I64u\n", NewPartEntry->StartSector.QuadPart + NewPartEntry->SectorCount.QuadPart - 1);
|
DPRINT1("Last Sector: %I64u\n", NewPartEntry->StartSector.QuadPart + NewPartEntry->SectorCount.QuadPart - 1);
|
||||||
DPRINT1("Total Sectors: %I64u\n", NewPartEntry->SectorCount.QuadPart);
|
DPRINT1("Total Sectors: %I64u\n", NewPartEntry->SectorCount.QuadPart);
|
||||||
|
|
||||||
NewPartEntry->New = TRUE;
|
|
||||||
NewPartEntry->FormatState = Unformatted;
|
NewPartEntry->FormatState = Unformatted;
|
||||||
NewPartEntry->BootIndicator = FALSE;
|
NewPartEntry->BootIndicator = FALSE;
|
||||||
|
|
||||||
|
@ -2505,7 +2499,6 @@ DPRINT1("Convert existing partition entry\n");
|
||||||
PartEntry->IsPartitioned = TRUE;
|
PartEntry->IsPartitioned = TRUE;
|
||||||
PartEntry->FormatState = Formatted;
|
PartEntry->FormatState = Formatted;
|
||||||
PartEntry->AutoCreate = FALSE;
|
PartEntry->AutoCreate = FALSE;
|
||||||
PartEntry->New = FALSE;
|
|
||||||
PartEntry->BootIndicator = FALSE;
|
PartEntry->BootIndicator = FALSE;
|
||||||
|
|
||||||
if (PartEntry->StartSector.QuadPart < 1450560)
|
if (PartEntry->StartSector.QuadPart < 1450560)
|
||||||
|
@ -2547,7 +2540,6 @@ DPRINT1("Add new partition entry\n");
|
||||||
NewPartEntry->SectorCount.QuadPart = Align(NewPartEntry->StartSector.QuadPart + SectorCount, DiskEntry->SectorAlignment) -
|
NewPartEntry->SectorCount.QuadPart = Align(NewPartEntry->StartSector.QuadPart + SectorCount, DiskEntry->SectorAlignment) -
|
||||||
NewPartEntry->StartSector.QuadPart;
|
NewPartEntry->StartSector.QuadPart;
|
||||||
|
|
||||||
NewPartEntry->New = FALSE;
|
|
||||||
NewPartEntry->FormatState = Formatted;
|
NewPartEntry->FormatState = Formatted;
|
||||||
NewPartEntry->BootIndicator = FALSE;
|
NewPartEntry->BootIndicator = FALSE;
|
||||||
|
|
||||||
|
|
|
@ -63,7 +63,7 @@ typedef struct _PARTENTRY
|
||||||
BOOLEAN IsPartitioned;
|
BOOLEAN IsPartitioned;
|
||||||
|
|
||||||
/* Partition is new. Table does not exist on disk yet */
|
/* Partition is new. Table does not exist on disk yet */
|
||||||
BOOLEAN New;
|
// BOOLEAN New;
|
||||||
|
|
||||||
/* Partition was created automatically. */
|
/* Partition was created automatically. */
|
||||||
BOOLEAN AutoCreate;
|
BOOLEAN AutoCreate;
|
||||||
|
|
|
@ -138,8 +138,11 @@ typedef enum _PAGE_NUMBER
|
||||||
FORMAT_PARTITION_PAGE,
|
FORMAT_PARTITION_PAGE,
|
||||||
CHECK_FILE_SYSTEM_PAGE,
|
CHECK_FILE_SYSTEM_PAGE,
|
||||||
|
|
||||||
PREPARE_COPY_PAGE,
|
PRE_INSTALL_SELECT_FORMAT_PAGE,
|
||||||
|
PRE_INSTALL_FORMAT_PAGE,
|
||||||
|
|
||||||
INSTALL_DIRECTORY_PAGE,
|
INSTALL_DIRECTORY_PAGE,
|
||||||
|
PREPARE_COPY_PAGE,
|
||||||
FILE_COPY_PAGE,
|
FILE_COPY_PAGE,
|
||||||
REGISTRY_PAGE,
|
REGISTRY_PAGE,
|
||||||
BOOT_LOADER_PAGE,
|
BOOT_LOADER_PAGE,
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue