Received: from eggs.gnu.org ([2001:4830:134:3::10]:36673) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aL7QU-0004lj-B4 for qemu-devel@nongnu.org; Mon, 18 Jan 2016 05:52:47 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aL7QT-0000vO-Ei for qemu-devel@nongnu.org; Mon, 18 Jan 2016 05:52:46 -0500 From: Alberto Garcia In-Reply-To: <1452613674-12248-5-git-send-email-mreitz@redhat.com> References: <1452613674-12248-1-git-send-email-mreitz@redhat.com> <1452613674-12248-5-git-send-email-mreitz@redhat.com> Date: Mon, 18 Jan 2016 11:52:37 +0100 Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Subject: Re: [Qemu-devel] [Qemu-block] [PATCH 4/4] block/qapi: Emit tray_open only if there is a tray List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Max Reitz , qemu-block@nongnu.org Cc: Kevin Wolf , Peter Maydell , Markus Armbruster , qemu-devel@nongnu.org On Tue 12 Jan 2016 04:47:54 PM CET, Max Reitz wrote: > Signed-off-by: Max Reitz > --- > 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