aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWenchao Xia <wenchaoqemu@gmail.com>2014-06-18 08:43:36 +0200
committerLuiz Capitulino <lcapitulino@redhat.com>2014-06-23 11:01:25 -0400
commita4e15de9a2ab65b4ab276cded6f5c3758691bd74 (patch)
tree97c993ecc407d49a0d861cd2bd78fefe6989a153
parenta6330785f025d038b8a6facfb769817f6bf27df6 (diff)
downloadqemu-a4e15de9a2ab65b4ab276cded6f5c3758691bd74.zip
qemu-a4e15de9a2ab65b4ab276cded6f5c3758691bd74.tar.gz
qemu-a4e15de9a2ab65b4ab276cded6f5c3758691bd74.tar.bz2
qapi event: convert STOP
Signed-off-by: Wenchao Xia <wenchaoqemu@gmail.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com> Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
-rw-r--r--cpus.c4
-rw-r--r--docs/qmp/qmp-events.txt12
-rw-r--r--qapi-event.json9
3 files changed, 12 insertions, 13 deletions
diff --git a/cpus.c b/cpus.c
index 06da4e7..5e7f2cf 100644
--- a/cpus.c
+++ b/cpus.c
@@ -26,6 +26,7 @@
#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 +39,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 +532,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(&error_abort);
}
bdrv_drain_all();
diff --git a/docs/qmp/qmp-events.txt b/docs/qmp/qmp-events.txt
index c50b18f..cb32530 100644
--- a/docs/qmp/qmp-events.txt
+++ b/docs/qmp/qmp-events.txt
@@ -364,18 +364,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 f38669d..bac7fdc 100644
--- a/qapi-event.json
+++ b/qapi-event.json
@@ -29,3 +29,12 @@
# Since: 0.12.0
##
{ 'event': 'RESET' }
+
+##
+# @STOP
+#
+# Emitted when the virtual machine is stopped
+#
+# Since: 0.12.0
+##
+{ 'event': 'STOP' }