diff options
author | Max Reitz <mreitz@redhat.com> | 2015-10-26 21:39:08 +0100 |
---|---|---|
committer | Kevin Wolf <kwolf@redhat.com> | 2015-11-11 16:22:47 +0100 |
commit | 7d8a9f71b9ec9fa295265392218efaf0771d96e0 (patch) | |
tree | afe0f85afbb521e8adfb7c523ad2da5a5e2d8438 /qapi | |
parent | 38cb18f5b71428fb8a3e3759ac8fa21ac70cb1b5 (diff) |
blockdev: Add blockdev-open-tray
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.json | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/qapi/block-core.json b/qapi/block-core.json index 425fdab706..b65ab81218 100644 --- a/qapi/block-core.json +++ b/qapi/block-core.json @@ -1876,6 +1876,38 @@ ## { 'command': 'blockdev-add', 'data': { 'options': 'BlockdevOptions' } } +## +# @blockdev-open-tray: +# +# Opens a block device's tray. If there is a block driver state tree inserted as +# a medium, it will become inaccessible to the guest (but it will remain +# associated to the block device, so closing the tray will make it accessible +# again). +# +# If the tray was already open before, this will be a no-op. +# +# Once the tray opens, a DEVICE_TRAY_MOVED event is emitted. There are cases in +# which no such event will be generated, these include: +# - if the guest has locked the tray, @force is false and the guest does not +# respond to the eject request +# - if the BlockBackend denoted by @device does not have a guest device attached +# to it +# - if the guest device does not have an actual tray and is empty, for instance +# for floppy disk drives +# +# @device: block device name +# +# @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 +# immediately); if true, the tray will be opened regardless of whether +# it is locked +# +# Since: 2.5 +## +{ 'command': 'blockdev-open-tray', + 'data': { 'device': 'str', + '*force': 'bool' } } + ## # @BlockErrorAction |