[freeldr]

Andrew Steinborn <asteinborn78@gmail.com>
- Display error message when boot sector reading fails.
See issue #4641 for more details.

svn path=/trunk/; revision=43362
This commit is contained in:
Aleksey Bragin 2009-10-10 13:05:02 +00:00
parent e93efe68d0
commit 1ac07cde09

View file

@ -62,6 +62,7 @@ VOID LoadAndBootBootSector(PCSTR OperatingSystemName)
// Read boot sector
if (!FsReadFile(FilePointer, 512, &BytesRead, (void*)0x7c00) || (BytesRead != 512))
{
UiMessageBox("Unable to read boot sector.");
return;
}
@ -133,6 +134,7 @@ VOID LoadAndBootPartition(PCSTR OperatingSystemName)
// If this fails then abort
if (!MachDiskReadLogicalSectors(DriveNumber, PartitionTableEntry.SectorCountBeforePartition, 1, (PVOID)0x7C00))
{
UiMessageBox("Unable to read partition's boot sector.");
return;
}
@ -186,6 +188,7 @@ VOID LoadAndBootDrive(PCSTR OperatingSystemName)
// If this fails then abort
if (!MachDiskReadLogicalSectors(DriveNumber, 0, 1, (PVOID)0x7C00))
{
UiMessageBox("Unable to read boot sector");
return;
}