[OpenBIOS] [PATCH 3/10] Don't stop at APPLE_VOID partition

Mark Cave-Ayland mark.cave-ayland at siriusit.co.uk
Wed Aug 10 12:50:01 CEST 2011


On 09/08/11 22:54, William Hahne wrote:

> The void partitions can be occasionally found on Mac OS discs (10.2 for
> example.) Previously mac-parts would just stop at the first void
> partition meaning it would never try to boot from the HFS partition.
>
> Index: packages/mac-parts.c
> ===================================================================
> --- packages/mac-parts.c (revision 1041)
> +++ packages/mac-parts.c (working copy)
> @@ -165,9 +165,12 @@
> for (parnum = 1; parnum <= __be32_to_cpu(par.pmMapBlkCnt); parnum++) {
> SEEK( bs * parnum );
> READ( &par, sizeof(par) );
> - if( __be16_to_cpu(par.pmSig) != DESC_PART_SIGNATURE ||
> -                            !__be32_to_cpu(par.pmPartBlkCnt) )
> + if( __be16_to_cpu(par.pmSig) != DESC_PART_SIGNATURE) {
> break;
> + }
> + if ( !__be32_to_cpu(par.pmPartBlkCnt) ) {
> + continue; /* Just a void partition, ignore it. */
> + }
> DPRINTF("found partition type: %s with status %x\n", par.pmPartType,
> __be32_to_cpu(par.pmPartStatus));

Same as my comment for patch 2/10.


ATB,

Mark.

-- 
Mark Cave-Ayland - Senior Technical Architect
PostgreSQL - PostGIS
Sirius Corporation plc - control through freedom
http://www.siriusit.co.uk
t: +44 870 608 0063

Sirius Labs: http://www.siriusit.co.uk/labs



More information about the OpenBIOS mailing list