From patchwork Wed Jan 9 15:18:05 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Pavel Hrdina X-Patchwork-Id: 210752 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id 3D9C72C0109 for ; Thu, 10 Jan 2013 03:33:46 +1100 (EST) Received: from localhost ([::1]:40012 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TsxR6-000848-D5 for incoming@patchwork.ozlabs.org; Wed, 09 Jan 2013 10:19:24 -0500 Received: from eggs.gnu.org ([208.118.235.92]:55649) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TsxQI-0006Si-4L 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 1TsxQD-0005Fp-1H for qemu-devel@nongnu.org; Wed, 09 Jan 2013 10:18:33 -0500 Received: from mx1.redhat.com ([209.132.183.28]:42149) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TsxQC-0005Fa-Pn for qemu-devel@nongnu.org; Wed, 09 Jan 2013 10:18:28 -0500 Received: from int-mx01.intmail.prod.int.phx2.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id r09FISgK030870 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Wed, 9 Jan 2013 10:18:28 -0500 Received: from localhost.localdomain.com (dhcp-27-154.brq.redhat.com [10.34.27.154]) by int-mx01.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id r09FI9cp021430; Wed, 9 Jan 2013 10:18:27 -0500 From: Pavel Hrdina To: qemu-devel@nongnu.org Date: Wed, 9 Jan 2013 16:18:05 +0100 Message-Id: <6d2cdd401528ee4ac1af2ec28712144336ca56e6.1357741229.git.phrdina@redhat.com> In-Reply-To: References: In-Reply-To: References: X-Scanned-By: MIMEDefang 2.67 on 10.5.11.11 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 209.132.183.28 Cc: Pavel Hrdina , phrdina@redhat.c0m, lcapitulino@redhat.com Subject: [Qemu-devel] [PATCH 11/13] savevm: update return value from qemu_savevm_state_complete X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Signed-off-by: Pavel Hrdina --- savevm.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/savevm.c b/savevm.c index f204748..f9858cc 100644 --- a/savevm.c +++ b/savevm.c @@ -1692,7 +1692,7 @@ int qemu_savevm_state_complete(QEMUFile *f, Error **errp) trace_savevm_section_end(se->section_id); if (ret < 0) { error_setg(errp, "Failed to complete vmstate save."); - return ret; + return -1; } } @@ -1724,9 +1724,10 @@ int qemu_savevm_state_complete(QEMUFile *f, Error **errp) ret = qemu_file_get_error(f); if (ret < 0) { error_setg_errno(errp, errno, "Failed to complete vmstate save."); + return -1; } - return ret; + return 0; } uint64_t qemu_savevm_state_pending(QEMUFile *f, uint64_t max_size)