summaryrefslogtreecommitdiff
path: root/util/lbtdump/lbtdump.c
diff options
context:
space:
mode:
authorStefan Reinauer <stepan@coresystems.de>2007-05-20 17:28:55 +0000
committerStefan Reinauer <stepan@openbios.org>2007-05-20 17:28:55 +0000
commitc141282193880a722bbb26f694fdebf37d5dd2bb (patch)
tree4a8d6552612dfc68e381949720c2a91b5e24794d /util/lbtdump/lbtdump.c
parent917bf6b99e04320949c99289d456d9f9a79b4dee (diff)
fix lbtdump after last checkin. (trivial)
Signed-off-by: Stefan Reinauer <stepan@coresystems.de> Acked-by: Stefan Reinauer <stepan@coresystems.de> git-svn-id: svn://svn.coreboot.org/coreboot/trunk@2680 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1
Diffstat (limited to 'util/lbtdump/lbtdump.c')
-rw-r--r--util/lbtdump/lbtdump.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/util/lbtdump/lbtdump.c b/util/lbtdump/lbtdump.c
index d94eb6e165..9a115f15a5 100644
--- a/util/lbtdump/lbtdump.c
+++ b/util/lbtdump/lbtdump.c
@@ -106,8 +106,10 @@ void nop_print(struct lb_record *rec, unsigned long addr)
return;
}
-void pretty_print_number(FILE *stream, uint64_t value)
+void pretty_print_number(FILE *stream, uint64_t num)
{
+ unsigned long long value = (unsigned long long) num;
+
if (value > 1024ULL*1024*1024*1024*1024*1024) {
value /= 1024ULL*1024*1024*1024*1024*1024;
fprintf(stream, "%lldEB", value);
@@ -157,7 +159,7 @@ void print_memory(struct lb_record *ptr, unsigned long addr)
case 2: mem_type = "reserved"; break;
}
printf("0x%08llx - 0x%08llx %s (",
- start, end, mem_type);
+ (unsigned long long)start, (unsigned long long)end, mem_type);
pretty_print_number(stdout, start);
printf(" - ");
pretty_print_number(stdout, end);