From 593470233ff38385df9dcf5690cc58c7a4fb290d Mon Sep 17 00:00:00 2001 From: Ian Campbell Date: Sat, 14 Sep 2013 08:38:26 +0100 Subject: xen-mfndump: Use inttypes.h to format uint64_t types. Fixes 32-bit build: cc1: warnings being treated as errors xen-mfndump.c: In function 'dump_ptes_func': xen-mfndump.c:236: error: format '%lx' expects type 'long unsigned int', but argument 3 has type 'uint64_t' xen-mfndump.c: In function 'lookup_pte_func': xen-mfndump.c:305: error: format '%lx' expects type 'long unsigned int', but argument 5 has type 'uint64_t' Signed-off-by: Ian Campbell --- tools/misc/xen-mfndump.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'tools/misc') diff --git a/tools/misc/xen-mfndump.c b/tools/misc/xen-mfndump.c index 3e8302eb05..ce73e5bf8b 100644 --- a/tools/misc/xen-mfndump.c +++ b/tools/misc/xen-mfndump.c @@ -3,6 +3,7 @@ #include #include #include +#include #include "xg_save_restore.h" @@ -233,7 +234,7 @@ int dump_ptes_func(int argc, char *argv[]) printf("\n"); for ( i = 0; i < pte_num; i++ ) - printf(" pte[%lu]: 0x%lx\n", i, ((const uint64_t*)page)[i]); + printf(" pte[%lu]: 0x%"PRIx64"\n", i, ((const uint64_t*)page)[i]); printf(" --- End of PTEs for domain %d, pfn=0x%lx (mfn=0x%lx) ---\n", domid, pfn, minfo.p2m_table[pfn]); @@ -301,7 +302,7 @@ int lookup_pte_func(int argc, char *argv[]) #define __MADDR_BITS_X86 ((minfo.guest_width == 8) ? 52 : 44) #define __MFN_MASK_X86 ((1ULL << (__MADDR_BITS_X86 - PAGE_SHIFT_X86)) - 1) if ( ((pte >> PAGE_SHIFT_X86) & __MFN_MASK_X86) == mfn) - printf(" 0x%lx <-- [0x%lx][%lu]: 0x%lx\n", + printf(" 0x%lx <-- [0x%lx][%lu]: 0x%"PRIx64"\n", mfn, minfo.p2m_table[i], j, pte); #undef __MADDR_BITS_X86 #undef __MFN_MASK_X8 -- cgit v1.2.3