Author: stepan Date: 2007-05-20 19:28:55 +0200 (Sun, 20 May 2007) New Revision: 2680
Modified: trunk/LinuxBIOSv2/util/lbtdump/lbtdump.c Log: fix lbtdump after last checkin. (trivial)
Signed-off-by: Stefan Reinauer stepan@coresystems.de Acked-by: Stefan Reinauer stepan@coresystems.de
Modified: trunk/LinuxBIOSv2/util/lbtdump/lbtdump.c =================================================================== --- trunk/LinuxBIOSv2/util/lbtdump/lbtdump.c 2007-05-20 17:10:17 UTC (rev 2679) +++ trunk/LinuxBIOSv2/util/lbtdump/lbtdump.c 2007-05-20 17:28:55 UTC (rev 2680) @@ -106,8 +106,10 @@ 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 @@ 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);