[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH 10/15] qapi: add QMP quit command
From: |
Anthony Liguori |
Subject: |
[Qemu-devel] [PATCH 10/15] qapi: add QMP quit command |
Date: |
Fri, 11 Mar 2011 17:05:40 -0600 |
This is needed by the test suite.
Signed-off-by: Anthony Liguori <address@hidden>
diff --git a/qmp-schema.json b/qmp-schema.json
index e72bc18..d19cf73 100644
--- a/qmp-schema.json
+++ b/qmp-schema.json
@@ -88,3 +88,15 @@
# Since: 0.14.0
##
{ 'command': 'query-version', 'returns': 'VersionInfo' }
+
+##
+# @quit:
+#
+# This command will cause the QEMU process to exit gracefully. While every
+# attempt is made to send the QMP response before terminating, this is not
+# guaranteed. When using this interface, a premature EOF would not be
+# unexpected.
+#
+# Since: 0.14.0
+##
+{ 'command': 'quit' }
diff --git a/qmp.c b/qmp.c
index 7b626f5..837ac95 100644
--- a/qmp.c
+++ b/qmp.c
@@ -12,6 +12,7 @@
#include "qemu-common.h"
#include "qmp-core.h"
#include "qmp.h"
+#include "sysemu.h"
VersionInfo *qmp_query_version(Error **err)
{
@@ -29,3 +30,8 @@ VersionInfo *qmp_query_version(Error **err)
return info;
}
+void qmp_quit(Error **err)
+{
+ no_shutdown = 0;
+ qemu_system_shutdown_request();
+}
--
1.7.0.4
- [Qemu-devel] [PATCH 05/15] qapi: add QAPI module type, (continued)
- [Qemu-devel] [PATCH 08/15] qapi: add new QMP server that uses CharDriverState (v2), Anthony Liguori, 2011/03/11
- [Qemu-devel] [PATCH 09/15] vl: add a new -qmp2 option to expose experimental QMP server, Anthony Liguori, 2011/03/11
- [Qemu-devel] [PATCH 10/15] qapi: add QMP quit command,
Anthony Liguori <=
- [Qemu-devel] [PATCH 07/15] qapi: add query-version QMP command, Anthony Liguori, 2011/03/11
- [Qemu-devel] [PATCH 11/15] qapi: add QMP qmp_capabilities command, Anthony Liguori, 2011/03/11
- [Qemu-devel] [PATCH 06/15] qapi: add code generators for QMP command marshaling, Anthony Liguori, 2011/03/11
- [Qemu-devel] [PATCH 02/15] qapi: add code generator for type marshallers, Anthony Liguori, 2011/03/11
- [Qemu-devel] [PATCH 14/15] qapi: add test-libqmp, Anthony Liguori, 2011/03/11