From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:58273) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YGBcE-0005C6-C4 for qemu-devel@nongnu.org; Tue, 27 Jan 2015 14:15:59 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YGBcA-0001bC-9W for qemu-devel@nongnu.org; Tue, 27 Jan 2015 14:15:58 -0500 Received: from mx1.redhat.com ([209.132.183.28]:50489) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YGBcA-0001as-1T for qemu-devel@nongnu.org; Tue, 27 Jan 2015 14:15:54 -0500 Received: from int-mx09.intmail.prod.int.phx2.redhat.com (int-mx09.intmail.prod.int.phx2.redhat.com [10.5.11.22]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id t0RJFrsm014537 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL) for ; Tue, 27 Jan 2015 14:15:53 -0500 Message-ID: <54C7E3E7.5030808@redhat.com> Date: Tue, 27 Jan 2015 12:15:51 -0700 From: Eric Blake MIME-Version: 1.0 References: <1422288204-29271-1-git-send-email-mreitz@redhat.com> <1422288204-29271-7-git-send-email-mreitz@redhat.com> In-Reply-To: <1422288204-29271-7-git-send-email-mreitz@redhat.com> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="qVkdFhwdnVjBFAge84fIqVuQKXIBcPCsc" Subject: Re: [Qemu-devel] [PATCH 06/50] block: Add blk_is_available() List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Max Reitz , qemu-devel@nongnu.org Cc: Kevin Wolf , Fam Zheng , Jeff Cody , Markus Armbruster , Stefan Hajnoczi , john@redhat.com This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --qVkdFhwdnVjBFAge84fIqVuQKXIBcPCsc Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On 01/26/2015 09:02 AM, Max Reitz wrote: > blk_is_available() returns true iff the BDS is inserted (which means > blk_bs() is not NULL and bdrv_is_inserted() returns true) and if the > tray of the guest device is closed. >=20 > blk_is_inserted() is changed to return true only if blk_bs() is not > NULL. >=20 > Signed-off-by: Max Reitz > --- > block/block-backend.c | 7 ++++++- > include/sysemu/block-backend.h | 1 + > 2 files changed, 7 insertions(+), 1 deletion(-) >=20 > +++ b/include/sysemu/block-backend.h > @@ -127,6 +127,7 @@ int blk_enable_write_cache(BlockBackend *blk); > void blk_set_enable_write_cache(BlockBackend *blk, bool wce); > void blk_invalidate_cache(BlockBackend *blk, Error **errp); > int blk_is_inserted(BlockBackend *blk); Should we change blk_is_inserted to return bool? > +bool blk_is_available(BlockBackend *blk); Looks reasonable. Reviewed-by: Eric Blake --=20 Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org --qVkdFhwdnVjBFAge84fIqVuQKXIBcPCsc Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 Comment: Public key at http://people.redhat.com/eblake/eblake.gpg Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iQEcBAEBCAAGBQJUx+PnAAoJEKeha0olJ0NqX+sIAJkzTcMVepiywRcM5eKdnXRM D/TywNpmLwa5SYU02VSZ/5i0nGPPBEBq9L4ie2ueBiARcEwmQfU2/xhL9G9dDM5I v6L1UEkqvB+vJ8PuN1MAQvFByEh4QEWa6k9gyPa0oY00+vjdho6Cc04M7AzxtHFN e9fslIo9O+/L67h07X/J8n93UszTaEfK/IE8Jm2CADWgvZJJ1CFV5zXGjZUukoGZ 2ktW1ona0+kzfTZGGmv6PH8c4m2CUbWiVVD1O/3uEmLML9VSbHoTB6HHEmvNha3U KDreki47qvBJD6M4OOieZzo9qqAFppYzYm9luhXe0rKhMPb9TidN0ATq0TLmRt8= =cSc0 -----END PGP SIGNATURE----- --qVkdFhwdnVjBFAge84fIqVuQKXIBcPCsc--