From 1ac07cde098e6185b85e1b809d33a9493ecdd8b1 Mon Sep 17 00:00:00 2001 From: Aleksey Bragin Date: Sat, 10 Oct 2009 13:05:02 +0000 Subject: [PATCH] [freeldr] Andrew Steinborn - Display error message when boot sector reading fails. See issue #4641 for more details. svn path=/trunk/; revision=43362 --- reactos/boot/freeldr/freeldr/miscboot.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/reactos/boot/freeldr/freeldr/miscboot.c b/reactos/boot/freeldr/freeldr/miscboot.c index 8452efdc7d6..4f82aa48586 100644 --- a/reactos/boot/freeldr/freeldr/miscboot.c +++ b/reactos/boot/freeldr/freeldr/miscboot.c @@ -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; }