From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:57357) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QzBke-0007sJ-KN for qemu-devel@nongnu.org; Thu, 01 Sep 2011 14:12:33 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QzBkd-00085f-1V for qemu-devel@nongnu.org; Thu, 01 Sep 2011 14:12:32 -0400 Received: from mx1.redhat.com ([209.132.183.28]:13179) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QzBkc-00085R-Nz for qemu-devel@nongnu.org; Thu, 01 Sep 2011 14:12:30 -0400 From: Luiz Capitulino Date: Thu, 1 Sep 2011 15:12:14 -0300 Message-Id: <1314900738-30164-5-git-send-email-lcapitulino@redhat.com> In-Reply-To: <1314900738-30164-1-git-send-email-lcapitulino@redhat.com> References: <1314900738-30164-1-git-send-email-lcapitulino@redhat.com> Subject: [Qemu-devel] [PATCH 4/8] Drop the incoming_expected global variable List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: kwolf@redhat.com, amit.shah@redhat.com, aliguori@us.ibm.com, armbru@redhat.com, jan.kiszka@siemens.com Test against RSTATE_IN_MIGRATE instead. Please, note that the RSTATE_IN_MIGRATE state is only set when all the initial VM setup is done, while 'incoming_expected' was set right in the beginning when parsing command-line options. Shouldn't be a problem as far as I could check. Signed-off-by: Luiz Capitulino --- migration.c | 2 -- monitor.c | 2 +- vl.c | 2 -- 3 files changed, 1 insertions(+), 5 deletions(-) diff --git a/migration.c b/migration.c index f2499cf..a63e2a2 100644 --- a/migration.c +++ b/migration.c @@ -70,8 +70,6 @@ void process_incoming_migration(QEMUFile *f) qemu_announce_self(); DPRINTF("successfully loaded vm state\n"); - incoming_expected = false; - if (autostart) { vm_start(); } else { diff --git a/monitor.c b/monitor.c index 4fb10a0..4612c89 100644 --- a/monitor.c +++ b/monitor.c @@ -1309,7 +1309,7 @@ static int do_cont(Monitor *mon, const QDict *qdict, QObject **ret_data) { struct bdrv_iterate_context context = { mon, 0 }; - if (incoming_expected) { + if (runstate_check(RSTATE_IN_MIGRATE)) { qerror_report(QERR_MIGRATION_EXPECTED); return -1; } diff --git a/vl.c b/vl.c index 59f71fc..e9d57d0 100644 --- a/vl.c +++ b/vl.c @@ -185,7 +185,6 @@ int nb_nics; NICInfo nd_table[MAX_NICS]; int vm_running; int autostart; -int incoming_expected; /* Started with -incoming and waiting for incoming */ static int rtc_utc = 1; static int rtc_date_offset = -1; /* -1 means no change */ QEMUClock *rtc_clock; @@ -2911,7 +2910,6 @@ int main(int argc, char **argv, char **envp) break; case QEMU_OPTION_incoming: incoming = optarg; - incoming_expected = true; break; case QEMU_OPTION_nodefaults: default_serial = 0; -- 1.7.7.rc0.72.g4b5ea