From owner-svn-src-stable@FreeBSD.ORG Mon Feb 18 08:24:40 2013 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id 7BECE826; Mon, 18 Feb 2013 08:24:40 +0000 (UTC) (envelope-from ae@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 6369629D; Mon, 18 Feb 2013 08:24:40 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id r1I8OeJU084807; Mon, 18 Feb 2013 08:24:40 GMT (envelope-from ae@svn.freebsd.org) Received: (from ae@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id r1I8Oe5H084805; Mon, 18 Feb 2013 08:24:40 GMT (envelope-from ae@svn.freebsd.org) Message-Id: <201302180824.r1I8Oe5H084805@svn.freebsd.org> From: "Andrey V. Elsukov" Date: Mon, 18 Feb 2013 08:24:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r246938 - in stable/9/sys: boot/common sys X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 18 Feb 2013 08:24:40 -0000 Author: ae Date: Mon Feb 18 08:24:39 2013 New Revision: 246938 URL: http://svnweb.freebsd.org/changeset/base/246938 Log: MFC r246630: Add bootcamp support to the loader. Modified: stable/9/sys/boot/common/part.c stable/9/sys/sys/diskmbr.h Directory Properties: stable/9/sys/ (props changed) stable/9/sys/boot/ (props changed) Modified: stable/9/sys/boot/common/part.c ============================================================================== --- stable/9/sys/boot/common/part.c Mon Feb 18 05:05:01 2013 (r246937) +++ stable/9/sys/boot/common/part.c Mon Feb 18 08:24:39 2013 (r246938) @@ -645,9 +645,13 @@ ptable_open(void *dev, off_t sectors, ui /* 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) { Modified: stable/9/sys/sys/diskmbr.h ============================================================================== --- stable/9/sys/sys/diskmbr.h Mon Feb 18 05:05:01 2013 (r246937) +++ stable/9/sys/sys/diskmbr.h Mon Feb 18 08:24:39 2013 (r246938) @@ -50,6 +50,7 @@ #define DOSPTYP_EXTLBA 0x0f /* DOS extended 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 */