]> git.sur5r.net Git - u-boot/blobdiff - include/part.h
Merge git://www.denx.de/git/u-boot-imx
[u-boot] / include / part.h
index 87b11112b8d85a457e763a8d028295788338f39d..0cd803a9334fb799aae45088988ce9184ceece68 100644 (file)
@@ -10,6 +10,7 @@
 #include <blk.h>
 #include <ide.h>
 #include <uuid.h>
+#include <linux/list.h>
 
 struct block_drvr {
        char *name;
@@ -49,6 +50,7 @@ struct block_drvr {
 
 #define PART_NAME_LEN 32
 #define PART_TYPE_LEN 32
+#define MAX_SEARCH_PARTITIONS 64
 
 typedef struct disk_partition {
        lbaint_t        start;  /* # of first block in partition        */
@@ -68,6 +70,12 @@ typedef struct disk_partition {
 #endif
 } disk_partition_t;
 
+struct disk_part {
+       int partnum;
+       disk_partition_t gpt_part_info;
+       struct list_head list;
+};
+
 /* Misc _get_dev functions */
 #ifdef CONFIG_PARTITIONS
 /**
@@ -371,6 +379,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)