diff options
author | Max Reitz <mreitz@redhat.com> | 2015-11-06 16:27:06 +0100 |
---|---|---|
committer | Kevin Wolf <kwolf@redhat.com> | 2015-11-11 16:22:47 +0100 |
commit | 24fb4133001e1f54a526f0927837f30c1507169a (patch) | |
tree | ef1ae268d491e4a2ac4c040e403e5d926b51cb67 /qmp-commands.hx | |
parent | f1f57066573e832438cd87600310589fa9cee202 (diff) | |
download | qemu-24fb4133001e1f54a526f0927837f30c1507169a.zip qemu-24fb4133001e1f54a526f0927837f30c1507169a.tar.gz qemu-24fb4133001e1f54a526f0927837f30c1507169a.tar.bz2 |
qmp: Introduce blockdev-change-medium
Introduce a new QMP command 'blockdev-change-medium' which is intended
to replace the 'change' command for block devices. The existing function
qmp_change_blockdev() is accordingly renamed to
qmp_blockdev_change_medium().
Signed-off-by: Max Reitz <mreitz@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Diffstat (limited to 'qmp-commands.hx')
-rw-r--r-- | qmp-commands.hx | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/qmp-commands.hx b/qmp-commands.hx index 203ce6a..f6d9c25 100644 --- a/qmp-commands.hx +++ b/qmp-commands.hx @@ -4182,6 +4182,37 @@ Example: EQMP { + .name = "blockdev-change-medium", + .args_type = "device:B,filename:F,format:s?", + .mhandler.cmd_new = qmp_marshal_blockdev_change_medium, + }, + +SQMP +blockdev-change-medium +---------------------- + +Changes the medium inserted into a block device by ejecting the current medium +and loading a new image file which is inserted as the new medium. + +Arguments: + +- "device": device name (json-string) +- "filename": filename of the new image (json-string) +- "format": format of the new image (json-string, optional) + +Examples: + +1. Change a removable medium + +-> { "execute": "blockdev-change-medium", + "arguments": { "device": "ide1-cd0", + "filename": "/srv/images/Fedora-12-x86_64-DVD.iso", + "format": "raw" } } +<- { "return": {} } + +EQMP + + { .name = "query-memdev", .args_type = "", .mhandler.cmd_new = qmp_marshal_query_memdev, |