diff options
Diffstat (limited to 'blockdev.c')
-rw-r--r-- | blockdev.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/blockdev.c b/blockdev.c index 3d7501565d..8669142704 100644 --- a/blockdev.c +++ b/blockdev.c @@ -398,11 +398,11 @@ DriveInfo *drive_init(QemuOpts *opts, int default_to_scsi) #endif if ((buf = qemu_opt_get(opts, "format")) != NULL) { - if (strcmp(buf, "?") == 0) { - error_printf("Supported formats:"); - bdrv_iterate_format(bdrv_format_print, NULL); - error_printf("\n"); - return NULL; + if (is_help_option(buf)) { + error_printf("Supported formats:"); + bdrv_iterate_format(bdrv_format_print, NULL); + error_printf("\n"); + return NULL; } drv = bdrv_find_whitelisted_format(buf); if (!drv) { |