From 327032ce74d0d9fbd4e18528d0f124b68bc56cea Mon Sep 17 00:00:00 2001 From: Max Reitz Date: Fri, 29 Jan 2016 20:49:13 +0100 Subject: block/qapi: Emit tray_open only if there is a tray Signed-off-by: Max Reitz Reviewed-by: Eric Blake Reviewed-by: Alberto Garcia Message-id: 1454096953-31773-5-git-send-email-mreitz@redhat.com --- block/qapi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'block/qapi.c') diff --git a/block/qapi.c b/block/qapi.c index a49c118ba0..bbe0c9dddb 100644 --- a/block/qapi.c +++ b/block/qapi.c @@ -300,7 +300,7 @@ static void bdrv_query_info(BlockBackend *blk, BlockInfo **p_info, info->locked = blk_dev_is_medium_locked(blk); info->removable = blk_dev_has_removable_media(blk); - if (blk_dev_has_removable_media(blk)) { + if (blk_dev_has_tray(blk)) { info->has_tray_open = true; info->tray_open = blk_dev_is_tray_open(blk); } -- cgit v1.2.3