hax: used proper format for printing special types
authorSeokYeon Hwang <syeon.hwang@samsung.com>
Sun, 30 Aug 2015 07:46:34 +0000 (16:46 +0900)
committerSeokYeon Hwang <syeon.hwang@samsung.com>
Sun, 30 Aug 2015 08:46:27 +0000 (17:46 +0900)
Change-Id: I38366f99fc6162ac41964b6186e463922d448e32
Signed-off-by: SeokYeon Hwang <syeon.hwang@samsung.com>
target-i386/hax-windows.c

index eee7684706c55e215223e8e1a3c0857e0aa7cd0e..5ff5916db50bbbd44da7c9b7e5ca292c4bef1968 100644 (file)
@@ -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;