mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Sascha Hauer <sha@pengutronix.de>
To: Christopher Ebner <ch.ebner@commend.com>
Cc: barebox@lists.infradead.org
Subject: Re: [PATCH] partitions: efi: Continue partition enumeration on invalid pte
Date: Tue, 6 Jun 2023 11:46:16 +0200	[thread overview]
Message-ID: <20230606094616.GA18491@pengutronix.de> (raw)
In-Reply-To: <20230605101105.485283-1-ch.ebner@commend.com>

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@commend.com>
> ---
>  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 |



      reply	other threads:[~2023-06-06  9:47 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-06-05 10:11 Christopher Ebner
2023-06-06  9:46 ` Sascha Hauer [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20230606094616.GA18491@pengutronix.de \
    --to=sha@pengutronix.de \
    --cc=barebox@lists.infradead.org \
    --cc=ch.ebner@commend.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox