From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:42655) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UPYjt-0007BD-IH for qemu-devel@nongnu.org; Tue, 09 Apr 2013 09:37:39 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UPYjf-00048U-LP for qemu-devel@nongnu.org; Tue, 09 Apr 2013 09:37:33 -0400 Received: from mx1.redhat.com ([209.132.183.28]:18180) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UPYjf-00048K-AJ for qemu-devel@nongnu.org; Tue, 09 Apr 2013 09:37:19 -0400 Received: from int-mx10.intmail.prod.int.phx2.redhat.com (int-mx10.intmail.prod.int.phx2.redhat.com [10.5.11.23]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id r39DbIgC008344 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Tue, 9 Apr 2013 09:37:18 -0400 From: Markus Armbruster References: <00094f70bb9dcc5e680e721f0758fdb590e45d81.1364565637.git.phrdina@redhat.com> <87ip3vddzp.fsf@blackfin.pond.sub.org> Date: Tue, 09 Apr 2013 15:37:16 +0200 In-Reply-To: <87ip3vddzp.fsf@blackfin.pond.sub.org> (Markus Armbruster's message of "Tue, 09 Apr 2013 15:34:34 +0200") Message-ID: <87li8rbzar.fsf@blackfin.pond.sub.org> MIME-Version: 1.0 Content-Type: text/plain Subject: Re: [Qemu-devel] [PATCH v4 03/11] savevm: add error parameter to qemu_savevm_state_begin() List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Pavel Hrdina Cc: qemu-devel@nongnu.org, lcapitulino@redhat.com Markus Armbruster writes: > Pavel Hrdina writes: > >> Signed-off-by: Pavel Hrdina >> Reviewed-by: Eric Blake >> --- >> include/sysemu/sysemu.h | 3 ++- >> migration.c | 2 +- >> savevm.c | 5 +++-- >> 3 files changed, 6 insertions(+), 4 deletions(-) >> >> diff --git a/include/sysemu/sysemu.h b/include/sysemu/sysemu.h >> index 6578782..2f35a05 100644 >> --- a/include/sysemu/sysemu.h >> +++ b/include/sysemu/sysemu.h >> @@ -74,7 +74,8 @@ void qemu_announce_self(void); >> >> bool qemu_savevm_state_blocked(Error **errp); >> void qemu_savevm_state_begin(QEMUFile *f, >> - const MigrationParams *params); >> + const MigrationParams *params, >> + Error **errp); >> int qemu_savevm_state_iterate(QEMUFile *f); >> void qemu_savevm_state_complete(QEMUFile *f); >> void qemu_savevm_state_cancel(void); >> diff --git a/migration.c b/migration.c >> index 7fb2147..d517dd6 100644 >> --- a/migration.c >> +++ b/migration.c >> @@ -505,7 +505,7 @@ static void *migration_thread(void *opaque) >> bool old_vm_running = false; >> >> DPRINTF("beginning savevm\n"); >> - qemu_savevm_state_begin(s->file, &s->params); >> + qemu_savevm_state_begin(s->file, &s->params, NULL); >> >> while (s->state == MIG_STATE_ACTIVE) { >> int64_t current_time; >> diff --git a/savevm.c b/savevm.c >> index dc1f4a4..56da096 100644 >> --- a/savevm.c >> +++ b/savevm.c >> @@ -1731,7 +1731,8 @@ bool qemu_savevm_state_blocked(Error **errp) >> } >> >> void qemu_savevm_state_begin(QEMUFile *f, >> - const MigrationParams *params) >> + const MigrationParams *params, >> + Error **errp) >> { >> SaveStateEntry *se; >> int ret; >> @@ -1921,7 +1922,7 @@ static int qemu_savevm_state(QEMUFile *f) >> } >> >> qemu_mutex_unlock_iothread(); >> - qemu_savevm_state_begin(f, ¶ms); >> + qemu_savevm_state_begin(f, ¶ms, NULL); >> qemu_mutex_lock_iothread(); >> >> while (qemu_file_get_error(f) == 0) { > > Unlike PATCH 01+02, this one only adds Error parameters, no actual > errors. Do they come later in the series? Unlikely, because qemu_savevm_state_begin() can't fail. Why add an Error parameter then?