From 77d1c3c63fb18c3675d8c80262bbd172f646556a Mon Sep 17 00:00:00 2001 From: Martin Kletzander Date: Sat, 1 Feb 2014 12:52:42 +0100 Subject: qmp: expose list of supported character device backends Introduce 'query-chardev-backends' QMP command which lists all supported character device backends. Signed-off-by: Martin Kletzander Reviewed-by: Eric Blake Signed-off-by: Luiz Capitulino --- qmp-commands.hx | 41 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) (limited to 'qmp-commands.hx') diff --git a/qmp-commands.hx b/qmp-commands.hx index cce6b81da4..8a0e8320c6 100644 --- a/qmp-commands.hx +++ b/qmp-commands.hx @@ -1923,6 +1923,47 @@ EQMP .mhandler.cmd_new = qmp_marshal_input_query_chardev, }, +SQMP +query-chardev-backends +------------- + +List available character device backends. + +Each backend is represented by a json-object, the returned value is a json-array +of all backends. + +Each json-object contains: + +- "name": backend name (json-string) + +Example: + +-> { "execute": "query-chardev-backends" } +<- { + "return":[ + { + "name":"udp" + }, + { + "name":"tcp" + }, + { + "name":"unix" + }, + { + "name":"spiceport" + } + ] + } + +EQMP + + { + .name = "query-chardev-backends", + .args_type = "", + .mhandler.cmd_new = qmp_marshal_input_query_chardev_backends, + }, + SQMP query-block ----------- -- cgit v1.2.1