From eccb25cd5922edebc15f135923aa2b4bbd26527d Mon Sep 17 00:00:00 2001 From: Simon Glass Date: Sat, 30 Jul 2022 15:52:23 -0600 Subject: bootstd: Allow the bootdev to be optional in bootflows With global bootmeths we want to scan without a bootdev. Update the logic to allow this. Change the bootflow command to show the bootdev only when valid. Signed-off-by: Simon Glass --- boot/bootflow.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'boot/bootflow.c') diff --git a/boot/bootflow.c b/boot/bootflow.c index 24ba3c34660..37bccb823a1 100644 --- a/boot/bootflow.c +++ b/boot/bootflow.c @@ -307,7 +307,8 @@ void bootflow_free(struct bootflow *bflow) void bootflow_remove(struct bootflow *bflow) { - list_del(&bflow->bm_node); + if (bflow->dev) + list_del(&bflow->bm_node); list_del(&bflow->glob_node); bootflow_free(bflow); -- cgit v1.2.3