mirror of
https://github.com/reactos/reactos.git
synced 2025-08-04 16:05:51 +00:00
[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:
parent
e93efe68d0
commit
1ac07cde09
1 changed files with 3 additions and 0 deletions
|
@ -62,6 +62,7 @@ VOID LoadAndBootBootSector(PCSTR OperatingSystemName)
|
||||||
// Read boot sector
|
// Read boot sector
|
||||||
if (!FsReadFile(FilePointer, 512, &BytesRead, (void*)0x7c00) || (BytesRead != 512))
|
if (!FsReadFile(FilePointer, 512, &BytesRead, (void*)0x7c00) || (BytesRead != 512))
|
||||||
{
|
{
|
||||||
|
UiMessageBox("Unable to read boot sector.");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -133,6 +134,7 @@ VOID LoadAndBootPartition(PCSTR OperatingSystemName)
|
||||||
// If this fails then abort
|
// If this fails then abort
|
||||||
if (!MachDiskReadLogicalSectors(DriveNumber, PartitionTableEntry.SectorCountBeforePartition, 1, (PVOID)0x7C00))
|
if (!MachDiskReadLogicalSectors(DriveNumber, PartitionTableEntry.SectorCountBeforePartition, 1, (PVOID)0x7C00))
|
||||||
{
|
{
|
||||||
|
UiMessageBox("Unable to read partition's boot sector.");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -186,6 +188,7 @@ VOID LoadAndBootDrive(PCSTR OperatingSystemName)
|
||||||
// If this fails then abort
|
// If this fails then abort
|
||||||
if (!MachDiskReadLogicalSectors(DriveNumber, 0, 1, (PVOID)0x7C00))
|
if (!MachDiskReadLogicalSectors(DriveNumber, 0, 1, (PVOID)0x7C00))
|
||||||
{
|
{
|
||||||
|
UiMessageBox("Unable to read boot sector");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue