From 1f590cf9455c571799d1bfc0777255fa0796d4da Mon Sep 17 00:00:00 2001 From: Lei Li Date: Fri, 25 Jan 2013 00:03:20 +0800 Subject: QAPI: Introduce memchar-write QMP command Signed-off-by: Lei Li Signed-off-by: Luiz Capitulino --- qmp-commands.hx | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) (limited to 'qmp-commands.hx') diff --git a/qmp-commands.hx b/qmp-commands.hx index 3be5330bb8..96de0b8852 100644 --- a/qmp-commands.hx +++ b/qmp-commands.hx @@ -463,6 +463,39 @@ Example: Note: inject-nmi fails when the guest doesn't support injecting. Currently, only x86 guests do. +EQMP + + { + .name = "memchar-write", + .args_type = "device:s,size:i,data:s,format:s?", + .mhandler.cmd_new = qmp_marshal_input_memchar_write, + }, + +SQMP +memchar-write +------------- + +Provide writing interface for CirMemCharDriver. Write data to memory +char device. + +Arguments: + +- "device": the name of the char device, must be unique (json-string) +- "size": the memory size, in bytes, should be power of 2 (json-int) +- "data": the source data write to memory (json-string) +- "format": the data format write to memory, default is + utf8. (json-string, optional) + - Possible values: "utf8", "base64" + +Example: + +-> { "execute": "memchar-write", + "arguments": { "device": foo, + "size": 8, + "data": "abcdefgh", + "format": "utf8" } } +<- { "return": {} } + EQMP { -- cgit v1.2.1