* [PATCH] fix partuuid format
@ 2025-02-26 14:29 Oliver ROHE
0 siblings, 0 replies; only message in thread
From: Oliver ROHE @ 2025-02-26 14:29 UTC (permalink / raw)
To: barebox
root=PARTUUID=SSSSSSSS-PP
Where SSSSSSSS is a zero-filled 32-bit MBR disk signature,
and PP is a zero-filled partition number in hexadecimal format.
Signed-off-by: Oliver Rohe <oliver.rohe@wago.com>
diff --git a/common/partitions/dos.c b/common/partitions/dos.c
index 95b71af7ff8..6204fdabc81 100644
--- a/common/partitions/dos.c
+++ b/common/partitions/dos.c
@@ -172,7 +172,7 @@ static void dos_extended_partition(struct block_device *blk, struct dos_partitio
pentry->size = get_unaligned_le32(&table[0].partition_size);
pentry->dos_partition_type = table[0].type;
pentry->num = partno;
- sprintf(pentry->partuuid, "%08x-%02u", signature, partno + 1);
+ sprintf(pentry->partuuid, "%08x-%02x", signature, partno + 1);
list_add_tail(&pentry->list, &dpd->pd.partitions);
@@ -270,7 +270,7 @@ static struct partition_desc *dos_partition(void *buf, struct block_device *blk)
extract_flags(&table[i], pentry);
pentry->num = i;
- sprintf(pentry->partuuid, "%08x-%02d", signature, i + 1);
+ sprintf(pentry->partuuid, "%08x-%02x", signature, i + 1);
dpd->signature = signature;
if (is_extended_partition(pentry)) {
diff --git a/scripts/kernel-install.c b/scripts/kernel-install.c
index 240122f2d22..05e464d114c 100644
--- a/scripts/kernel-install.c
+++ b/scripts/kernel-install.c
@@ -1370,7 +1370,7 @@ int main(int argc, char *argv[])
goto out;
}
- append_option("root=PARTUUID=%08X-%02d", nt_disk_signature, root_partition_num);
+ append_option("root=PARTUUID=%08X-%02X", nt_disk_signature, root_partition_num);
}
if (list) {
--
2.25.1
Internal
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2025-02-26 15:23 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-02-26 14:29 [PATCH] fix partuuid format Oliver ROHE
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox