qemu-img: Add print_amend_option_help()
commit51641351420e4f9dc6613d0dd03a5f0f214ed5b6
authorMax Reitz <mreitz@redhat.com>
Wed, 9 May 2018 21:00:20 +0000 (9 23:00 +0200)
committerMax Reitz <mreitz@redhat.com>
Mon, 11 Jun 2018 14:18:45 +0000 (11 16:18 +0200)
treee300a476be7be038e7eb55e7b731b00474d05cc0
parent7f3fb00136aaec74df8132492d1f48b8e9840258
qemu-img: Add print_amend_option_help()

The more generic print_block_option_help() function is not really
suitable for qemu-img amend, for a couple of reasons:
(1) We do not need to append the protocol-level options, as amendment
    happens only on one node and does not descend downwards to its
    children.
(2) print_block_option_help() says those options are "supported".  For
    option amendment, we do not really know that.  So this new function
    explicitly says that those options are the creation options, and not
    all of them may be supported.
(3) If the driver does not support option amendment, we should not print
    anything (except for an error message that amendment is not
    supported).

Buglink: https://bugzilla.redhat.com/show_bug.cgi?id=1537956
Signed-off-by: Max Reitz <mreitz@redhat.com>
Reviewed-by: John Snow <jsnow@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Message-id: 20180509210023.20283-5-mreitz@redhat.com
Signed-off-by: Max Reitz <mreitz@redhat.com>
qemu-img.c
tests/qemu-iotests/082.out