From 7585ec4d36ebb7e286cfec959b2de084eded8201 Mon Sep 17 00:00:00 2001 From: Sughosh Ganu Date: Fri, 2 Jul 2021 16:33:46 +0530 Subject: [PATCH] feat(partition): copy the partition GUID into the partition structure Copy the UniquePartitionGUID member of a GPT partition entry into the partition_entry structure. This GUID is subsequently used to identify the image to boot on a platform which supports multiple partitions of firmware components using the FWU metadata structure. Signed-off-by: Sughosh Ganu Change-Id: I8b55a1ee7deb1353886fbd8ebde53055d677fee0 --- drivers/partition/gpt.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/partition/gpt.c b/drivers/partition/gpt.c index 1b804deef..ee0bddf75 100644 --- a/drivers/partition/gpt.c +++ b/drivers/partition/gpt.c @@ -9,6 +9,7 @@ #include #include +#include #include #include @@ -57,5 +58,7 @@ int parse_gpt_entry(gpt_entry_t *gpt_entry, partition_entry_t *entry) entry->length = (uint64_t)(gpt_entry->last_lba - gpt_entry->first_lba + 1) * PLAT_PARTITION_BLOCK_SIZE; + guidcpy(&entry->part_guid, &gpt_entry->unique_uuid); + return 0; }