aboutsummaryrefslogtreecommitdiff
path: root/qapi
diff options
context:
space:
mode:
authorPeter Maydell <peter.maydell@linaro.org>2019-01-25 11:52:12 +0000
committerPeter Maydell <peter.maydell@linaro.org>2019-01-25 11:52:12 +0000
commit9dd0d8111fbb8015db75a38933aee1d45f9e64a3 (patch)
treea2062212ac4345164221f25d06945e26fd10de16 /qapi
parent87f6a866f12b8ca037b0a5cfc2dc9b8db9e67696 (diff)
parentbbc0586ced6e9ffdfd29d89fcc917b3d90ac3938 (diff)
Merge remote-tracking branch 'remotes/armbru/tags/pull-qapi-2019-01-24' into staging
QAPI patches for 2019-01-24 # gpg: Signature made Thu 24 Jan 2019 14:25:19 GMT # gpg: using RSA key 3870B400EB918653 # gpg: Good signature from "Markus Armbruster <armbru@redhat.com>" # gpg: aka "Markus Armbruster <armbru@pond.sub.org>" # Primary key fingerprint: 354B C8B3 D7EB 2A6B 6867 4E5F 3870 B400 EB91 8653 * remotes/armbru/tags/pull-qapi-2019-01-24: json: Fix % handling when not interpolating qmp: Add examples to qom list, get, and set commands qapi: Eliminate indirection through qmp_event_get_func_emit() qapi: Belatedly update docs for commit 9c2f56e9f9d Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'qapi')
-rw-r--r--qapi/misc.json36
-rw-r--r--qapi/qmp-event.c12
2 files changed, 36 insertions, 12 deletions
diff --git a/qapi/misc.json b/qapi/misc.json
index 24d20a880a..426274ecf8 100644
--- a/qapi/misc.json
+++ b/qapi/misc.json
@@ -1380,6 +1380,16 @@
# object.
#
# Since: 1.2
+#
+# Example:
+#
+# -> { "execute": "qom-list",
+# "arguments": { "path": "/chardevs" } }
+# <- { "return": [ { "name": "type", "type": "string" },
+# { "name": "parallel0", "type": "child<chardev-vc>" },
+# { "name": "serial0", "type": "child<chardev-vc>" },
+# { "name": "mon0", "type": "child<chardev-stdio>" } ] }
+#
##
{ 'command': 'qom-list',
'data': { 'path': 'str' },
@@ -1417,6 +1427,23 @@
# returned as #int.
#
# Since: 1.2
+#
+# Example:
+#
+# 1. Use absolute path
+#
+# -> { "execute": "qom-get",
+# "arguments": { "path": "/machine/unattached/device[0]",
+# "property": "hotplugged" } }
+# <- { "return": false }
+#
+# 2. Use partial path
+#
+# -> { "execute": "qom-get",
+# "arguments": { "path": "unattached/sysbus",
+# "property": "type" } }
+# <- { "return": "System" }
+#
##
{ 'command': 'qom-get',
'data': { 'path': 'str', 'property': 'str' },
@@ -1436,6 +1463,15 @@
# for a description of type mapping.
#
# Since: 1.2
+#
+# Example:
+#
+# -> { "execute": "qom-set",
+# "arguments": { "path": "/machine",
+# "property": "graphics",
+# "value": false } }
+# <- { "return": {} }
+#
##
{ 'command': 'qom-set',
'data': { 'path': 'str', 'property': 'str', 'value': 'any' },
diff --git a/qapi/qmp-event.c b/qapi/qmp-event.c
index 5b8854043e..81ddd5331f 100644
--- a/qapi/qmp-event.c
+++ b/qapi/qmp-event.c
@@ -19,18 +19,6 @@
#include "qapi/qmp/qdict.h"
#include "qapi/qmp/qjson.h"
-static QMPEventFuncEmit qmp_emit;
-
-void qmp_event_set_func_emit(QMPEventFuncEmit emit)
-{
- qmp_emit = emit;
-}
-
-QMPEventFuncEmit qmp_event_get_func_emit(void)
-{
- return qmp_emit;
-}
-
static void timestamp_put(QDict *qdict)
{
int err;