On 01/12/2016 08:47 AM, Max Reitz wrote:
> 'change' and related operations did not work when used on guest devices
> featuring removable media but no actual tray, because
> blk_dev_is_tray_open() always returned false for them and the
> blockdev-{insert,remove}-medium commands required it to return true.
> 
> Fix this by making blockdev-{insert,remove}-medium work on tray-less
> devices. Also, blockdev-{open,close}-tray are now explicitly no-ops when
> invoked on such devices, and blk_dev_change_media_cb() is instead
> called by blockdev-{insert,remove}-medium (for tray-less devices only).
> 
> Reported-by: Peter Maydell <[email protected]>
> Cc: qemu-stable <[email protected]>
> Signed-off-by: Max Reitz <[email protected]>
> ---
>  blockdev.c           | 27 +++++++++++++++++++++++++--
>  qapi/block-core.json |  3 +--
>  2 files changed, 26 insertions(+), 4 deletions(-)

Reviewed-by: Eric Blake <[email protected]>

-- 
Eric Blake   eblake redhat com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org

Attachment: signature.asc
Description: OpenPGP digital signature

Reply via email to