diff options
author | Stefan Weil <sw@weilnetz.de> | 2013-06-27 21:00:06 +0200 |
---|---|---|
committer | Anthony Liguori <aliguori@us.ibm.com> | 2013-06-28 14:01:23 -0500 |
commit | 6bedfe94c96c5ba35fcb2a52b438fefcc682669e (patch) | |
tree | 038e51acf26e46afd98410bc712b4c1fa72c2c71 /arch_init.c | |
parent | 8a9c98aedc1a3fb4dfbebeccc926e273df54f2ba (diff) | |
download | qemu-6bedfe94c96c5ba35fcb2a52b438fefcc682669e.zip qemu-6bedfe94c96c5ba35fcb2a52b438fefcc682669e.tar.gz qemu-6bedfe94c96c5ba35fcb2a52b438fefcc682669e.tar.bz2 |
arch_init: Fix format string by using RAM_ADDR_FMT
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>
Diffstat (limited to 'arch_init.c')
-rw-r--r-- | arch_init.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/arch_init.c b/arch_init.c index ea9ddad..4255db9 100644 --- a/arch_init.c +++ b/arch_init.c @@ -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; |