Skip to contentSkip to conversation

trace-events: Fix broken build caused by wrong format specifier

PATCH Applied Stefan Weil 3 participants 3 messages Mar 24, 2012 – Mar 26, 2012

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 trace-events: Fix broken build caused by wrong format specifier

mem is an uint64_t value, so %lx was wrong.

---
 trace-events |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
trace-events +1 -1
index 70f059d..db2cd39 100644
@@ -726,7 +726,7 @@ ppm_save(const char *filename, void *display_surface) "%s surface=%p"
 # hw/qxl.c
 disable qxl_interface_set_mm_time(int qid, uint32_t mm_time) "%d %d"
 disable qxl_io_write_vga(int qid, const char *mode, uint32_t addr, uint32_t val) "%d %s addr=%u val=%u"
-qxl_create_guest_primary(int qid, uint32_t width, uint32_t height, uint64_t mem, uint32_t format, uint32_t position) "%d %dx%d mem=%lx %d,%d"
+qxl_create_guest_primary(int qid, uint32_t width, uint32_t height, uint64_t mem, uint32_t format, uint32_t position) "%d %ux%u mem=%" PRIx64 " %u,%u"
 qxl_create_guest_primary_rest(int qid, int32_t stride, uint32_t type, uint32_t flags) "%d %d,%d,%d"
 qxl_destroy_primary(int qid) "%d"
 qxl_enter_vga_mode(int qid) "%d"
Signature · 1 line
1.7.0.4
#1 lore raw
Quoted 2 lines · Stefan Weil

mem is an uint64_t value, so %lx was wrong.

Thanks,

ACK

Quoted 21 lines
---
 trace-events |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
trace-events +1 -1
index 70f059d..db2cd39 100644
@@ -726,7 +726,7 @@ ppm_save(const char *filename, void *display_surface) "%s surface=%p"
 # hw/qxl.c
 disable qxl_interface_set_mm_time(int qid, uint32_t mm_time) "%d %d"
 disable qxl_io_write_vga(int qid, const char *mode, uint32_t addr, uint32_t val) "%d %s addr=%u val=%u"
-qxl_create_guest_primary(int qid, uint32_t width, uint32_t height, uint64_t mem, uint32_t format, uint32_t position) "%d %dx%d mem=%lx %d,%d"
+qxl_create_guest_primary(int qid, uint32_t width, uint32_t height, uint64_t mem, uint32_t format, uint32_t position) "%d %ux%u mem=%" PRIx64 " %u,%u"
 qxl_create_guest_primary_rest(int qid, int32_t stride, uint32_t type, uint32_t flags) "%d %d,%d,%d"
 qxl_destroy_primary(int qid) "%d"
 qxl_enter_vga_mode(int qid) "%d"
Signature · 1 line
1.7.0.4
#2 lore raw
In reply to Stefan Weil
Quoted 6 lines · Stefan Weil

mem is an uint64_t value, so %lx was wrong.

---
 trace-events |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

Normally build fixes are sent directly to qemu.git/master committers for quick merging. But this fix is only needed for 32-bit hosts that use stderr tracing or another backend that uses the format string.

Thanks, applied to the trivial patches tree:
https://github.com/stefanha/qemu/commits/trivial-patches

Stefan