svn commit: r195045 - head/sys/boot/i386/libi386

Rui Paulo rpaulo at FreeBSD.org
Fri Jun 26 09:32:32 UTC 2009


Author: rpaulo
Date: Fri Jun 26 09:32:31 2009
New Revision: 195045
URL: http://svn.freebsd.org/changeset/base/195045

Log:
  On special systems where the MBR and the GPT are in sync (up to the 4th
  slicei, Apple EFI hardware), the bootloader will fail to recognize the GPT
  if it finds anything else but the EFI partition. Change the check to continue
  detecting the GPT by looking at the EFI partition on the MBR but
  stopping successfuly after finding it.
  
  PR:		kern/134590
  Submitted by:	Christoph Langguth <christoph at rosenkeller.org>
  Reviewed by:	jhb
  MFC after:	2 weeks
  Approved by:	re (kib)

Modified:
  head/sys/boot/i386/libi386/biosdisk.c

Modified: head/sys/boot/i386/libi386/biosdisk.c
==============================================================================
--- head/sys/boot/i386/libi386/biosdisk.c	Fri Jun 26 07:11:14 2009	(r195044)
+++ head/sys/boot/i386/libi386/biosdisk.c	Fri Jun 26 09:32:31 2009	(r195045)
@@ -880,7 +880,7 @@ bd_open_gpt(struct open_disk *od, struct
     for (i = 0; i < NDOSPART; i++) {
 	if (dp[i].dp_typ == 0xee)
 	    part++;
-	else if (dp[i].dp_typ != 0x00)
+	else if ((part != 1) && (dp[i].dp_typ != 0x00))
 	    return (EINVAL);
     }
     if (part != 1)


More information about the svn-src-head mailing list