]> git.proxmox.com Git - mirror_qemu.git/commit
monitor: Split monitor_init in HMP and QMP function
authorKevin Wolf <kwolf@redhat.com>
Thu, 13 Jun 2019 15:33:52 +0000 (17:33 +0200)
committerMarkus Armbruster <armbru@redhat.com>
Mon, 17 Jun 2019 18:36:56 +0000 (20:36 +0200)
commitb6c7c2e4a332a921f9172cf1857438ea6706ff41
treefc86a6c39e266d7f4a3e8c57e3eea6758a5568f4
parentbe7633c33ee67090489ed6132a37b1972cf55f8a
monitor: Split monitor_init in HMP and QMP function

Instead of mixing HMP and QMP monitors in the same function, separate
the monitor creation function for both.

While in theory, one could pass both MONITOR_USE_CONTROL and
MONITOR_USE_READLINE before this patch and both flags would do
something, readline support is tightly coupled with HMP: QMP never feeds
its input to readline, and the tab completion function treats the input
as an HMP command. Therefore, this configuration is useless.

After this patch, the QMP path asserts that MONITOR_USE_READLINE is not
set. The HMP path can be used with or without MONITOR_USE_READLINE, like
before.

Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Reviewed-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
Reviewed-by: Markus Armbruster <armbru@redhat.com>
Message-Id: <20190613153405.24769-3-kwolf@redhat.com>
[Zero initialization of Monitor moved from monitor_data_init() to
callers]
Signed-off-by: Markus Armbruster <armbru@redhat.com>
monitor.c