summaryrefslogtreecommitdiffstats
path: root/commands/bootm.c
diff options
context:
space:
mode:
authorSascha Hauer <s.hauer@pengutronix.de>2012-05-24 08:52:22 +0200
committerSascha Hauer <s.hauer@pengutronix.de>2012-07-01 08:18:53 +0200
commit5f03074ea98b64b55c133b35ee144fdc909e6d69 (patch)
tree1a61fd84a5a44d98297014486eca663221ff4cbc /commands/bootm.c
parent20addb80f65076b3a81c7d778f7b93d445a96841 (diff)
downloadbarebox-5f03074ea98b64b55c133b35ee144fdc909e6d69.tar.gz
barebox-5f03074ea98b64b55c133b35ee144fdc909e6d69.tar.xz
resource: store 'end' instead of 'size' in struct resource
Storing the size instead of the resource end in struct resource was a mistake. 'size' ranges from 0 to UINT[32|64]_MAX + 1 which obviously leads to problems. 'end' on the other hand will never exceed UINT[32|64]_MAX. Also this way we can express a iomem region covering the whole address space. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'commands/bootm.c')
-rw-r--r--commands/bootm.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/commands/bootm.c b/commands/bootm.c
index 2989d39311..3c47ab5d9e 100644
--- a/commands/bootm.c
+++ b/commands/bootm.c
@@ -383,8 +383,7 @@ static int do_bootm(int argc, char *argv[])
if (data.os_res)
printf("OS image is at 0x%08x-0x%08x\n",
data.os_res->start,
- data.os_res->start +
- data.os_res->size - 1);
+ data.os_res->end);
else
printf("OS image not yet relocated\n");
@@ -399,8 +398,7 @@ static int do_bootm(int argc, char *argv[])
if (data.initrd_res)
printf("initrd is at 0x%08x-0x%08x\n",
data.initrd_res->start,
- data.initrd_res->start +
- data.initrd_res->size - 1);
+ data.initrd_res->end);
else
printf("initrd image not yet relocated\n");
}