Skip to contentSkip to conversation

gpt: Fix uuid string format

PATCH New Andy Shevchenko 4 participants 5 messages Feb 27, 2017 – Mar 18, 2017

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 gpt: Fix uuid string format

From: Vincent Tinelli <[email protected]>

Change GPT UUID string format from UUID to GUID per specification.

---
 cmd/gpt.c       | 2 +-
 disk/part_efi.c | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
cmd/gpt.c +1 -1
index 196f506335..3e98821868 100644
@@ -54,7 +54,7 @@ static int extract_env(const char *str, char **env)
 	if (e == NULL) {
 #ifdef CONFIG_RANDOM_UUID
 		debug("%s unset. ", str);
-		gen_rand_uuid_str(uuid_str, UUID_STR_FORMAT_STD);
+		gen_rand_uuid_str(uuid_str, UUID_STR_FORMAT_GUID);
 		setenv(s, uuid_str);
 
 		e = getenv(s);
disk/part_efi.c +1 -1
index 893cbbdbda..db0c890d5b 100644
@@ -463,7 +463,7 @@ int gpt_fill_pte(gpt_header *gpt_h, gpt_entry *gpt_e,
 		str_uuid = partitions[i].uuid;
 		bin_uuid = gpt_e[i].unique_partition_guid.b;
 
-		if (uuid_str_to_bin(str_uuid, bin_uuid, UUID_STR_FORMAT_STD)) {
+		if (uuid_str_to_bin(str_uuid, bin_uuid, UUID_STR_FORMAT_GUID)) {
 			printf("Partition no. %d: invalid guid: %s\n",
 				i, str_uuid);
 			return -1;
Signature · 1 line
2.11.0
#2 lore raw

PATCH 1/1 gpt: Fix uuid string format

Quoted 14 lines · Simon Glass

Hi Andy,

Quoted 9 lines · Andy Shevchenko

From: Vincent Tinelli <[email protected]>

Change GPT UUID string format from UUID to GUID per specification.

---
 cmd/gpt.c       | 2 +-
 disk/part_efi.c | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
Quoted 3 lines

How about also a patch to add comments to that enum in uuid.h?

I hope it's not a condition for your tag? Otherwise we might do this later at some point.

Signature · 2 lines
With Best Regards,
Andy Shevchenko
#3 lore raw

PATCH 1/1 gpt: Fix uuid string format

Hi Andy,

Quoted 15 lines · Andy Shevchenko
Quoted 14 lines · Simon Glass

Hi Andy,

Quoted 9 lines · Andy Shevchenko

From: Vincent Tinelli <[email protected]>

Change GPT UUID string format from UUID to GUID per specification.

---
 cmd/gpt.c       | 2 +-
 disk/part_efi.c | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
Quoted 6 lines
Quoted 3 lines

How about also a patch to add comments to that enum in uuid.h?

I hope it's not a condition for your tag? Otherwise we might do this later at some point.

No, it's a suggestion. I normally use something 'but please ...' if I think something needs to be done.

However it does seem confusing, as this bug suggests.

Regards,
Simon

#4 lore raw

PATCH 1/1 gpt: Fix uuid string format

In reply to Andy Shevchenko
Quoted 6 lines · Andy Shevchenko

From: Vincent Tinelli <[email protected]>

Change GPT UUID string format from UUID to GUID per specification.

Applied to u-boot/master, thanks!

Signature · 8 lines
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20170317/ed2db21a/attachment.sig>