summaryrefslogtreecommitdiff
path: root/commands
diff options
context:
space:
mode:
authorAhmad Fatoum <a.fatoum@pengutronix.de>2022-08-17 13:42:44 +0200
committerSascha Hauer <s.hauer@pengutronix.de>2022-09-12 13:20:15 +0200
commit880c6b5e6f26c674821172bc4e982796e7dd5f0e (patch)
tree3ed14138fb0c487a3ba77fcb098208a50f73a001 /commands
parent350ba4453d582ca4a1b02dcdf55b21d300494076 (diff)
downloadbarebox-880c6b5e6f26c674821172bc4e982796e7dd5f0e.tar.gz
commands: iomem: point out [R]eserved regions
Now that we define IORESOURCE_BUSY as meaning that a region possibly contains secure firmware, it's useful to have this information in the iomem output as well, so add it. Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de> Link: https://lore.barebox.org/20220817114244.1810531-11-a.fatoum@pengutronix.de Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'commands')
-rw-r--r--commands/iomemport.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/commands/iomemport.c b/commands/iomemport.c
index d0cfc413c2..f2baa0e293 100644
--- a/commands/iomemport.c
+++ b/commands/iomemport.c
@@ -16,11 +16,14 @@ static void __print_resources(struct resource *res, int indent)
for (i = 0; i < indent; i++)
printf(" ");
- printf("%pa - %pa (size %pa) %s\n",
- &res->start, &res->end, &size, res->name);
+ printf("%pa - %pa (size %pa) %s%s\n",
+ &res->start, &res->end, &size,
+ res->flags & IORESOURCE_BUSY ? "[R] " : "",
+ res->name);
- list_for_each_entry(r, &res->children, sibling)
+ list_for_each_entry(r, &res->children, sibling) {
__print_resources(r, indent + 1);
+ }
}
static void print_resources(struct resource *res)