- Remove formatting and partitioning hacks which are unnecessary after fixing the invalid signature bug in the FAT formatting code

svn path=/trunk/; revision=52540
This commit is contained in:
Cameron Gutman 2011-07-04 19:39:34 +00:00
parent 4e5a783a2f
commit d9a64c3019
2 changed files with 0 additions and 94 deletions

View file

@ -2450,75 +2450,6 @@ FormatPartitionPage(PINPUT_RECORD Ir)
CheckActiveBootPartition(PartitionList);
}
if (wcscmp(FileSystemList->Selected->FileSystem, L"FAT") == 0)
{
/* FIXME: Install boot code. This is a hack! */
if ((PartEntry->PartInfo[PartNum].PartitionType == PARTITION_FAT32_XINT13) ||
(PartEntry->PartInfo[PartNum].PartitionType == PARTITION_FAT32))
{
wcscpy(PathBuffer, SourceRootPath.Buffer);
wcscat(PathBuffer, L"\\loader\\fat32.bin");
DPRINT("Install FAT32 bootcode: %S ==> %S\n", PathBuffer,
DestinationRootPath.Buffer);
Status = InstallFat32BootCodeToDisk(PathBuffer,
DestinationRootPath.Buffer);
if (!NT_SUCCESS(Status))
{
DPRINT1("InstallFat32BootCodeToDisk() failed with status 0x%08lx\n", Status);
/* FIXME: show an error dialog */
DestroyFileSystemList(FileSystemList);
FileSystemList = NULL;
return QUIT_PAGE;
}
}
else
{
wcscpy(PathBuffer, SourceRootPath.Buffer);
wcscat(PathBuffer, L"\\loader\\fat.bin");
DPRINT("Install FAT bootcode: %S ==> %S\n", PathBuffer,
DestinationRootPath.Buffer);
Status = InstallFat16BootCodeToDisk(PathBuffer,
DestinationRootPath.Buffer);
if (!NT_SUCCESS(Status))
{
DPRINT1("InstallFat16BootCodeToDisk() failed with status 0x%.08x\n", Status);
/* FIXME: show an error dialog */
DestroyFileSystemList(FileSystemList);
FileSystemList = NULL;
return QUIT_PAGE;
}
}
}
else if (wcscmp(FileSystemList->Selected->FileSystem, L"EXT2") == 0)
{
wcscpy(PathBuffer, SourceRootPath.Buffer);
wcscat(PathBuffer, L"\\loader\\ext2.bin");
DPRINT("Install EXT2 bootcode: %S ==> %S\n", PathBuffer,
DestinationRootPath.Buffer);
Status = InstallFat32BootCodeToDisk(PathBuffer,
DestinationRootPath.Buffer);
if (!NT_SUCCESS(Status))
{
DPRINT1("InstallFat32BootCodeToDisk() failed with status 0x%08lx\n", Status);
/* FIXME: show an error dialog */
DestroyFileSystemList(FileSystemList);
FileSystemList = NULL;
return QUIT_PAGE;
}
}
else if (FileSystemList->Selected->FormatFunc)
{
DestroyFileSystemList(FileSystemList);
FileSystemList = NULL;
return QUIT_PAGE;
}
#ifndef NDEBUG
CONSOLE_SetStatusText(" Done. Press any key ...");
CONSOLE_ConInKey(Ir);

View file

@ -2495,7 +2495,6 @@ WritePartitionsToDisk (PPARTLIST List)
PDRIVE_LAYOUT_INFORMATION DriveLayout;
OBJECT_ATTRIBUTES ObjectAttributes;
IO_STATUS_BLOCK Iosb;
WCHAR SrcPath[MAX_PATH];
WCHAR DstPath[MAX_PATH];
UNICODE_STRING Name;
HANDLE FileHandle;
@ -2689,30 +2688,6 @@ WritePartitionsToDisk (PPARTLIST List)
DriveLayout);
NtClose (FileHandle);
/* Install MBR code if the disk is new */
if (DiskEntry1->NewDisk == TRUE &&
DiskEntry1->BiosDiskNumber == 0)
{
wcscpy (SrcPath, SourceRootPath.Buffer);
wcscat (SrcPath, L"\\loader\\dosmbr.bin");
DPRINT ("Install MBR bootcode: %S ==> %S\n",
SrcPath, DstPath);
/* Install MBR bootcode */
Status = InstallMbrBootCodeToDisk (SrcPath,
DstPath);
if (!NT_SUCCESS (Status))
{
DPRINT1 ("InstallMbrBootCodeToDisk() failed (Status %lx)\n",
Status);
return FALSE;
}
DiskEntry1->NewDisk = FALSE;
DiskEntry1->NoMbr = FALSE;
}
}
Entry1 = Entry1->Flink;