aboutsummaryrefslogtreecommitdiff
path: root/qmp-commands.hx
diff options
context:
space:
mode:
authorMax Reitz <mreitz@redhat.com>2015-10-26 21:39:09 +0100
committerKevin Wolf <kwolf@redhat.com>2015-11-11 16:22:47 +0100
commitabaaf59d245b6984644497b6745f88912c715c39 (patch)
tree203c4b635ec5ab0d27fe44f6d0767df2d5bcdddc /qmp-commands.hx
parent7d8a9f71b9ec9fa295265392218efaf0771d96e0 (diff)
downloadqemu-abaaf59d245b6984644497b6745f88912c715c39.zip
qemu-abaaf59d245b6984644497b6745f88912c715c39.tar.gz
qemu-abaaf59d245b6984644497b6745f88912c715c39.tar.bz2
blockdev: Add blockdev-close-tray
Signed-off-by: Max Reitz <mreitz@redhat.com> Reviewed-by: Kevin Wolf <kwolf@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Diffstat (limited to 'qmp-commands.hx')
-rw-r--r--qmp-commands.hx35
1 files changed, 35 insertions, 0 deletions
diff --git a/qmp-commands.hx b/qmp-commands.hx
index d9ae25c..0e896c8 100644
--- a/qmp-commands.hx
+++ b/qmp-commands.hx
@@ -4003,6 +4003,41 @@ Example:
EQMP
{
+ .name = "blockdev-close-tray",
+ .args_type = "device:s",
+ .mhandler.cmd_new = qmp_marshal_blockdev_close_tray,
+ },
+
+SQMP
+blockdev-close-tray
+-------------------
+
+Closes a block device's tray. If there is a block driver state tree associated
+with the block device (which is currently ejected), that tree will be loaded as
+the medium.
+
+If the tray was already closed before, this will be a no-op.
+
+Arguments:
+
+- "device": block device name (json-string)
+
+Example:
+
+-> { "execute": "blockdev-close-tray",
+ "arguments": { "device": "ide1-cd0" } }
+
+<- { "timestamp": { "seconds": 1418751345,
+ "microseconds": 272147 },
+ "event": "DEVICE_TRAY_MOVED",
+ "data": { "device": "ide1-cd0",
+ "tray-open": false } }
+
+<- { "return": {} }
+
+EQMP
+
+ {
.name = "query-named-block-nodes",
.args_type = "",
.mhandler.cmd_new = qmp_marshal_query_named_block_nodes,