From 62a12f8b40626ba7db3144df0d3db2297dfd3270 Mon Sep 17 00:00:00 2001 From: SeokYeon Hwang Date: Sun, 30 Aug 2015 16:46:34 +0900 Subject: [PATCH] hax: used proper format for printing special types Change-Id: I38366f99fc6162ac41964b6186e463922d448e32 Signed-off-by: SeokYeon Hwang --- target-i386/hax-windows.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/target-i386/hax-windows.c b/target-i386/hax-windows.c index eee7684..5ff5916 100644 --- a/target-i386/hax-windows.c +++ b/target-i386/hax-windows.c @@ -40,7 +40,7 @@ static int hax_open_device(hax_fd *fd) return -2; } *fd = hDevice; - dprint("device fd:%d\n", *fd); + dprint("device fd:%p\n", *fd); return 0; } @@ -114,7 +114,7 @@ int hax_set_phys_mem(MemoryRegionSection *section) if ( (start_addr & ~TARGET_PAGE_MASK) || (size & ~TARGET_PAGE_MASK)) { dprint( - "set_phys_mem %x %lx requires page aligned addr and size\n", + "set_phys_mem %" PRIx64 " %" PRIxPTR " requires page aligned addr and size\n", start_addr, size); return -1; } @@ -163,7 +163,7 @@ int hax_capability(struct hax_state *hax, struct hax_capabilityinfo *cap) if (err == ERROR_INSUFFICIENT_BUFFER || err == ERROR_MORE_DATA) dprint("hax capability is too long to hold.\n"); - dprint("Failed to get Hax capability:%d\n", err); + dprint("Failed to get Hax capability:%lu\n", err); return -EFAULT; } else return 0; @@ -193,7 +193,7 @@ int hax_mod_version(struct hax_state *hax, struct hax_module_version *version) if (err == ERROR_INSUFFICIENT_BUFFER || err == ERROR_MORE_DATA) dprint("hax module verion is too long to hold.\n"); - dprint("Failed to get Hax module version:%d\n", err); + dprint("Failed to get Hax module version:%lu\n", err); return -EFAULT; } else return 0; @@ -253,7 +253,7 @@ int hax_host_create_vm(struct hax_state *hax, int *vmid) &dSize, (LPOVERLAPPED) NULL); if (!ret) { - dprint("error code:%d", GetLastError()); + dprint("error code:%lu", GetLastError()); return -1; } *vmid = vm_id; @@ -279,7 +279,7 @@ hax_fd hax_host_open_vm(struct hax_state *hax, int vm_id) FILE_ATTRIBUTE_NORMAL, NULL); if (hDeviceVM == INVALID_HANDLE_VALUE) - dprint("Open the vm devcie error:%s, ec:%d\n", vm_name, GetLastError()); + dprint("Open the vm devcie error:%s, ec:%lu\n", vm_name, GetLastError()); g_free(vm_name); return hDeviceVM; -- 2.7.4