diff options
author | Max Reitz <mreitz@redhat.com> | 2016-01-29 20:49:13 +0100 |
---|---|---|
committer | Max Reitz <mreitz@redhat.com> | 2016-02-02 17:47:06 +0100 |
commit | 327032ce74d0d9fbd4e18528d0f124b68bc56cea (patch) | |
tree | 51e77df330b4ed74c2ad68a487e711035f6fcece /block | |
parent | abb3e55b5b718d6392441f56ba0729a62105ac56 (diff) |
block/qapi: Emit tray_open only if there is a tray
Signed-off-by: Max Reitz <mreitz@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Reviewed-by: Alberto Garcia <berto@igalia.com>
Message-id: 1454096953-31773-5-git-send-email-mreitz@redhat.com
Diffstat (limited to 'block')
-rw-r--r-- | block/qapi.c | 2 |
1 files changed, 1 insertions, 1 deletions
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); } |