diff options
author | Lei Li <lilei@linux.vnet.ibm.com> | 2013-01-25 00:03:21 +0800 |
---|---|---|
committer | Luiz Capitulino <lcapitulino@redhat.com> | 2013-01-25 11:46:50 -0200 |
commit | 49b6d7220bce42e6c06e0dbb61969a997868491f (patch) | |
tree | 4c70d8cd393f2cd86e53fcaa671a78f659d6c6c5 /qmp-commands.hx | |
parent | 1f590cf9455c571799d1bfc0777255fa0796d4da (diff) |
QAPI: Introduce memchar-read QMP command
Signed-off-by: Lei Li <lilei@linux.vnet.ibm.com>
Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
Diffstat (limited to 'qmp-commands.hx')
-rw-r--r-- | qmp-commands.hx | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/qmp-commands.hx b/qmp-commands.hx index 96de0b8852..f0f7d2b395 100644 --- a/qmp-commands.hx +++ b/qmp-commands.hx @@ -499,6 +499,39 @@ Example: 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 + + { .name = "xen-save-devices-state", .args_type = "filename:F", .mhandler.cmd_new = qmp_marshal_input_xen_save_devices_state, |