[PATCH 32/34] bootstd: Avoid showing an invalid buffer address
Simon Glass
sjg at chromium.org
Fri Oct 18 01:24:11 CEST 2024
When the buffer address is not set, say so, rather than showing an
address which looks very strange, on sandbox.
Signed-off-by: Simon Glass <sjg at chromium.org>
---
cmd/bootflow.c | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/cmd/bootflow.c b/cmd/bootflow.c
index 3e9769e0d42..1c1146ce11e 100644
--- a/cmd/bootflow.c
+++ b/cmd/bootflow.c
@@ -393,7 +393,11 @@ static int do_bootflow_info(struct cmd_tbl *cmdtp, int flag, int argc,
printf("Partition: %d\n", bflow->part);
printf("Subdir: %s\n", bflow->subdir ? bflow->subdir : "(none)");
printf("Filename: %s\n", bflow->fname);
- printf("Buffer: %lx\n", (ulong)map_to_sysmem(bflow->buf));
+ printf("Buffer: ");
+ if (bflow->buf)
+ printf("%lx\n", (ulong)map_to_sysmem(bflow->buf));
+ else
+ printf("(not loaded)\n");
printf("Size: %x (%d bytes)\n", bflow->size, bflow->size);
printf("OS: %s\n", bflow->os_name ? bflow->os_name : "(none)");
printf("Cmdline: ");
--
2.34.1
More information about the U-Boot
mailing list