mirror of
https://github.com/reactos/reactos.git
synced 2025-05-28 05:28:14 +00:00
[SETUPLIB][USETUP] Move the floppy-disk accessibility check into InstallFatBootcodeToFloppy().
svn path=/branches/setup_improvements/; revision=75751
This commit is contained in:
parent
aab937715b
commit
9d93100afc
2 changed files with 12 additions and 11 deletions
|
@ -2303,7 +2303,11 @@ InstallFatBootcodeToFloppy(
|
|||
WCHAR SrcPath[MAX_PATH];
|
||||
WCHAR DstPath[MAX_PATH];
|
||||
|
||||
/* Format the floppy first */
|
||||
/* Verify that the floppy disk is accessible */
|
||||
if (DoesDirExist(NULL, FloppyDevice.Buffer) == FALSE)
|
||||
return STATUS_DEVICE_NOT_READY;
|
||||
|
||||
/* Format the floppy disk */
|
||||
FatFS = GetFileSystemByName(L"FAT");
|
||||
if (!FatFS)
|
||||
{
|
||||
|
|
|
@ -4532,16 +4532,14 @@ BootLoaderFloppyPage(PINPUT_RECORD Ir)
|
|||
}
|
||||
else if (Ir->Event.KeyEvent.uChar.AsciiChar == 0x0D) /* ENTER */
|
||||
{
|
||||
if (DoesDirExist(NULL, L"\\Device\\Floppy0\\") == FALSE)
|
||||
{
|
||||
MUIDisplayError(ERROR_NO_FLOPPY, Ir, POPUP_WAIT_ENTER);
|
||||
return BOOT_LOADER_FLOPPY_PAGE;
|
||||
}
|
||||
|
||||
Status = InstallFatBootcodeToFloppy(&USetupData.SourceRootPath, &USetupData.DestinationArcPath);
|
||||
Status = InstallFatBootcodeToFloppy(&USetupData.SourceRootPath,
|
||||
&USetupData.DestinationArcPath);
|
||||
if (!NT_SUCCESS(Status))
|
||||
{
|
||||
/* Print error message */
|
||||
if (Status == STATUS_DEVICE_NOT_READY)
|
||||
MUIDisplayError(ERROR_NO_FLOPPY, Ir, POPUP_WAIT_ENTER);
|
||||
|
||||
/* TODO: Print error message */
|
||||
return BOOT_LOADER_FLOPPY_PAGE;
|
||||
}
|
||||
|
||||
|
@ -4625,8 +4623,7 @@ BootLoaderHarddiskMbrPage(PINPUT_RECORD Ir)
|
|||
DestinationDevicePathBuffer);
|
||||
if (!NT_SUCCESS(Status))
|
||||
{
|
||||
DPRINT1("InstallMbrBootCodeToDisk() failed (Status %lx)\n",
|
||||
Status);
|
||||
DPRINT1("InstallMbrBootCodeToDisk() failed (Status %lx)\n", Status);
|
||||
MUIDisplayError(ERROR_INSTALL_BOOTCODE, Ir, POPUP_WAIT_ENTER);
|
||||
return QUIT_PAGE;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue