mirror of
https://github.com/mii443/qemu.git
synced 2025-12-03 11:08:25 +00:00
monitor: new parameter "x-oob"
Add new parameter to optionally enable Out-Of-Band for a QMP server.
An example command line:
./qemu-system-x86_64 -chardev stdio,id=char0 \
-mon chardev=char0,mode=control,x-oob=on
By default, Out-Of-Band is off.
It is not allowed if either MUX or non-QMP is detected, since
Out-Of-Band is currently only for QMP, and non-MUX chardev backends.
Note that the client STILL has to request 'oob' during qmp_capabilities;
in part because the x-oob command line option may disappear in the
future if we decide the capabilities negotiation is sufficient.
Signed-off-by: Peter Xu <peterx@redhat.com>
Message-Id: <20180326063901.27425-4-peterx@redhat.com>
Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com>
[eblake: enhance commit message]
Tested-by: Christian Borntraeger <borntraeger@de.ibm.com>
Signed-off-by: Eric Blake <eblake@redhat.com>
This commit is contained in:
5
vl.c
5
vl.c
@@ -2404,6 +2404,11 @@ static int mon_init_func(void *opaque, QemuOpts *opts, Error **errp)
|
||||
if (qemu_opt_get_bool(opts, "pretty", 0))
|
||||
flags |= MONITOR_USE_PRETTY;
|
||||
|
||||
/* OOB is off by default */
|
||||
if (qemu_opt_get_bool(opts, "x-oob", 0)) {
|
||||
flags |= MONITOR_USE_OOB;
|
||||
}
|
||||
|
||||
chardev = qemu_opt_get(opts, "chardev");
|
||||
chr = qemu_chr_find(chardev);
|
||||
if (chr == NULL) {
|
||||
|
||||
Reference in New Issue
Block a user