From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:58185) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YDsJT-0007KG-TM for qemu-devel@nongnu.org; Wed, 21 Jan 2015 05:15:08 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YDsJN-0007SG-4y for qemu-devel@nongnu.org; Wed, 21 Jan 2015 05:15:03 -0500 Received: from mx1.redhat.com ([209.132.183.28]:39677) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YDsJM-0007SC-To for qemu-devel@nongnu.org; Wed, 21 Jan 2015 05:14:57 -0500 Received: from int-mx09.intmail.prod.int.phx2.redhat.com (int-mx09.intmail.prod.int.phx2.redhat.com [10.5.11.22]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id t0LAEuoa026148 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL) for ; Wed, 21 Jan 2015 05:14:56 -0500 From: "Dr. David Alan Gilbert (git)" Date: Wed, 21 Jan 2015 10:14:49 +0000 Message-Id: <1421835289-15020-4-git-send-email-dgilbert@redhat.com> In-Reply-To: <1421835289-15020-1-git-send-email-dgilbert@redhat.com> References: <1421835289-15020-1-git-send-email-dgilbert@redhat.com> Subject: [Qemu-devel] [PATCH v2 3/3] Print errors in some of the early migration failure cases. List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: amit.shah@redhat.com, stefanha@redhat.com, quintela@redhat.com From: "Dr. David Alan Gilbert" Signed-off-by: Dr. David Alan Gilbert --- savevm.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/savevm.c b/savevm.c index 1cc0f02..98895fe 100644 --- a/savevm.c +++ b/savevm.c @@ -883,16 +883,20 @@ int qemu_loadvm_state(QEMUFile *f) QLIST_HEAD(, LoadStateEntry) loadvm_handlers = QLIST_HEAD_INITIALIZER(loadvm_handlers); LoadStateEntry *le, *new_le; + Error *local_err = NULL; uint8_t section_type; unsigned int v; int ret; - if (qemu_savevm_state_blocked(NULL)) { + if (qemu_savevm_state_blocked(&local_err)) { + error_report("%s", error_get_pretty(local_err)); + error_free(local_err); return -EINVAL; } v = qemu_get_be32(f); if (v != QEMU_VM_FILE_MAGIC) { + error_report("Not a migration stream"); return -EINVAL; } @@ -902,6 +906,7 @@ int qemu_loadvm_state(QEMUFile *f) return -ENOTSUP; } if (v != QEMU_VM_FILE_VERSION) { + error_report("Unsupported migration stream version"); return -ENOTSUP; } -- 2.1.0