From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:47796) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WsWiy-0008BV-Pj for qemu-devel@nongnu.org; Thu, 05 Jun 2014 08:25:02 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WsWip-0001Gn-DG for qemu-devel@nongnu.org; Thu, 05 Jun 2014 08:24:52 -0400 Received: from mail-pb0-x229.google.com ([2607:f8b0:400e:c01::229]:37993) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WsWip-0001GR-6e for qemu-devel@nongnu.org; Thu, 05 Jun 2014 08:24:43 -0400 Received: by mail-pb0-f41.google.com with SMTP id uo5so1045331pbc.14 for ; Thu, 05 Jun 2014 05:24:42 -0700 (PDT) From: Wenchao Xia Date: Thu, 5 Jun 2014 05:22:06 -0700 Message-Id: <1401970944-18735-12-git-send-email-wenchaoqemu@gmail.com> In-Reply-To: <1401970944-18735-1-git-send-email-wenchaoqemu@gmail.com> References: <1401970944-18735-1-git-send-email-wenchaoqemu@gmail.com> Subject: [Qemu-devel] [PATCH V6 11/29] qapi event: convert STOP List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: mdroth@linux.vnet.ibm.com, armbru@redhat.com, Wenchao Xia , lcapitulino@redhat.com Signed-off-by: Wenchao Xia --- cpus.c | 5 +++-- docs/qmp/qmp-events.txt | 12 ------------ qapi-event.json | 9 +++++++++ 3 files changed, 12 insertions(+), 14 deletions(-) diff --git a/cpus.c b/cpus.c index dd7ac13..28abb11 100644 --- a/cpus.c +++ b/cpus.c @@ -25,7 +25,7 @@ /* Needed early for CONFIG_BSD etc. */ #include "config-host.h" -#include "monitor/monitor.h" +#include "qapi/qmp/qerror.h" #include "sysemu/sysemu.h" #include "exec/gdbstub.h" #include "sysemu/dma.h" @@ -38,6 +38,7 @@ #include "qemu/main-loop.h" #include "qemu/bitmap.h" #include "qemu/seqlock.h" +#include "qapi-event.h" #ifndef _WIN32 #include "qemu/compatfd.h" @@ -530,7 +531,7 @@ static int do_vm_stop(RunState state) pause_all_vcpus(); runstate_set(state); vm_state_notify(0, state); - monitor_protocol_event(QEVENT_STOP, NULL); + qapi_event_send_stop(NULL); } bdrv_drain_all(); diff --git a/docs/qmp/qmp-events.txt b/docs/qmp/qmp-events.txt index 20e3151..c241a07 100644 --- a/docs/qmp/qmp-events.txt +++ b/docs/qmp/qmp-events.txt @@ -354,18 +354,6 @@ Example: "channel-id": 0, "tls": true} }} -STOP ----- - -Emitted when the Virtual Machine is stopped. - -Data: None. - -Example: - -{ "event": "STOP", - "timestamp": { "seconds": 1267041730, "microseconds": 281295 } } - SUSPEND ------- diff --git a/qapi-event.json b/qapi-event.json index 6f27555..af5a18c 100644 --- a/qapi-event.json +++ b/qapi-event.json @@ -29,3 +29,12 @@ # Since: 2.1 ## { 'event': 'RESET' } + +## +# @STOP +# +# Emitted when the virtual machine is stopped +# +# Since: 2.1 +## +{ 'event': 'STOP' } -- 1.7.1