From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:60416) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YJPEL-00056d-5Q for qemu-devel@nongnu.org; Thu, 05 Feb 2015 11:24:43 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YJPEK-0001Fy-EL for qemu-devel@nongnu.org; Thu, 05 Feb 2015 11:24:37 -0500 Received: from mx1.redhat.com ([209.132.183.28]:35175) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YJPEK-0001FF-42 for qemu-devel@nongnu.org; Thu, 05 Feb 2015 11:24:36 -0500 Received: from int-mx14.intmail.prod.int.phx2.redhat.com (int-mx14.intmail.prod.int.phx2.redhat.com [10.5.11.27]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id t15GOZU0025643 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL) for ; Thu, 5 Feb 2015 11:24:35 -0500 From: Juan Quintela Date: Thu, 5 Feb 2015 17:24:21 +0100 Message-Id: <1423153467-13804-5-git-send-email-quintela@redhat.com> In-Reply-To: <1423153467-13804-1-git-send-email-quintela@redhat.com> References: <1423153467-13804-1-git-send-email-quintela@redhat.com> Subject: [Qemu-devel] [PULL 04/10] 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 , "Dr. David Alan Gilbert" From: "Dr. David Alan Gilbert" Signed-off-by: Dr. David Alan Gilbert Signed-off-by: Amit Shah Signed-off-by: Juan Quintela --- 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