From patchwork Thu Dec 6 12:08:20 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: [v2] arch_init/ram_load: add error message for block length mismatch Date: Thu, 06 Dec 2012 02:08:20 -0000 From: Alon Levy X-Patchwork-Id: 204213 Message-Id: <1354795700-3052-1-git-send-email-alevy@redhat.com> To: qemu-devel@nongnu.org, qemu-trivial@nongnu.org Signed-off-by: Alon Levy --- Please ignore previous version, accidentally removed goto done and used wrong format size specifiers. arch_init.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/arch_init.c b/arch_init.c index e6effe8..fba24f3 100644 --- a/arch_init.c +++ b/arch_init.c @@ -808,6 +808,9 @@ static int ram_load(QEMUFile *f, void *opaque, int version_id) QLIST_FOREACH(block, &ram_list.blocks, next) { if (!strncmp(id, block->idstr, sizeof(id))) { if (block->length != length) { + fprintf(stderr, "Length mismatch: %s: %ld " + "in != %ld\n", id, length, + block->length); ret = -EINVAL; goto done; }