summaryrefslogtreecommitdiff
path: root/include/part.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/part.h')
-rw-r--r--include/part.h36
1 files changed, 34 insertions, 2 deletions
diff --git a/include/part.h b/include/part.h
index fcb3c13dea4..b772fb34c8a 100644
--- a/include/part.h
+++ b/include/part.h
@@ -7,9 +7,7 @@
#define _PART_H
#include <blk.h>
-#include <ide.h>
#include <u-boot/uuid.h>
-#include <linker_lists.h>
#include <linux/errno.h>
#include <linux/list.h>
@@ -316,6 +314,20 @@ int part_get_info_by_name(struct blk_desc *desc, const char *name,
struct disk_partition *info);
/**
+ * part_get_info_by_uuid() - Search for a partition by uuid
+ * among all available registered partitions
+ *
+ * @desc: block device descriptor
+ * @uuid: the specified table entry uuid
+ * @info: the disk partition info
+ *
+ * Return: the partition number on match (starting on 1), -ENOENT on no match,
+ * otherwise error
+ */
+int part_get_info_by_uuid(struct blk_desc *desc, const char *uuid,
+ struct disk_partition *info);
+
+/**
* part_get_info_by_dev_and_name_or_num() - Get partition info from dev number
* and part name, or dev number and
* part number.
@@ -386,6 +398,12 @@ static inline int part_get_info_by_name(struct blk_desc *desc, const char *name,
return -ENOENT;
}
+static inline int part_get_info_by_uuid(struct blk_desc *desc, const char *uuid,
+ struct disk_partition *info)
+{
+ return -ENOENT;
+}
+
static inline int
part_get_info_by_dev_and_name_or_num(const char *dev_iface,
const char *dev_part_str,
@@ -628,6 +646,20 @@ int gpt_verify_partitions(struct blk_desc *desc,
*/
int get_disk_guid(struct blk_desc *desc, char *guid);
+/**
+ * part_get_gpt_pte() - Get the GPT partition table entry of a partition
+ *
+ * This function reads the GPT partition table entry (PTE) for a given
+ * block device and partition number.
+ *
+ * @desc: block device descriptor
+ * @part: partition number for which to return the PTE
+ * @gpt_e: GPT partition table entry
+ *
+ * Return: 0 on success, otherwise error
+ */
+int part_get_gpt_pte(struct blk_desc *desc, int part, gpt_entry *gpt_e);
+
#endif
#if CONFIG_IS_ENABLED(DOS_PARTITION)