X-Git-Url: https://git.sur5r.net/?a=blobdiff_plain;f=include%2Fpart.h;h=0750aee907cffc13f8f8d6f2091215ec7dabafa8;hb=17b3f32dd04f0008890b8bd57ba2ea50601c6f97;hp=b2e820ef8ada0549db9b19014799a5105039fd42;hpb=4d1c166fee4a34e8a7d8d05b2a4102c7c668726d;p=u-boot diff --git a/include/part.h b/include/part.h index b2e820ef8a..0750aee907 100644 --- a/include/part.h +++ b/include/part.h @@ -1,8 +1,7 @@ +/* SPDX-License-Identifier: GPL-2.0+ */ /* * (C) Copyright 2000-2004 * Wolfgang Denk, DENX Software Engineering, wd@denx.de. - * - * SPDX-License-Identifier: GPL-2.0+ */ #ifndef _PART_H #define _PART_H @@ -173,6 +172,21 @@ int blk_get_device_part_str(const char *ifname, const char *dev_part_str, struct blk_desc **dev_desc, disk_partition_t *info, int allow_whole_dev); +/** + * part_get_info_by_name_type() - Search for a partition by name + * for only specified partition type + * + * @param dev_desc - block device descriptor + * @param gpt_name - the specified table entry name + * @param info - returns the disk partition info + * @param part_type - only search in partitions of this type + * + * @return - the partition number on match (starting on 1), -1 on no match, + * otherwise error + */ +int part_get_info_by_name_type(struct blk_desc *dev_desc, const char *name, + disk_partition_t *info, int part_type); + /** * part_get_info_by_name() - Search for a partition by name * among all available registered partitions