summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--boot/bootflow_menu.c7
-rw-r--r--include/bootflow.h3
2 files changed, 9 insertions, 1 deletions
diff --git a/boot/bootflow_menu.c b/boot/bootflow_menu.c
index 143ef841332..9d0dc352f97 100644
--- a/boot/bootflow_menu.c
+++ b/boot/bootflow_menu.c
@@ -9,6 +9,7 @@
#define LOG_CATEGORY UCLASS_BOOTSTD
#include <bootflow.h>
+#include <bootmeth.h>
#include <bootstd.h>
#include <cli.h>
#include <dm.h>
@@ -76,6 +77,7 @@ int bootflow_menu_new(struct expo **expp)
last_bootdev = NULL;
for (ret = bootflow_first_glob(&bflow), i = 0; !ret && i < 36;
ret = bootflow_next_glob(&bflow), i++) {
+ struct bootmeth_uc_plat *ucp;
char str[2], *label, *key;
uint preview_id;
bool add_gap;
@@ -83,6 +85,11 @@ int bootflow_menu_new(struct expo **expp)
if (bflow->state != BOOTFLOWST_READY)
continue;
+ /* No media to show for BOOTMETHF_GLOBAL bootmeths */
+ ucp = dev_get_uclass_plat(bflow->method);
+ if (ucp->flags & BOOTMETHF_GLOBAL)
+ continue;
+
*str = i < 10 ? '0' + i : 'A' + i - 10;
str[1] = '\0';
key = strdup(str);
diff --git a/include/bootflow.h b/include/bootflow.h
index 080ee850122..6affc5e1a4f 100644
--- a/include/bootflow.h
+++ b/include/bootflow.h
@@ -63,7 +63,8 @@ enum bootflow_flags_t {
*
* @bm_node: Points to siblings in the same bootdev
* @glob_node: Points to siblings in the global list (all bootdev)
- * @dev: Bootdev device which produced this bootflow
+ * @dev: Bootdev device which produced this bootflow, NULL for flows created by
+ * BOOTMETHF_GLOBAL bootmeths
* @blk: Block device which contains this bootflow, NULL if this is a network
* device or sandbox 'host' device
* @part: Partition number (0 for whole device)