]> git.proxmox.com Git - mirror_qemu.git/commit - qemu-img.c
block: iterate_format with account of whitelisting
authorAndrey Shinkevich <andrey.shinkevich@virtuozzo.com>
Thu, 7 Mar 2019 13:33:58 +0000 (16:33 +0300)
committerKevin Wolf <kwolf@redhat.com>
Fri, 8 Mar 2019 11:26:45 +0000 (12:26 +0100)
commit9ac404c5233f3033435ab250d30ea9f776188a01
treee1e0d6369a04c920bb6b1d3aa993fbaf5b972cdf
parentce090f656c44b357f6caf8f6000648744fbb655b
block: iterate_format with account of whitelisting

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.

This creates a problem for tests: they enumerate supported formats to
decide which tests to enable, but then discover that QEMU doesn't let
them actually use some of those formats.

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 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 <rkagan@virtuozzo.com>
Signed-off-by: Andrey Shinkevich <andrey.shinkevich@virtuozzo.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
block.c
blockdev.c
include/block/block.h
qemu-img.c