]> xenbits.xensource.com Git - qemu-xen.git/commitdiff
numa: use RAM_ADDR_FMT with ram_addr_t
authorMichael S. Tsirkin <mst@redhat.com>
Thu, 19 Jun 2014 10:08:35 +0000 (13:08 +0300)
committerMichael S. Tsirkin <mst@redhat.com>
Thu, 19 Jun 2014 15:44:22 +0000 (18:44 +0300)
commit 4407ab055be995e64633322a78e64dfa376dc534
    vl.c: extend -m option to support options for memory hotplug
prints ram_addr_t with u64 format, this is wrong for
some systems, in particular w32.

print ram_addr_t with RAM_ADDR_FMT to fix build on w32.

Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
vl.c

diff --git a/vl.c b/vl.c
index b27c2a6422de322d8cc1d979428fff7a09f93717..54b46271c21ac5c6503ddeeacd317796de81ec25 100644 (file)
--- a/vl.c
+++ b/vl.c
@@ -3302,16 +3302,16 @@ int main(int argc, char **argv, char **envp)
                     sz = qemu_opt_get_size(opts, "maxmem", 0);
                     if (sz < ram_size) {
                         fprintf(stderr, "qemu: invalid -m option value: maxmem "
-                                "(%" PRIu64 ") <= initial memory (%"
-                                PRIu64 ")\n", sz, ram_size);
+                                "(%" PRIu64 ") <= initial memory ("
+                                RAM_ADDR_FMT ")\n", sz, ram_size);
                         exit(EXIT_FAILURE);
                     }
 
                     slots = qemu_opt_get_number(opts, "slots", 0);
                     if ((sz > ram_size) && !slots) {
                         fprintf(stderr, "qemu: invalid -m option value: maxmem "
-                                "(%" PRIu64 ") more than initial memory (%"
-                                PRIu64 ") but no hotplug slots where "
+                                "(%" PRIu64 ") more than initial memory ("
+                                RAM_ADDR_FMT ") but no hotplug slots where "
                                 "specified\n", sz, ram_size);
                         exit(EXIT_FAILURE);
                     }
@@ -3319,8 +3319,8 @@ int main(int argc, char **argv, char **envp)
                     if ((sz <= ram_size) && slots) {
                         fprintf(stderr, "qemu: invalid -m option value:  %"
                                 PRIu64 " hotplug slots where specified but "
-                                "maxmem (%" PRIu64 ") <= initial memory (%"
-                                PRIu64 ")\n", slots, sz, ram_size);
+                                "maxmem (%" PRIu64 ") <= initial memory ("
+                                RAM_ADDR_FMT ")\n", slots, sz, ram_size);
                         exit(EXIT_FAILURE);
                     }
                     maxram_size = sz;