diff options
author | Simon Glass <sjg@chromium.org> | 2022-07-30 15:52:23 -0600 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2022-08-12 08:17:11 -0400 |
commit | eccb25cd5922edebc15f135923aa2b4bbd26527d (patch) | |
tree | 4ffd44ff0c951a104d180a3239b06984efa3a486 /cmd/bootflow.c | |
parent | 2662b54d70fc04f070f0e4a9742d4b3197c9f3ea (diff) |
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>
Diffstat (limited to 'cmd/bootflow.c')
-rw-r--r-- | cmd/bootflow.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/cmd/bootflow.c b/cmd/bootflow.c index af4b9c3732..47899245ee 100644 --- a/cmd/bootflow.c +++ b/cmd/bootflow.c @@ -69,8 +69,8 @@ static void show_bootflow(int index, struct bootflow *bflow, bool errors) { printf("%3x %-11s %-6s %-9.9s %4x %-25.25s %s\n", index, bflow->method->name, bootflow_state_get_name(bflow->state), - dev_get_uclass_name(dev_get_parent(bflow->dev)), bflow->part, - bflow->name, bflow->fname); + bflow->dev ? dev_get_uclass_name(dev_get_parent(bflow->dev)) : + "(none)", bflow->part, bflow->name, bflow->fname); if (errors) report_bootflow_err(bflow, bflow->err); } |