diff options
author | Eric Blake <eblake@redhat.com> | 2019-07-05 10:28:12 -0500 |
---|---|---|
committer | Kevin Wolf <kwolf@redhat.com> | 2019-07-08 16:00:31 +0200 |
commit | f7077c9860a438087c2d9a8cc27cb8438c98a748 (patch) | |
tree | 62ff443f3810dfde90b675fe9bdb17da737ecabc /block | |
parent | 2bbd998642419bd5415c8d4e4d49c6da5cfd1a78 (diff) | |
download | qemu-f7077c9860a438087c2d9a8cc27cb8438c98a748.zip qemu-f7077c9860a438087c2d9a8cc27cb8438c98a748.tar.gz qemu-f7077c9860a438087c2d9a8cc27cb8438c98a748.tar.bz2 |
qcow2: Allow -o compat=v3 during qemu-img amend
Commit b76b4f60 allowed '-o compat=v3' as an alias for the
less-appealing '-o compat=1.1' for 'qemu-img create' since we want to
use the QMP form as much as possible, but forgot to do likewise for
qemu-img amend. Also, it doesn't help that '-o help' doesn't list our
new preferred spellings.
Signed-off-by: Eric Blake <eblake@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Diffstat (limited to 'block')
-rw-r--r-- | block/qcow2.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/block/qcow2.c b/block/qcow2.c index 2a59eb2..039bdc2 100644 --- a/block/qcow2.c +++ b/block/qcow2.c @@ -4823,9 +4823,9 @@ static int qcow2_amend_options(BlockDriverState *bs, QemuOpts *opts, compat = qemu_opt_get(opts, BLOCK_OPT_COMPAT_LEVEL); if (!compat) { /* preserve default */ - } else if (!strcmp(compat, "0.10")) { + } else if (!strcmp(compat, "0.10") || !strcmp(compat, "v2")) { new_version = 2; - } else if (!strcmp(compat, "1.1")) { + } else if (!strcmp(compat, "1.1") || !strcmp(compat, "v3")) { new_version = 3; } else { error_setg(errp, "Unknown compatibility level %s", compat); @@ -5098,7 +5098,7 @@ static QemuOptsList qcow2_create_opts = { { .name = BLOCK_OPT_COMPAT_LEVEL, .type = QEMU_OPT_STRING, - .help = "Compatibility level (0.10 or 1.1)" + .help = "Compatibility level (v2 [0.10] or v3 [1.1])" }, { .name = BLOCK_OPT_BACKING_FILE, |