From 87b8530fe24408b0ef41c9b80f38c395ccafad2c Mon Sep 17 00:00:00 2001 From: Petr Kulhavy Date: Fri, 9 Sep 2016 10:27:15 +0200 Subject: disk: part: implement generic function part_get_info_by_name() So far partition search by name has been supported only on the EFI partition table. This patch extends the search to all partition tables. Rename part_get_info_efi_by_name() to part_get_info_by_name(), move it from part_efi.c into part.c and make it a generic function which traverses all part drivers and searches all partitions (in the order given by the linked list). For this a new variable struct part_driver.max_entries is added, which limits the number of partitions searched. For EFI this was GPT_ENTRY_NUMBERS. Similarly the limit is defined for DOS, ISO, MAC and AMIGA partition tables. Signed-off-by: Petr Kulhavy Reviewed-by: Tom Rini Acked-by: Steve Rae --- disk/part_iso.c | 1 + 1 file changed, 1 insertion(+) (limited to 'disk/part_iso.c') diff --git a/disk/part_iso.c b/disk/part_iso.c index f9a741d297..78fc97e4f1 100644 --- a/disk/part_iso.c +++ b/disk/part_iso.c @@ -257,6 +257,7 @@ static int part_test_iso(struct blk_desc *dev_desc) U_BOOT_PART_TYPE(iso) = { .name = "ISO", .part_type = PART_TYPE_ISO, + .max_entries = ISO_ENTRY_NUMBERS, .get_info = part_get_info_iso, .print = part_print_iso, .test = part_test_iso, -- cgit v1.2.3