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 <sjg@chromium.org>
This commit is contained in:
Simon Glass
2022-07-30 15:52:23 -06:00
committed by Tom Rini
parent 2662b54d70
commit eccb25cd59
3 changed files with 9 additions and 5 deletions

View File

@@ -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);