block/amend: separate amend and create options for qemu-img
commitdf373fb0a3a26c2b1b92d27c91bea22a0f5b598d
authorMaxim Levitsky <mlevitsk@redhat.com>
Thu, 25 Jun 2020 12:55:39 +0000 (25 14:55 +0200)
committerMax Reitz <mreitz@redhat.com>
Mon, 6 Jul 2020 06:49:28 +0000 (6 08:49 +0200)
tree3ff9f9f4fc389e4762a3d87737b14029dbcdcce4
parenta3579bfa0a209761c8526ccc96a5d6068f14768f
block/amend: separate amend and create options for qemu-img

Some options are only useful for creation
(or hard to be amended, like cluster size for qcow2), while some other
options are only useful for amend, like upcoming keyslot management
options for luks

Since currently only qcow2 supports amend, move all its options
to a common macro and then include it in each action option list.

In future it might be useful to remove some options which are
not supported anyway from amend list, which currently
cause an error message if amended.

Signed-off-by: Maxim Levitsky <mlevitsk@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
Reviewed-by: Max Reitz <mreitz@redhat.com>
Message-Id: <20200608094030.670121-5-mlevitsk@redhat.com>
Signed-off-by: Max Reitz <mreitz@redhat.com>
block/qcow2.c
include/block/block_int.h
qemu-img.c