diff options
author | Petr Kulhavy | 2016-09-09 10:27:15 +0200 |
---|---|---|
committer | Tom Rini | 2016-10-01 20:04:45 -0400 |
commit | 87b8530fe24408b0ef41c9b80f38c395ccafad2c (patch) | |
tree | 31b9a33b2525b1713c542409fe4a59219ccfbd2a /disk/part_amiga.c | |
parent | ba07984068dc96a2234371545df043495dcbeadd (diff) |
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 <brain@jikos.cz>
Reviewed-by: Tom Rini <trini@konsulko.com>
Acked-by: Steve Rae <steve.rae@raedomain.com>
Diffstat (limited to 'disk/part_amiga.c')
-rw-r--r-- | disk/part_amiga.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/disk/part_amiga.c b/disk/part_amiga.c index d4316b858c1..25fe56ce424 100644 --- a/disk/part_amiga.c +++ b/disk/part_amiga.c @@ -381,6 +381,7 @@ static void part_print_amiga(struct blk_desc *dev_desc) U_BOOT_PART_TYPE(amiga) = { .name = "AMIGA", .part_type = PART_TYPE_AMIGA, + .max_entries = AMIGA_ENTRY_NUMBERS, .get_info = part_get_info_amiga, .print = part_print_amiga, .test = part_test_amiga, |