]> git.proxmox.com Git - mirror_qemu.git/commit - qemu-img.c
qemu-img: Amendment support implies create_opts
authorMax Reitz <mreitz@redhat.com>
Wed, 9 May 2018 21:00:17 +0000 (23:00 +0200)
committerMax Reitz <mreitz@redhat.com>
Mon, 11 Jun 2018 14:18:45 +0000 (16:18 +0200)
commit1f996683ad908fd41c572221a63d9fc31ce04d07
tree889df5e306294308aa09c9a2a87e104ec7f737ac
parentf45b638f9f967cdbea4e24704bd16a858ddcde03
qemu-img: Amendment support implies create_opts

Instead of checking whether a driver has a non-NULL create_opts we
should check whether it supports image amendment in the first place.  If
it does, it must have create_opts.

On the other hand, if it does not have create_opts (so it does not
support amendment either), the error message "does not support any
options" is a bit useless.  Stating clearly that the driver has no
amendment support whatsoever is probably better.

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-2-mreitz@redhat.com
Signed-off-by: Max Reitz <mreitz@redhat.com>
qemu-img.c