[PATCH] partitions: dos: parse extended partition

Uwe Kleine-König u.kleine-koenig at pengutronix.de
Thu Nov 7 19:51:53 EST 2013


Hello,

On Fri, Nov 08, 2013 at 01:17:26AM +0100, Uwe Kleine-König wrote:
> DOS MBRs might contain an extended partition that holds several logical
> partitions. Add these to the partitions of the block device.
> 
> Signed-off-by: Uwe Kleine-König <u.kleine-koenig at pengutronix.de>
> ---
>  common/partitions/dos.c | 76 ++++++++++++++++++++++++++++++++++++++++++++++++-
>  1 file changed, 75 insertions(+), 1 deletion(-)
This even fails to build. See below.

> diff --git a/common/partitions/dos.c b/common/partitions/dos.c
> index 1d8213b..f907abc 100644
> --- a/common/partitions/dos.c
> +++ b/common/partitions/dos.c
> [...]
> @@ -129,6 +181,7 @@ static void dos_partition(void *buf, struct block_device *blk,
> [...]
> +					dev_warn(blk->dev, "Skipping additional extended partition\n");
> +			}
> +
>  		} else {
>  			dev_dbg(blk->dev, "Skipping empty partition %d\n", i);
>  		}
>  	}
>  
> +	if (first_extended_partition)
s/first_//

> +		dos_extended_partition(blk, pd, extended_partition);
> +
>  	dsp = xzalloc(sizeof(*dsp));
>  	dsp->blk = blk;
>  

Best regards
Uwe

-- 
Pengutronix e.K.                           | Uwe Kleine-König            |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |



More information about the barebox mailing list