From patchwork Mon May 24 08:25:28 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Juan Quintela X-Patchwork-Id: 53405 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [199.232.76.165]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id 4D6FCB6F11 for ; Mon, 24 May 2010 18:36:35 +1000 (EST) Received: from localhost ([127.0.0.1]:46146 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OGT9D-0000GJ-Sx for incoming@patchwork.ozlabs.org; Mon, 24 May 2010 04:36:31 -0400 Received: from [140.186.70.92] (port=57738 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OGSyj-0003Yl-Cz for qemu-devel@nongnu.org; Mon, 24 May 2010 04:25:42 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OGSyh-0004T6-So for qemu-devel@nongnu.org; Mon, 24 May 2010 04:25:41 -0400 Received: from mx1.redhat.com ([209.132.183.28]:61040) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OGSyh-0004St-Lf for qemu-devel@nongnu.org; Mon, 24 May 2010 04:25:39 -0400 Received: from int-mx04.intmail.prod.int.phx2.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.17]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id o4O8PcgH016709 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Mon, 24 May 2010 04:25:39 -0400 Received: from localhost.localdomain (ovpn01.gateway.prod.ext.phx2.redhat.com [10.5.9.1]) by int-mx04.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id o4O8PTZ4015804; Mon, 24 May 2010 04:25:37 -0400 From: Juan Quintela To: qemu-devel@nongnu.org Date: Mon, 24 May 2010 10:25:28 +0200 Message-Id: <0071c97b7fb904d2096d8699d659d53a4d0a58cd.1274688090.git.quintela@redhat.com> In-Reply-To: References: In-Reply-To: References: X-Scanned-By: MIMEDefang 2.67 on 10.5.11.17 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. Subject: [Qemu-devel] [PATCH 4/5] QMP: Emit migration events on incoming migration X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Signed-off-by: Juan Quintela --- migration.c | 3 +++ 1 files changed, 3 insertions(+), 0 deletions(-) diff --git a/migration.c b/migration.c index 6ab5d90..7fba993 100644 --- a/migration.c +++ b/migration.c @@ -56,10 +56,13 @@ int qemu_start_incoming_migration(const char *uri) void process_incoming_migration(QEMUFile *f) { + monitor_protocol_event(QEVENT_MIGRATION_STARTED, NULL); if (qemu_loadvm_state(f) < 0) { + monitor_protocol_event(QEVENT_MIGRATION_FAILED, NULL); fprintf(stderr, "load of migration failed\n"); exit(0); } + monitor_protocol_event(QEVENT_MIGRATION_ENDED, NULL); qemu_announce_self(); DPRINTF("successfully loaded vm state\n");