On 2018-04-26 18:19, Roman Kagan wrote: > bdrv_iterate_format (which is currently only used for printing out the > formats supported by the block layer) doesn't take format whitelisting > into account. > > As a result, QEMU lies when asked for the list of block drivers it > supports with "-drive format=?": some of the formats there may be > recognized by qemu-* tools but unusable in qemu proper. > > To avoid that, exclude formats that are not whitelisted from > enumeration, if whitelisting is in use. Since we have separate > whitelists for r/w and r/o, take this as a parameter to > bdrv_iterate_format, and print two lists of supported formats (r/w and > r/o) in main qemu. > > Signed-off-by: Roman Kagan <rka...@virtuozzo.com> > --- > include/block/block.h | 2 +- > block.c | 23 +++++++++++++++++++---- > blockdev.c | 4 +++- > qemu-img.c | 2 +- > 4 files changed, 24 insertions(+), 7 deletions(-)
Reviewed-by: Max Reitz <mre...@redhat.com>
signature.asc
Description: OpenPGP digital signature