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
This commit is contained in:
Stefan Reinauer 2007-05-20 17:28:55 +00:00 committed by Stefan Reinauer
parent 917bf6b99e
commit c141282193
1 changed files with 4 additions and 2 deletions

View File

@ -106,8 +106,10 @@ void nop_print(struct lb_record *rec, unsigned long addr)
return; 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) { if (value > 1024ULL*1024*1024*1024*1024*1024) {
value /= 1024ULL*1024*1024*1024*1024*1024; value /= 1024ULL*1024*1024*1024*1024*1024;
fprintf(stream, "%lldEB", value); fprintf(stream, "%lldEB", value);
@ -157,7 +159,7 @@ void print_memory(struct lb_record *ptr, unsigned long addr)
case 2: mem_type = "reserved"; break; case 2: mem_type = "reserved"; break;
} }
printf("0x%08llx - 0x%08llx %s (", 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); pretty_print_number(stdout, start);
printf(" - "); printf(" - ");
pretty_print_number(stdout, end); pretty_print_number(stdout, end);