[U-Boot] [PATCH v1] gpt: Fix uuid string format

Andy Shevchenko andriy.shevchenko at linux.intel.com
Mon Feb 27 14:11:15 UTC 2017


From: Vincent Tinelli <vincent.tinelli at intel.com>

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

Signed-off-by: Vincent Tinelli <vincent.tinelli at intel.com>
---
 cmd/gpt.c       | 2 +-
 disk/part_efi.c | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/cmd/gpt.c b/cmd/gpt.c
index 196f506335..3e98821868 100644
--- a/cmd/gpt.c
+++ b/cmd/gpt.c
@@ -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);
diff --git a/disk/part_efi.c b/disk/part_efi.c
index 893cbbdbda..db0c890d5b 100644
--- a/disk/part_efi.c
+++ b/disk/part_efi.c
@@ -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;
-- 
2.11.0



More information about the U-Boot mailing list