Commit 6bedfe94 authored by Stefan Weil's avatar Stefan Weil Committed by Anthony Liguori
Browse files

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: default avatarStefan Weil <>
Signed-off-by: default avatarAnthony Liguori <>
parent 8a9c98ae
......@@ -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,
"Length mismatch: %s: " RAM_ADDR_FMT
" in != " RAM_ADDR_FMT "\n", id, length,
ret = -EINVAL;
goto done;
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment