From 49b6d7220bce42e6c06e0dbb61969a997868491f Mon Sep 17 00:00:00 2001 From: Lei Li Date: Fri, 25 Jan 2013 00:03:21 +0800 Subject: QAPI: Introduce memchar-read 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 96de0b8852..f0f7d2b395 100644 --- a/qmp-commands.hx +++ b/qmp-commands.hx @@ -496,6 +496,39 @@ Example: "format": "utf8" } } <- { "return": {} } +EQMP + + { + .name = "memchar-read", + .args_type = "device:s,size:i,format:s?", + .mhandler.cmd_new = qmp_marshal_input_memchar_read, + }, + +SQMP +memchar-read +------------- + +Provide read interface for CirMemCharDriver. Read from the char +device memory and return the data with size. + +Arguments: + +- "device": the name of the char device, must be unique (json-string) +- "size": the memory size wanted to read in bytes (refer to unencoded + size of the raw data), would adjust to the init size of the + memchar if the requested size is larger than it. (json-int) +- "format": the data format write to memchardev, default is + utf8. (json-string, optional) + - Possible values: "utf8", "base64" + +Example: + +-> { "execute": "memchar-read", + "arguments": { "device": foo, + "size": 1000, + "format": "utf8" } } +<- { "return": { "data": "data string...", "count": 1000 } } + EQMP { -- cgit v1.2.1