On 01/26/2015 12:27 PM, Max Reitz wrote: > There may be BlockBackends which are not returned by blk_by_name(), but > do exist and have a name. blk_name_taken() allows testing whether a > specific name is in use already, independent of whether the BlockBackend > with that name is accessible through blk_by_name(). > > Signed-off-by: Max Reitz <mre...@redhat.com> > --- > block.c | 2 +- > block/block-backend.c | 19 ++++++++++++++++++- > include/sysemu/block-backend.h | 1 + > 3 files changed, 20 insertions(+), 2 deletions(-) > > diff --git a/block.c b/block.c > index 0cd6457..8eef0c5 100644 > --- a/block.c > +++ b/block.c > @@ -898,7 +898,7 @@ static void bdrv_assign_node_name(BlockDriverState *bs, > } > > /* takes care of avoiding namespaces collisions */ > - if (blk_by_name(node_name)) { > + if (blk_name_taken(node_name)) {
While you are here, s/namespaces/namespace/ 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