qemu-block
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-block] [PATCH 4/4] block/qapi: Emit tray_open only if there is


From: Alberto Garcia
Subject: Re: [Qemu-block] [PATCH 4/4] block/qapi: Emit tray_open only if there is a tray
Date: Mon, 18 Jan 2016 11:52:37 +0100
User-agent: Notmuch/0.13.2 (http://notmuchmail.org) Emacs/23.2.1 (i486-pc-linux-gnu)

On Tue 12 Jan 2016 04:47:54 PM CET, Max Reitz wrote:

> Signed-off-by: Max Reitz <address@hidden>
> ---
>  block/qapi.c               | 2 +-
>  tests/qemu-iotests/067.out | 4 ----
>  2 files changed, 1 insertion(+), 5 deletions(-)
>
> diff --git a/block/qapi.c b/block/qapi.c
> index 58d3975..12a0f25 100644
> --- a/block/qapi.c
> +++ b/block/qapi.c
> @@ -299,7 +299,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);
>      }

It probably makes sense to update the documentation as well:

# @tray_open: #optional True if the device has a tray and it is open
#             (only present if removable is true)

Berto



reply via email to

[Prev in Thread] Current Thread [Next in Thread]