From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:55655) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TsxQI-0006UB-IX for qemu-devel@nongnu.org; Wed, 09 Jan 2013 10:18:35 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TsxQE-0005GQ-IK for qemu-devel@nongnu.org; Wed, 09 Jan 2013 10:18:34 -0500 Received: from mx1.redhat.com ([209.132.183.28]:18256) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TsxQE-0005GJ-BK for qemu-devel@nongnu.org; Wed, 09 Jan 2013 10:18:30 -0500 From: Pavel Hrdina Date: Wed, 9 Jan 2013 16:18:06 +0100 Message-Id: <65434081d79cb01d31c29e58ba90366d995fdf77.1357741229.git.phrdina@redhat.com> In-Reply-To: References: In-Reply-To: References: Subject: [Qemu-devel] [PATCH 12/13] savevm: update return value from qemu_savevm_state List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Pavel Hrdina , phrdina@redhat.c0m, lcapitulino@redhat.com Signed-off-by: Pavel Hrdina --- savevm.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/savevm.c b/savevm.c index f9858cc..a7254b2 100644 --- a/savevm.c +++ b/savevm.c @@ -1768,8 +1768,8 @@ static int qemu_savevm_state(QEMUFile *f, Error **errp) .shared = 0 }; - if (qemu_savevm_state_blocked(errp)) { - ret = -EINVAL; + ret = qemu_savevm_state_blocked(errp); + if (ret) { goto out; } @@ -1793,7 +1793,7 @@ out: } } - return ret; + return ret == 0 ? 0 : -1; } static int qemu_save_device_state(QEMUFile *f) @@ -2189,6 +2189,7 @@ void qmp_vm_snapshot_save(bool has_name, const char *name, Error **errp) error_setg(errp, "Failed to open '%s' file.", bdrv_get_device_name(bs)); goto the_end; } + ret = qemu_savevm_state(f, &local_err); vm_state_size = qemu_ftell(f); qemu_fclose(f); -- 1.8.1