diff options
Diffstat (limited to 'include/part.h')
-rw-r--r-- | include/part.h | 21 |
1 files changed, 20 insertions, 1 deletions
diff --git a/include/part.h b/include/part.h index fcb3c13dea4..7075b2cb116 100644 --- a/include/part.h +++ b/include/part.h @@ -7,7 +7,6 @@ #define _PART_H #include <blk.h> -#include <ide.h> #include <u-boot/uuid.h> #include <linker_lists.h> #include <linux/errno.h> @@ -316,6 +315,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 +399,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, |