diff options
Diffstat (limited to 'include/part.h')
-rw-r--r-- | include/part.h | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/include/part.h b/include/part.h index 3fa2d8424b7..7075b2cb116 100644 --- a/include/part.h +++ b/include/part.h @@ -315,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. @@ -385,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, |