mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-04 08:13:54 -06:00
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 <kraxel@redhat.com>
This commit is contained in:
parent
e551498e72
commit
f1a1a35638
3 changed files with 152 additions and 0 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue