mail archive of the barebox mailing list
 help / color / mirror / Atom feed
* [PATCH] partitions: efi: Continue partition enumeration on invalid pte
@ 2023-06-05 10:11 Christopher Ebner
  2023-06-06  9:46 ` Sascha Hauer
  0 siblings, 1 reply; 2+ messages in thread
From: Christopher Ebner @ 2023-06-05 10:11 UTC (permalink / raw)
  To: barebox; +Cc: ch.ebner

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(-)

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




^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2023-06-06  9:47 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-06-05 10:11 [PATCH] partitions: efi: Continue partition enumeration on invalid pte Christopher Ebner
2023-06-06  9:46 ` Sascha Hauer

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox