]> xenbits.xensource.com Git - xen.git/commitdiff
libelf: fix printing of pointers
authorJan Beulich <JBeulich@suse.com>
Fri, 21 Jun 2013 10:21:40 +0000 (11:21 +0100)
committerIan Campbell <ian.campbell@citrix.com>
Wed, 26 Jun 2013 13:43:52 +0000 (14:43 +0100)
Printing them as decimal number, the more with 0x prefix, is confusing
and presumably relatively useless to most of us.

Signed-off-by: Jan Beulich <jbeulich@suse.com>
xen/include/xen/libelf.h

index 7c04ac3531424be548b683fb736478d2a5ca5f0f..2a6fa54b02a45792768dcd05aebe7537e1e744d5 100644 (file)
@@ -82,13 +82,13 @@ typedef uintptr_t elf_ptrval;
   /* Provides a type declaration for a HANDLE. */
 
 #ifdef __XEN__
-# define ELF_PRPTRVAL "lu"
+# define ELF_PRPTRVAL "lx"
   /*
-   * PRIuPTR is misdefined in xen/include/xen/inttypes.h, on 32-bit,
-   * to "u", when in fact uintptr_t is an unsigned long.
+   * PRIxPTR is misdefined in xen/include/xen/inttypes.h, on 32-bit,
+   * to "x", when in fact uintptr_t is an unsigned long.
    */
 #else
-# define ELF_PRPTRVAL PRIuPTR
+# define ELF_PRPTRVAL PRIxPTR
 #endif
   /* printf format a la PRId... for a PTRVAL */