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. > > blk_is_inserted() is changed to return true only if blk_bs() is not > NULL. > > Signed-off-by: Max Reitz <mre...@redhat.com> > --- > block/block-backend.c | 7 ++++++- > include/sysemu/block-backend.h | 1 + > 2 files changed, 7 insertions(+), 1 deletion(-) >
> +++ 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 <ebl...@redhat.com> -- Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org
signature.asc
Description: OpenPGP digital signature