From d9a64c3019d75debe09ccb4bfdb24027f5dd1c91 Mon Sep 17 00:00:00 2001 From: Cameron Gutman Date: Mon, 4 Jul 2011 19:39:34 +0000 Subject: [PATCH] [USETUP] - Remove formatting and partitioning hacks which are unnecessary after fixing the invalid signature bug in the FAT formatting code svn path=/trunk/; revision=52540 --- reactos/base/setup/usetup/interface/usetup.c | 69 -------------------- reactos/base/setup/usetup/partlist.c | 25 ------- 2 files changed, 94 deletions(-) diff --git a/reactos/base/setup/usetup/interface/usetup.c b/reactos/base/setup/usetup/interface/usetup.c index e0f503e7503..4e551430f1a 100644 --- a/reactos/base/setup/usetup/interface/usetup.c +++ b/reactos/base/setup/usetup/interface/usetup.c @@ -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); diff --git a/reactos/base/setup/usetup/partlist.c b/reactos/base/setup/usetup/partlist.c index 13d204239e5..5109cafef43 100644 --- a/reactos/base/setup/usetup/partlist.c +++ b/reactos/base/setup/usetup/partlist.c @@ -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;