[PATCH v5 3/4] boot: Rename usb to ums
Simon Glass
sjg at chromium.org
Sun Oct 12 08:43:55 CEST 2025
The name 'usb' is quite generic and could apply to any USB device.
Rename it 'ums', for USB Mass Storage.
Signed-off-by: Simon Glass <sjg at chromium.org>
Suggested-by: Tom Rini <trini at konsulko.com>
---
(no changes since v1)
boot/bootflow.c | 5 ++++-
include/bootflow.h | 2 +-
test/boot/bootflow.c | 2 +-
3 files changed, 6 insertions(+), 3 deletions(-)
diff --git a/boot/bootflow.c b/boot/bootflow.c
index 6485d473d69..13f086167ab 100644
--- a/boot/bootflow.c
+++ b/boot/bootflow.c
@@ -1019,7 +1019,10 @@ const char *bootflow_guess_label(const struct bootflow *bflow)
if (bflow->dev) {
struct udevice *media = dev_get_parent(bflow->dev);
- name = dev_get_uclass_name(media);
+ if (device_get_uclass_id(media) == UCLASS_MASS_STORAGE)
+ name = "ums";
+ else
+ name = dev_get_uclass_name(media);
}
if (!name)
name = "(none)";
diff --git a/include/bootflow.h b/include/bootflow.h
index 657e3731f11..2aa00a9b1db 100644
--- a/include/bootflow.h
+++ b/include/bootflow.h
@@ -696,7 +696,7 @@ int bootflow_menu_poll(struct expo *exp, int *seqp);
* bootflow_guess_label() - Produce a plausible label for a bootflow
*
* This uses the uclass name or EFI device-path to come up with a useful label
- * for display to the user. Ideally it will say "mmc", "usb", nvme", etc.
+ * for display to the user. Ideally it will say "mmc", "ums", nvme", etc.
*/
const char *bootflow_guess_label(const struct bootflow *bflow);
diff --git a/test/boot/bootflow.c b/test/boot/bootflow.c
index 7cd83dc7443..b777708f5d6 100644
--- a/test/boot/bootflow.c
+++ b/test/boot/bootflow.c
@@ -1301,7 +1301,7 @@ static int bootflow_efi(struct unit_test_state *uts)
ut_assert_nextlinen("---");
ut_assert_nextlinen(" 0 extlinux");
ut_assert_nextlinen(
- " 1 efi ready usb_mass_ 1 usb_mass_storage.lun0.boo /EFI/BOOT/BOOTSBOX.EFI");
+ " 1 efi ready ums 1 usb_mass_storage.lun0.boo /EFI/BOOT/BOOTSBOX.EFI");
ut_assert_nextlinen("---");
ut_assert_skip_to_line("(2 bootflows, 2 valid)");
ut_assert_console_end();
--
2.43.0
More information about the U-Boot
mailing list