summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorAlison Chaiken <alison@peloton-tech.com>2017-06-25 23:43:23 (GMT)
committerTom Rini <trini@konsulko.com>2017-08-04 13:56:04 (GMT)
commit73d6d18b7147c90d6f8a60acb8dad663a225e63d (patch)
tree0df0ea577d085439b7a87dac0d92e0b46cb5862a /include
parente6faf21f259ccc0601d06d458e33fb742deb1843 (diff)
downloadu-boot-fsl-qoriq-73d6d18b7147c90d6f8a60acb8dad663a225e63d.tar.xz
GPT: add accessor function for disk GUID
In order to read the GPT, modify the partition name strings, and then write out a new GPT, the disk GUID is needed. While there is an existing accessor for the partition UUIDs, there is none yet for the disk GUID. Changes since v6: none. Signed-off-by: Alison Chaiken <alison@peloton-tech.com>
Diffstat (limited to 'include')
-rw-r--r--include/part.h15
1 files changed, 15 insertions, 0 deletions
diff --git a/include/part.h b/include/part.h
index 22da604..c41aa6a 100644
--- a/include/part.h
+++ b/include/part.h
@@ -372,6 +372,21 @@ int gpt_verify_headers(struct blk_desc *dev_desc, gpt_header *gpt_head,
int gpt_verify_partitions(struct blk_desc *dev_desc,
disk_partition_t *partitions, int parts,
gpt_header *gpt_head, gpt_entry **gpt_pte);
+
+
+/**
+ * get_disk_guid() - Function to read the GUID string from a device's GPT
+ *
+ * This function reads the GUID string from a block device whose descriptor
+ * is provided.
+ *
+ * @param dev_desc - block device descriptor
+ * @param guid - pre-allocated string in which to return the GUID
+ *
+ * @return - '0' on success, otherwise error
+ */
+int get_disk_guid(struct blk_desc *dev_desc, char *guid);
+
#endif
#if CONFIG_IS_ENABLED(DOS_PARTITION)