diff options
author | Petr Kulhavy <brain@jikos.cz> | 2016-09-09 10:27:15 +0200 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2016-10-01 20:04:45 -0400 |
commit | 87b8530fe24408b0ef41c9b80f38c395ccafad2c (patch) | |
tree | 31b9a33b2525b1713c542409fe4a59219ccfbd2a /common | |
parent | ba07984068dc96a2234371545df043495dcbeadd (diff) | |
download | u-boot-87b8530fe24408b0ef41c9b80f38c395ccafad2c.tar.gz |
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 'common')
-rw-r--r-- | common/fb_mmc.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/common/fb_mmc.c b/common/fb_mmc.c index 8d0524da78..a0a4a83143 100644 --- a/common/fb_mmc.c +++ b/common/fb_mmc.c @@ -27,7 +27,7 @@ static int part_get_info_efi_by_name_or_alias(struct blk_desc *dev_desc, { int ret; - ret = part_get_info_efi_by_name(dev_desc, name, info); + ret = part_get_info_by_name(dev_desc, name, info); if (ret) { /* strlen("fastboot_partition_alias_") + 32(part_name) + 1 */ char env_alias_name[25 + 32 + 1]; @@ -38,7 +38,7 @@ static int part_get_info_efi_by_name_or_alias(struct blk_desc *dev_desc, strncat(env_alias_name, name, 32); aliased_part_name = getenv(env_alias_name); if (aliased_part_name != NULL) - ret = part_get_info_efi_by_name(dev_desc, + ret = part_get_info_by_name(dev_desc, aliased_part_name, info); } return ret; |