summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSascha Hauer <s.hauer@pengutronix.de>2024-02-29 08:18:24 +0100
committerSascha Hauer <s.hauer@pengutronix.de>2024-03-01 10:21:39 +0100
commit5ea3221bfb5512118ac08702c6384df948752ad6 (patch)
tree47325b3712ab4d28bbd2e23a55c270f9a16d5073
parent47059e0c5bdcea20f4e31c66f1819a881d946ac5 (diff)
downloadbarebox-5ea3221bfb5512118ac08702c6384df948752ad6.tar.gz
barebox-5ea3221bfb5512118ac08702c6384df948752ad6.tar.xz
partitions: efi: change first partition number from 1 to 0
Traditionally barebox starts partition numbers at 0. This was changed in bdc3cb54dc to start at 1. This was done to make the parted numbering consistent to the Linux tool. This breaks boot scripts though which assume 0 to be the first partition, so change it back. Fixes: bdc3cb54dc ("partitions: efi: implement partition manipulation support") Link: https://lore.barebox.org/20240229071825.1624411-1-s.hauer@pengutronix.de Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
-rw-r--r--common/partitions/efi.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/common/partitions/efi.c b/common/partitions/efi.c
index 51e92f65c5..703d23c715 100644
--- a/common/partitions/efi.c
+++ b/common/partitions/efi.c
@@ -504,7 +504,7 @@ static struct partition_desc *efi_partition(void *buf, struct block_device *blk)
part_set_efi_name(&ptes[i], pentry->name);
snprintf(pentry->partuuid, sizeof(pentry->partuuid), "%pUl", &ptes[i].unique_partition_guid);
pentry->typeuuid = ptes[i].partition_type_guid;
- pentry->num = i + 1;
+ pentry->num = i;
list_add_tail(&pentry->list, &epd->pd.partitions);
}
out: