aboutsummaryrefslogtreecommitdiff
path: root/qapi/control.json
diff options
context:
space:
mode:
authorKevin Wolf <kwolf@redhat.com>2020-02-24 15:30:04 +0100
committerKevin Wolf <kwolf@redhat.com>2020-03-06 17:21:28 +0100
commitf2098725aa3ebdb4095bc1951c1c0680adbdecc7 (patch)
tree97338604ed7722d36a0e5241391d039ba9132c30 /qapi/control.json
parent9a9f909951516cfec8473f778fb24d6cc9366573 (diff)
monitor: Create QAPIfied monitor_init()
This adds a new QAPI-based monitor_init() function. The existing monitor_init_opts() is rewritten to simply put its QemuOpts parameter into a visitor and pass the resulting QAPI object to monitor_init(). This will cause some change in those error messages for the monitor options in the system emulator that are now generated by the visitor rather than explicitly checked in monitor_init_opts(). Signed-off-by: Kevin Wolf <kwolf@redhat.com> Message-Id: <20200224143008.13362-17-kwolf@redhat.com> Acked-by: Stefan Hajnoczi <stefanha@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Diffstat (limited to 'qapi/control.json')
-rw-r--r--qapi/control.json36
1 files changed, 36 insertions, 0 deletions
diff --git a/qapi/control.json b/qapi/control.json
index 759c20e76f..3ee086aec7 100644
--- a/qapi/control.json
+++ b/qapi/control.json
@@ -216,3 +216,39 @@
# <- { "return": {} }
##
{ 'command': 'quit' }
+
+##
+# @MonitorMode:
+#
+# An enumeration of monitor modes.
+#
+# @readline: HMP monitor (human-oriented command line interface)
+#
+# @control: QMP monitor (JSON-based machine interface)
+#
+# Since: 5.0
+##
+{ 'enum': 'MonitorMode', 'data': [ 'readline', 'control' ] }
+
+##
+# @MonitorOptions:
+#
+# Options to be used for adding a new monitor.
+#
+# @id: Name of the monitor
+#
+# @mode: Selects the monitor mode (default: readline)
+#
+# @pretty: Enables pretty printing (QMP only)
+#
+# @chardev: Name of a character device to expose the monitor on
+#
+# Since: 5.0
+##
+{ 'struct': 'MonitorOptions',
+ 'data': {
+ '*id': 'str',
+ '*mode': 'MonitorMode',
+ '*pretty': 'bool',
+ 'chardev': 'str'
+ } }