From f1a1a35638bf045a2b158c0cb23d92ef39c06792 Mon Sep 17 00:00:00 2001 From: Gerd Hoffmann Date: Wed, 19 Dec 2012 10:33:56 +0100 Subject: chardev: add qmp hotplug commands, with null chardev support Add chardev-add and chardev-remove qmp commands. Hotplugging a null chardev is supported for now, more will be added later. Signed-off-by: Gerd Hoffmann --- qmp-commands.hx | 50 ++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 50 insertions(+) (limited to 'qmp-commands.hx') diff --git a/qmp-commands.hx b/qmp-commands.hx index 5c692d0cb5..c9ab37c9b9 100644 --- a/qmp-commands.hx +++ b/qmp-commands.hx @@ -2654,3 +2654,53 @@ EQMP .args_type = "", .mhandler.cmd_new = qmp_marshal_input_query_target, }, + + { + .name = "chardev-add", + .args_type = "id:s,backend:q", + .mhandler.cmd_new = qmp_marshal_input_chardev_add, + }, + +SQMP +chardev-add +---------------- + +Add a chardev. + +Arguments: + +- "id": the chardev's ID, must be unique (json-string) +- "backend": chardev backend type + parameters + +Example: + +-> { "execute" : "chardev-add", + "arguments" : { "id" : "foo", + "backend" : { "type" : "null", "data" : {} } } } +<- { "return": {} } + +EQMP + + { + .name = "chardev-remove", + .args_type = "id:s", + .mhandler.cmd_new = qmp_marshal_input_chardev_remove, + }, + + +SQMP +chardev-remove +-------------- + +Remove a chardev. + +Arguments: + +- "id": the chardev's ID, must exist and not be in use (json-string) + +Example: + +-> { "execute": "chardev-remove", "arguments": { "id" : "foo" } } +<- { "return": {} } + +EQMP -- cgit v1.2.1