[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH v2] block: Ignore duplicate or NULL format_name
From: |
Kevin Wolf |
Subject: |
Re: [Qemu-devel] [PATCH v2] block: Ignore duplicate or NULL format_name in bdrv_iterate_format |
Date: |
Tue, 29 Apr 2014 11:55:00 +0200 |
User-agent: |
Mutt/1.5.21 (2010-09-15) |
Am 29.04.2014 um 00:29 hat Jeff Cody geschrieben:
> Some block drivers have multiple BlockDriver instances with identical
> format_name fields (e.g. gluster, nbd).
>
> Both qemu-img and qemu will use bdrv_iterate_format() to list the
> supported formats when a help option is invoked. As protocols and
> formats may register multiple drivers, redundant listings of formats
> occur (e.g., "Supported formats: ... gluster gluster gluster gluster ...
> ").
>
> Since the list of driver formats will be small, this performs a simple
> linear search on format_name, and ignores any duplicates.
>
> The end result change is that the iterator will no longer receive
> duplicate string names, nor will it receive NULL pointers.
>
> Signed-off-by: Jeff Cody <address@hidden>
Thanks, applied to the block branch.
Kevin