]> git.dujemihanovic.xyz Git - u-boot.git/commit
cmd: read: use part_get_info_by_dev_and_name_or_num() instead of open-coded dev_part...
authorRasmus Villemoes <rasmus.villemoes@prevas.dk>
Thu, 2 Mar 2023 08:12:21 +0000 (09:12 +0100)
committerTom Rini <trini@konsulko.com>
Fri, 17 Mar 2023 19:44:01 +0000 (15:44 -0400)
commitfca7db5b801ff4e3d67e0d40c7302cf7cf68b478
treed7215597e79740fe86b2c25247910218e601a288
parentcefd0449d6df77eb0edb8a6800a441f9cd4e3653
cmd: read: use part_get_info_by_dev_and_name_or_num() instead of open-coded dev_part parsing

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.

Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Rasmus Villemoes <rasmus.villemoes@prevas.dk>
cmd/read.c