[U-Boot] [PATCH v2 1/4] disk: part: implement generic function part_get_info_by_name()

Simon Glass sjg at chromium.org
Mon Sep 19 02:57:21 CEST 2016


On 9 September 2016 at 02:27, Petr Kulhavy <brain at jikos.cz> wrote:
> 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 at jikos.cz>
> Reviewed-by: Tom Rini <trini at konsulko.com>
> ---
> v1: initial
> v2: no change
>
>  common/fb_mmc.c   |  4 ++--
>  disk/part.c       | 26 ++++++++++++++++++++++++++
>  disk/part_amiga.c |  1 +
>  disk/part_dos.c   |  1 +
>  disk/part_efi.c   | 20 +-------------------
>  disk/part_iso.c   |  1 +
>  disk/part_mac.c   |  1 +
>  include/part.h    | 32 ++++++++++++++++++++------------
>  8 files changed, 53 insertions(+), 33 deletions(-)

Reviewed-by: Simon Glass <sjg at chromium.org>


More information about the U-Boot mailing list