summaryrefslogtreecommitdiffstats
path: root/commands
diff options
context:
space:
mode:
authorSascha Hauer <s.hauer@pengutronix.de>2016-02-08 08:26:43 +0100
committerSascha Hauer <s.hauer@pengutronix.de>2016-02-08 08:26:43 +0100
commit1379a5ef1e5229d9ea71293c7bb6cb89e6d706a4 (patch)
tree175268eaf70e2fbf7fa5fb6550464b0d13d95404 /commands
parent79606b51ed58819bd71bc6ca7d1a41185f83c89c (diff)
parentb09ee0358cd41b833da9788acf26efdfb6abe40d (diff)
downloadbarebox-1379a5ef1e5229d9ea71293c7bb6cb89e6d706a4.tar.gz
barebox-1379a5ef1e5229d9ea71293c7bb6cb89e6d706a4.tar.xz
Merge branch 'for-next/misc'
Diffstat (limited to 'commands')
-rw-r--r--commands/devinfo.c8
-rw-r--r--commands/iomemport.c6
2 files changed, 8 insertions, 6 deletions
diff --git a/commands/devinfo.c b/commands/devinfo.c
index c78efcbed4..9d5e8b86eb 100644
--- a/commands/devinfo.c
+++ b/commands/devinfo.c
@@ -77,13 +77,15 @@ static int do_devinfo(int argc, char *argv[])
if (dev->num_resources)
printf("Resources:\n");
for (i = 0; i < dev->num_resources; i++) {
+ resource_size_t size;
res = &dev->resource[i];
+ size = resource_size(res);
printf(" num: %d\n", i);
if (res->name)
printf(" name: %s\n", res->name);
- printf(" start: " PRINTF_CONVERSION_RESOURCE "\n"
- " size: " PRINTF_CONVERSION_RESOURCE "\n",
- res->start, resource_size(res));
+ printf(" start: %pa\n"
+ " size: %pa\n",
+ &res->start, &size);
}
if (dev->driver)
diff --git a/commands/iomemport.c b/commands/iomemport.c
index 5294c13b81..6d97c5711b 100644
--- a/commands/iomemport.c
+++ b/commands/iomemport.c
@@ -22,14 +22,14 @@
static void __print_resources(struct resource *res, int indent)
{
struct resource *r;
+ resource_size_t size = resource_size(res);
int i;
for (i = 0; i < indent; i++)
printf(" ");
- printf(PRINTF_CONVERSION_RESOURCE " - " PRINTF_CONVERSION_RESOURCE
- " (size " PRINTF_CONVERSION_RESOURCE ") %s\n",
- res->start, res->end, resource_size(res), res->name);
+ printf("%pa - %pa (size %pa) %s\n",
+ &res->start, &res->end, &size, res->name);
list_for_each_entry(r, &res->children, sibling)
__print_resources(r, indent + 1);