]> git.ipfire.org Git - thirdparty/u-boot.git/commitdiff
cmd: usb_mass_storage: Use part_get_info_by_dev_and_name_or_num
authorSean Anderson <sean.anderson@seco.com>
Fri, 29 Oct 2021 15:05:54 +0000 (11:05 -0400)
committerMarek Vasut <marex@denx.de>
Sat, 30 Oct 2021 20:55:00 +0000 (22:55 +0200)
This allows specifying partitions using more extended syntax. This is
particularly useful to access eMMC hardware partitions. For example,
this allows something like

ums 0 mmc 0.0,0.1,0.2,0.3

to expose four LUNs for each of the four default eMMC hardware
partitions. Note that the comma syntax was already present, and this
syntax is already documented.

Signed-off-by: Sean Anderson <sean.anderson@seco.com>
cmd/usb_mass_storage.c

index 14fa7233c71c8502cee42275a4d6d089b4824e3a..d4e619b842c8b3dfda3be3edc58f940654d3f1a4 100644 (file)
@@ -74,8 +74,8 @@ static int ums_init(const char *devtype, const char *devnums_part_str)
                if (!devnum_part_str)
                        break;
 
-               partnum = blk_get_device_part_str(devtype, devnum_part_str,
-                                       &block_dev, &info, 1);
+               partnum = part_get_info_by_dev_and_name_or_num(devtype, devnum_part_str,
+                                                              &block_dev, &info, 1);
 
                if (partnum < 0)
                        goto cleanup;