chardev: add file chardev support to chardev-add (qmp)

Add support for file chardevs.  Output file is mandatory,
input file is optional.

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
This commit is contained in:
Gerd Hoffmann 2012-12-19 13:13:57 +01:00
parent f108890891
commit ffbdbe59ac
3 changed files with 83 additions and 2 deletions

View file

@ -2672,13 +2672,19 @@ Arguments:
- "id": the chardev's ID, must be unique (json-string)
- "backend": chardev backend type + parameters
Example:
Examples:
-> { "execute" : "chardev-add",
"arguments" : { "id" : "foo",
"backend" : { "type" : "null", "data" : {} } } }
<- { "return": {} }
-> { "execute" : "chardev-add",
"arguments" : { "id" : "bar",
"backend" : { "type" : "file",
"data" : { "out" : "/tmp/bar.log" } } } }
<- { "return": {} }
EQMP
{