diff options
| author | Kevin Wolf <kwolf@redhat.com> | 2019-06-13 17:33:53 +0200 |
|---|---|---|
| committer | Markus Armbruster <armbru@redhat.com> | 2019-06-17 20:36:56 +0200 |
| commit | b8e31d6ccc40de09392766fc8a77133196ba8468 (patch) | |
| tree | 4b8308888a317eb716efc94cb9b41e502f208601 /monitor/misc.c | |
| parent | b6c7c2e4a332a921f9172cf1857438ea6706ff41 (diff) | |
| download | focaccia-qemu-b8e31d6ccc40de09392766fc8a77133196ba8468.tar.gz focaccia-qemu-b8e31d6ccc40de09392766fc8a77133196ba8468.zip | |
monitor: Make MonitorQMP a child class of Monitor
Currently, struct Monitor mixes state that is only relevant for HMP, state that is only relevant for QMP, and some actually shared state. In particular, a MonitorQMP field is present in the state of any monitor, even if it's not a QMP monitor and therefore doesn't use the state. As a first step towards a clean separation between QMP and HMP, let MonitorQMP extend Monitor and create a MonitorQMP object only when the monitor is actually a QMP monitor. Some places accessed Monitor.qmp unconditionally, even for HMP monitors. They can't keep doing this now, so during the conversion, they are either changed to become conditional on monitor_is_qmp() or to assert() that they always get a QMP monitor. Signed-off-by: Kevin Wolf <kwolf@redhat.com> Reviewed-by: Dr. David Alan Gilbert <dgilbert@redhat.com> Message-Id: <20190613153405.24769-4-kwolf@redhat.com> Reviewed-by: Markus Armbruster <armbru@redhat.com> [Superfluous variable in monitor_data_destroy() eliminated] Signed-off-by: Markus Armbruster <armbru@redhat.com>
Diffstat (limited to 'monitor/misc.c')
0 files changed, 0 insertions, 0 deletions