[Concept,08/18] boot: Use the new label finder in bootflow_menu_add()

Message ID 20250902152158.2285264-9-sjg@u-boot.org
State New
Headers
Series efi: Improve integration of the app with a Shim environment |

Commit Message

Simon Glass Sept. 2, 2025, 3:21 p.m. UTC
  From: Simon Glass <sjg@chromium.org>

Make use of bootflow_guess_label() to get the label for a menu, since it
provides more information for the EFI app.

Signed-off-by: Simon Glass <sjg@chromium.org>
---

 boot/bootflow_menu.c | 7 +------
 1 file changed, 1 insertion(+), 6 deletions(-)
  

Patch

diff --git a/boot/bootflow_menu.c b/boot/bootflow_menu.c
index 2f08fa54081..5e0e365d12b 100644
--- a/boot/bootflow_menu.c
+++ b/boot/bootflow_menu.c
@@ -124,7 +124,6 @@  int bootflow_menu_add(struct expo *exp, struct bootflow *bflow, int seq,
 {
 	struct menu_priv *priv = exp->priv;
 	char str[2], *label, *key;
-	struct udevice *media;
 	struct scene *scn;
 	const char *name;
 	uint preview_id;
@@ -144,11 +143,7 @@  int bootflow_menu_add(struct expo *exp, struct bootflow *bflow, int seq,
 	if (!key)
 		return log_msg_ret("key", -ENOMEM);
 
-	media = dev_get_parent(bflow->dev);
-	if (device_get_uclass_id(media) == UCLASS_MASS_STORAGE)
-		name = "usb";
-	else
-		name = media->name;
+	name = bootflow_guess_label(bflow);
 	label = strdup(name);
 
 	if (!label) {