diff options
-rw-r--r-- | sys/boot/common/part.c | 10 | ||||
-rw-r--r-- | sys/sys/diskmbr.h | 1 |
2 files changed, 8 insertions, 3 deletions
diff --git a/sys/boot/common/part.c b/sys/boot/common/part.c index 31ea82a..2b3a16f 100644 --- a/sys/boot/common/part.c +++ b/sys/boot/common/part.c @@ -645,9 +645,13 @@ ptable_open(void *dev, off_t sectors, uint16_t sectorsize, /* Do we have some invalid values? */ if (i != NDOSPART || (table->type == PTABLE_GPT && count > 1)) { - table->type = PTABLE_NONE; - DEBUG("invalid values detected, ignore partition table"); - goto out; + if (dp[1].dp_typ != DOSPTYP_HFS) { + table->type = PTABLE_NONE; + DEBUG("invalid values detected, ignore " + "partition table"); + goto out; + } + DEBUG("Bootcamp detected"); } #ifdef LOADER_GPT_SUPPORT if (table->type == PTABLE_GPT) { diff --git a/sys/sys/diskmbr.h b/sys/sys/diskmbr.h index 94fc475..747f70b 100644 --- a/sys/sys/diskmbr.h +++ b/sys/sys/diskmbr.h @@ -51,6 +51,7 @@ #define DOSPTYP_PPCBOOT 0x41 /* PReP/CHRP boot partition */ #define DOSPTYP_LDM 0x42 /* Win2k dynamic extended partition */ #define DOSPTYP_386BSD 0xa5 /* 386BSD partition type */ +#define DOSPTYP_HFS 0xaf /* HFS/HFS+ partition type */ #define DOSPTYP_LINSWP 0x82 /* Linux swap partition */ #define DOSPTYP_LINUX 0x83 /* Linux partition */ #define DOSPTYP_LINLVM 0x8e /* Linux LVM partition */ |