summaryrefslogtreecommitdiffstats
path: root/include/monitor
diff options
context:
space:
mode:
authorKevin Wolf2020-02-24 15:30:04 +0100
committerKevin Wolf2020-03-06 17:21:28 +0100
commitf2098725aa3ebdb4095bc1951c1c0680adbdecc7 (patch)
tree97338604ed7722d36a0e5241391d039ba9132c30 /include/monitor
parentqapi: Create 'pragma' module (diff)
downloadqemu-f2098725aa3ebdb4095bc1951c1c0680adbdecc7.tar.gz
qemu-f2098725aa3ebdb4095bc1951c1c0680adbdecc7.tar.xz
qemu-f2098725aa3ebdb4095bc1951c1c0680adbdecc7.zip
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 'include/monitor')
-rw-r--r--include/monitor/monitor.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/include/monitor/monitor.h b/include/monitor/monitor.h
index b7bdd2bb2a..db1112552c 100644
--- a/include/monitor/monitor.h
+++ b/include/monitor/monitor.h
@@ -7,6 +7,7 @@
extern __thread Monitor *cur_mon;
typedef struct MonitorHMP MonitorHMP;
+typedef struct MonitorOptions MonitorOptions;
#define QMP_REQ_QUEUE_LEN_MAX 8
@@ -18,6 +19,7 @@ void monitor_init_globals(void);
void monitor_init_globals_core(void);
void monitor_init_qmp(Chardev *chr, bool pretty);
void monitor_init_hmp(Chardev *chr, bool use_readline);
+int monitor_init(MonitorOptions *opts, Error **errp);
int monitor_init_opts(QemuOpts *opts, Error **errp);
void monitor_cleanup(void);