diff options
author | Laszlo Ersek <lersek@redhat.com> | 2014-06-26 17:50:03 +0200 |
---|---|---|
committer | Luiz Capitulino <lcapitulino@redhat.com> | 2014-06-27 09:34:00 -0400 |
commit | 32a97ea1711f43388e178b7c43e02143a61e47ee (patch) | |
tree | b257cd91af8d7f95af7b736082c6d1be6f314b25 /qmp-commands.hx | |
parent | e2ae6159de2482ee5e22532301eb7f2795828d07 (diff) | |
download | qemu-32a97ea1711f43388e178b7c43e02143a61e47ee.zip qemu-32a97ea1711f43388e178b7c43e02143a61e47ee.tar.gz qemu-32a97ea1711f43388e178b7c43e02143a61e47ee.tar.bz2 |
char: report frontend open/closed state in 'query-chardev'
In addition to the on-line reporting added in the previous patch, allow
libvirt to query frontend state independently of events.
Libvirt's path to identify the guest agent channel it cares about differs
between the event added in the previous patch and the QMP response field
added here. The event identifies the frontend device, by "id". The
'query-chardev' QMP command identifies the backend device (again by "id").
The association is under libvirt's control.
RHBZ: https://bugzilla.redhat.com/show_bug.cgi?id=1080376
Reviewed-by: Amit Shah <amit.shah@redhat.com>
Signed-off-by: Laszlo Ersek <lersek@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
Diffstat (limited to 'qmp-commands.hx')
-rw-r--r-- | qmp-commands.hx | 19 |
1 files changed, 14 insertions, 5 deletions
diff --git a/qmp-commands.hx b/qmp-commands.hx index e4a1c80..35f5146 100644 --- a/qmp-commands.hx +++ b/qmp-commands.hx @@ -1921,19 +1921,28 @@ Each json-object contain the following: - "label": device's label (json-string) - "filename": device's file (json-string) +- "frontend-open": open/closed state of the frontend device attached to this + backend (json-bool) Example: -> { "execute": "query-chardev" } <- { - "return":[ + "return": [ + { + "label": "charchannel0", + "filename": "unix:/var/lib/libvirt/qemu/seabios.rhel6.agent,server", + "frontend-open": false + }, { - "label":"monitor", - "filename":"stdio" + "label": "charmonitor", + "filename": "unix:/var/lib/libvirt/qemu/seabios.rhel6.monitor,server", + "frontend-open": true }, { - "label":"serial0", - "filename":"vc" + "label": "charserial0", + "filename": "pty:/dev/pts/2", + "frontend-open": true } ] } |