From: Oliver ROHE <Oliver.Rohe@wago.com>
To: "barebox@lists.infradead.org" <barebox@lists.infradead.org>
Subject: [PATCH] fix partuuid format
Date: Wed, 26 Feb 2025 14:29:48 +0000 [thread overview]
Message-ID: <AS4PR08MB8093429FE84A32C579C03FE69EC22@AS4PR08MB8093.eurprd08.prod.outlook.com> (raw)
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
reply other threads:[~2025-02-26 15:23 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=AS4PR08MB8093429FE84A32C579C03FE69EC22@AS4PR08MB8093.eurprd08.prod.outlook.com \
--to=oliver.rohe@wago.com \
--cc=barebox@lists.infradead.org \
/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