aboutsummaryrefslogtreecommitdiff
path: root/qemu-img.c
diff options
context:
space:
mode:
authorAndrey Shinkevich <andrey.shinkevich@virtuozzo.com>2019-03-07 16:33:58 +0300
committerKevin Wolf <kwolf@redhat.com>2019-03-08 12:26:45 +0100
commit9ac404c5233f3033435ab250d30ea9f776188a01 (patch)
treee1e0d6369a04c920bb6b1d3aa993fbaf5b972cdf /qemu-img.c
parentce090f656c44b357f6caf8f6000648744fbb655b (diff)
downloadqemu-9ac404c5233f3033435ab250d30ea9f776188a01.zip
qemu-9ac404c5233f3033435ab250d30ea9f776188a01.tar.gz
qemu-9ac404c5233f3033435ab250d30ea9f776188a01.tar.bz2
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>
Diffstat (limited to 'qemu-img.c')
-rw-r--r--qemu-img.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/qemu-img.c b/qemu-img.c
index 660c018..5fac840 100644
--- a/qemu-img.c
+++ b/qemu-img.c
@@ -198,7 +198,7 @@ static void QEMU_NORETURN help(void)
" 'skip=N' skip N bs-sized blocks at the start of input\n";
printf("%s\nSupported formats:", help_msg);
- bdrv_iterate_format(format_print, NULL);
+ bdrv_iterate_format(format_print, NULL, false);
printf("\n\n" QEMU_HELP_BOTTOM "\n");
exit(EXIT_SUCCESS);
}