]> git.proxmox.com Git - qemu.git/commitdiff
arch_init: Fix format string by using RAM_ADDR_FMT
authorStefan Weil <sw@weilnetz.de>
Thu, 27 Jun 2013 19:00:06 +0000 (21:00 +0200)
committerAnthony Liguori <aliguori@us.ibm.com>
Fri, 28 Jun 2013 19:01:23 +0000 (14:01 -0500)
length is a ram_addr_t, so RAM_ADDR_FMT must be used instead of %ld.
This fixes a recently introduced regression for w64 builds.

Using RAM_ADDR_FMT also changes decimal output to sedecimal.
This is good here because length and block->length should both
use the same base in the error message.

Signed-off-by: Stefan Weil <sw@weilnetz.de>
Message-id: 1372359606-2759-1-git-send-email-sw@weilnetz.de
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
arch_init.c

index ea9ddad697d19facd9e76a676ef994f97d1cdb57..4255db98f7f117092a5bcfc50b74635ae0e27a0c 100644 (file)
@@ -815,8 +815,9 @@ static int ram_load(QEMUFile *f, void *opaque, int version_id)
                     QTAILQ_FOREACH(block, &ram_list.blocks, next) {
                         if (!strncmp(id, block->idstr, sizeof(id))) {
                             if (block->length != length) {
-                                fprintf(stderr, "Length mismatch: %s: %ld "
-                                        "in != " RAM_ADDR_FMT "\n", id, length,
+                                fprintf(stderr,
+                                        "Length mismatch: %s: " RAM_ADDR_FMT
+                                        " in != " RAM_ADDR_FMT "\n", id, length,
                                         block->length);
                                 ret =  -EINVAL;
                                 goto done;