]> code.delx.au - refind/commitdiff
Added check for unbootable German iPartition-created FAT partition, so
authorsrs5694 <srs5694@users.sourceforge.net>
Sat, 15 Mar 2014 01:15:26 +0000 (21:15 -0400)
committersrs5694 <srs5694@users.sourceforge.net>
Sat, 15 Mar 2014 01:15:26 +0000 (21:15 -0400)
as to exclude such partitions from the Mac's BIOS boot list.

NEWS.txt
refind/lib.c
refind/main.c

index f770422b40d1bb69d0b50e056ba07df92dac52f3..714844de97a97437c09e269513962f72a8d5854d 100644 (file)
--- a/NEWS.txt
+++ b/NEWS.txt
@@ -1,3 +1,9 @@
+0.7.9 (?/??/2014):
+------------------
+
+- Added detection of German-language FAT (non-)boot sector created by
+  iPartition to keep it out of the Mac boot menu.
+
 0.7.8 (3/9/2014):
 -----------------
 
index cedf1a7a01009e240621874320a6cabdbccbfc33..dc187c6f8cb36783375a088c7a7539624f4ff4fc 100644 (file)
@@ -507,7 +507,7 @@ static VOID ScanVolumeBootcode(REFIT_VOLUME *Volume, BOOLEAN *Bootable)
     UINT8                   Buffer[SAMPLE_SIZE];
     UINTN                   i;
     MBR_PARTITION_INFO      *MbrTable;
-    BOOLEAN                 MbrTableFound;
+    BOOLEAN                 MbrTableFound = FALSE;
 
     Volume->HasBootCode = FALSE;
     Volume->OSIconName = NULL;
@@ -635,9 +635,13 @@ static VOID ScanVolumeBootcode(REFIT_VOLUME *Volume, BOOLEAN *Bootable)
         if (FindMem(Buffer, 512, "Press any key to restart", 24) >= 0)
             Volume->HasBootCode = FALSE;
 
+        // dummy FAT boot sector (created by iPartition)
+        if ((FindMem(Buffer, 512, "Medienfehler", 12) >= 0) &&
+            (FindMem(Buffer, 512, "Neustart: Taste dr\x81" "ken", 22) >= 0))
+            Volume->HasBootCode = FALSE;
+
         // check for MBR partition table
         if (*((UINT16 *)(Buffer + 510)) == 0xaa55) {
-            MbrTableFound = FALSE;
             MbrTable = (MBR_PARTITION_INFO *)(Buffer + 446);
             for (i = 0; i < 4; i++)
                 if (MbrTable[i].StartLBA && MbrTable[i].Size)
index 538377901e12f51e0d36afb9a3e56ad6c9b03d0a..7e1367e9f2c047c88a87e1a3a98beb7b38e6be40 100644 (file)
@@ -156,7 +156,7 @@ static VOID AboutrEFInd(VOID)
 {
     if (AboutMenu.EntryCount == 0) {
         AboutMenu.TitleImage = BuiltinIcon(BUILTIN_ICON_FUNC_ABOUT);
-        AddMenuInfoLine(&AboutMenu, L"rEFInd Version 0.7.8");
+        AddMenuInfoLine(&AboutMenu, L"rEFInd Version 0.7.8.1");
         AddMenuInfoLine(&AboutMenu, L"");
         AddMenuInfoLine(&AboutMenu, L"Copyright (c) 2006-2010 Christoph Pfisterer");
         AddMenuInfoLine(&AboutMenu, L"Copyright (c) 2012-2013 Roderick W. Smith");