[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-changelog] [xen master] xen-mfndump: Use inttypes.h to format uint64_t types.



commit 593470233ff38385df9dcf5690cc58c7a4fb290d
Author:     Ian Campbell <ian.campbell@xxxxxxxxxx>
AuthorDate: Sat Sep 14 08:38:26 2013 +0100
Commit:     Ian Campbell <ian.campbell@xxxxxxxxxx>
CommitDate: Sat Sep 14 08:40:17 2013 +0100

    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 <ian.campbell@xxxxxxxxxx>
---
 tools/misc/xen-mfndump.c |    5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/tools/misc/xen-mfndump.c b/tools/misc/xen-mfndump.c
index 3e8302e..ce73e5b 100644
--- a/tools/misc/xen-mfndump.c
+++ b/tools/misc/xen-mfndump.c
@@ -3,6 +3,7 @@
 #include <xc_core.h>
 #include <errno.h>
 #include <unistd.h>
+#include <inttypes.h>
 
 #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
--
generated by git-patchbot for /home/xen/git/xen.git#master

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.