From c141282193880a722bbb26f694fdebf37d5dd2bb Mon Sep 17 00:00:00 2001 From: Stefan Reinauer Date: Sun, 20 May 2007 17:28:55 +0000 Subject: fix lbtdump after last checkin. (trivial) Signed-off-by: Stefan Reinauer Acked-by: Stefan Reinauer git-svn-id: svn://svn.coreboot.org/coreboot/trunk@2680 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1 --- util/lbtdump/lbtdump.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'util') 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); -- cgit v1.2.3