summaryrefslogtreecommitdiffstats
path: root/qapi
diff options
context:
space:
mode:
authorMax Reitz <mreitz@redhat.com>2015-11-06 16:27:06 +0100
committerKevin Wolf <kwolf@redhat.com>2015-11-11 16:22:47 +0100
commit24fb4133001e1f54a526f0927837f30c1507169a (patch)
treeef1ae268d491e4a2ac4c040e403e5d926b51cb67 /qapi
parentf1f57066573e832438cd87600310589fa9cee202 (diff)
downloadhqemu-24fb4133001e1f54a526f0927837f30c1507169a.zip
hqemu-24fb4133001e1f54a526f0927837f30c1507169a.tar.gz
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 'qapi')
-rw-r--r--qapi/block-core.json23
1 files changed, 23 insertions, 0 deletions
diff --git a/qapi/block-core.json b/qapi/block-core.json
index 5c4fc72..e9fa649 100644
--- a/qapi/block-core.json
+++ b/qapi/block-core.json
@@ -1959,6 +1959,29 @@
##
+# @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 (this command
+# combines blockdev-open-tray, blockdev-remove-medium, blockdev-insert-medium
+# and blockdev-close-tray).
+#
+# @device: block device name
+#
+# @filename: filename of the new image to be loaded
+#
+# @format: #optional, format to open the new image with (defaults to
+# the probed format)
+#
+# Since: 2.5
+##
+{ 'command': 'blockdev-change-medium',
+ 'data': { 'device': 'str',
+ 'filename': 'str',
+ '*format': 'str' } }
+
+
+##
# @BlockErrorAction
#
# An enumeration of action that has been taken when a DISK I/O occurs
OpenPOWER on IntegriCloud