[PATCH 1/2] cmd: read: use part_get_info_by_dev_and_name_or_num() instead of open-coded dev_part parsing

Simon Glass sjg at chromium.org
Tue Feb 21 20:41:57 CET 2023


On Fri, 17 Feb 2023 at 17:59, Rasmus Villemoes
<rasmus.villemoes at prevas.dk> wrote:
>
> Use the helper part_get_info_by_dev_and_name_or_num() for parsing a
> dev[:part] string and obtaining the partition info in one go, instead
> of open-coding all that.
>
> As a bonus, this will automatically allow using the dev#partname
> syntax as well, for accessing raw partitions by name.
>
> Signed-off-by: Rasmus Villemoes <rasmus.villemoes at prevas.dk>
> ---
>  cmd/read.c | 32 ++++++++------------------------
>  1 file changed, 8 insertions(+), 24 deletions(-)
>

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


More information about the U-Boot mailing list