From 74545d49c7d1558473118fab0f74de3c5976ee9b Mon Sep 17 00:00:00 2001 From: Simon Glass Date: Wed, 29 Oct 2025 15:14:32 +0100 Subject: qfw: Add more fields and a heading to qfw list Update the command to show the size and selected file, since this is useful information at times. Add a heading so it is clear what each field refers to. Add a simple test as well. Signed-off-by: Simon Glass Signed-off-by: Heinrich Schuchardt --- cmd/qfw.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'cmd') diff --git a/cmd/qfw.c b/cmd/qfw.c index 1b108118658..09bd7d9849d 100644 --- a/cmd/qfw.c +++ b/cmd/qfw.c @@ -22,10 +22,14 @@ static int qemu_fwcfg_cmd_list_firmware(void) if (ret) return ret; + printf(" Addr Size Sel Name\n"); + printf("---------------- -------- --- ------------\n"); for (file = qfw_file_iter_init(qfw_dev, &iter); !qfw_file_iter_end(&iter); file = qfw_file_iter_next(&iter)) { - printf("%08lx %-56s\n", file->addr, file->cfg.name); + printf("%16lx %8x %3x %-48s\n", file->addr, + be32_to_cpu(file->cfg.size), + be16_to_cpu(file->cfg.select), file->cfg.name); } return 0; -- cgit v1.2.3