Re: [PATCH] partitions: efi: Continue partition enumeration on invalid pte

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, Jun 05, 2023 at 12:11:05PM +0200, Christopher Ebner wrote:
> The efi partition enumeration stops, if a partition entry is
> invalid or non-existent.
> Later partitions which would be valid are therefore not enumerated.
> This can be the case, eg. if a device with the following
> partitions is enumerated: p1, p2, p4, p5, p6.
> Skipping the invalid entry instead of exiting the enumeration fixes
> this problem.
> 
> Signed-off-by: Christopher Ebner <ch.ebner@xxxxxxxxxxx>
> ---
>  common/partitions/efi.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)

Applied, thanks

Sascha

> 
> diff --git a/common/partitions/efi.c b/common/partitions/efi.c
> index ffdbd9a56f..0411a8b248 100644
> --- a/common/partitions/efi.c
> +++ b/common/partitions/efi.c
> @@ -460,7 +460,7 @@ static void efi_partition(void *buf, struct block_device *blk,
>  	for (i = 0; i < nb_part; i++) {
>  		if (!is_pte_valid(&ptes[i], last_lba(blk))) {
>  			dev_dbg(blk->dev, "Invalid pte %d\n", i);
> -			return;
> +			continue;
>  		}
>  
>  		pentry = &pd->parts[pd->used_entries];
> -- 
> 2.25.1
> 
> 
> 

-- 
Pengutronix e.K.                           |                             |
Steuerwalder Str. 21                       | http://www.pengutronix.de/  |
31137 Hildesheim, Germany                  | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |




[Index of Archives]     [Linux Embedded]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux