diff options
author | Kevin Wolf | 2019-06-13 17:34:04 +0200 |
---|---|---|
committer | Markus Armbruster | 2019-06-18 08:14:17 +0200 |
commit | fbfc29e3bf145581e84c12ffc432ab56ce1dea0d (patch) | |
tree | 2922c5fadb07f55fb45b816bdd1806c4cfcaed46 /include/monitor | |
parent | monitor: Split Monitor.flags into separate bools (diff) | |
download | qemu-fbfc29e3bf145581e84c12ffc432ab56ce1dea0d.tar.gz qemu-fbfc29e3bf145581e84c12ffc432ab56ce1dea0d.tar.xz qemu-fbfc29e3bf145581e84c12ffc432ab56ce1dea0d.zip |
monitor: Replace monitor_init() with monitor_init_{hmp, qmp}()
Most callers know which monitor type they want to have. Instead of
calling monitor_init() with flags that can describe both types of
monitors, make monitor_init_{hmp,qmp}() public interfaces that take
specific bools instead of flags and call these functions directly.
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Message-Id: <20190613153405.24769-15-kwolf@redhat.com>
Reviewed-by: Markus Armbruster <armbru@redhat.com>
Signed-off-by: Markus Armbruster <armbru@redhat.com>
Diffstat (limited to 'include/monitor')
-rw-r--r-- | include/monitor/monitor.h | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/include/monitor/monitor.h b/include/monitor/monitor.h index 44ac43df34..a81eeff5f8 100644 --- a/include/monitor/monitor.h +++ b/include/monitor/monitor.h @@ -8,19 +8,14 @@ extern __thread Monitor *cur_mon; typedef struct MonitorHMP MonitorHMP; -/* flags for monitor_init */ -/* 0x01 unused */ -#define MONITOR_USE_READLINE 0x02 -#define MONITOR_USE_CONTROL 0x04 -#define MONITOR_USE_PRETTY 0x08 - #define QMP_REQ_QUEUE_LEN_MAX 8 bool monitor_cur_is_qmp(void); void monitor_init_globals(void); void monitor_init_globals_core(void); -void monitor_init(Chardev *chr, int flags); +void monitor_init_qmp(Chardev *chr, bool pretty); +void monitor_init_hmp(Chardev *chr, bool use_readline); void monitor_cleanup(void); int monitor_suspend(Monitor *mon); |