summaryrefslogtreecommitdiffstats
path: root/qapi
diff options
context:
space:
mode:
authorKevin Wolf2016-09-20 13:38:43 +0200
committerKevin Wolf2016-09-23 13:36:10 +0200
commitb33945cfffcc3f847122dbf5db00fff28161c593 (patch)
treef9504d35b88ebaa74884d5d3827cacad8511414c /qapi
parentqdev-monitor: Add blk_by_qdev_id() (diff)
downloadqemu-b33945cfffcc3f847122dbf5db00fff28161c593.tar.gz
qemu-b33945cfffcc3f847122dbf5db00fff28161c593.tar.xz
qemu-b33945cfffcc3f847122dbf5db00fff28161c593.zip
block: Accept device model name for blockdev-open/close-tray
In order to remove the need for BlockBackend names in the external API, we want to allow qdev device names in all device related commands. This converts blockdev-open/close-tray to accept a qdev device name. Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Diffstat (limited to 'qapi')
-rw-r--r--qapi/block-core.json14
1 files changed, 10 insertions, 4 deletions
diff --git a/qapi/block-core.json b/qapi/block-core.json
index eb0a7d5aab..cd7b38aa53 100644
--- a/qapi/block-core.json
+++ b/qapi/block-core.json
@@ -2363,7 +2363,9 @@
# to it
# - if the guest device does not have an actual tray
#
-# @device: block device name
+# @device: #optional Block device name (deprecated, use @id instead)
+#
+# @id: #optional The name or QOM path of the guest device (since: 2.8)
#
# @force: #optional if false (the default), an eject request will be sent to
# the guest if it has locked the tray (and the tray will not be opened
@@ -2373,7 +2375,8 @@
# Since: 2.5
##
{ 'command': 'blockdev-open-tray',
- 'data': { 'device': 'str',
+ 'data': { '*device': 'str',
+ '*id': 'str',
'*force': 'bool' } }
##
@@ -2385,12 +2388,15 @@
#
# If the tray was already closed before, this will be a no-op.
#
-# @device: block device name
+# @device: #optional Block device name (deprecated, use @id instead)
+#
+# @id: #optional The name or QOM path of the guest device (since: 2.8)
#
# Since: 2.5
##
{ 'command': 'blockdev-close-tray',
- 'data': { 'device': 'str' } }
+ 'data': { '*device': 'str',
+ '*id': 'str' } }
##
# @x-blockdev-remove-medium: