OSDN Git Service

qemu-img/convert: Move bs_n > 1 && -B check down
authorMax Reitz <mreitz@redhat.com>
Wed, 26 Apr 2017 13:46:48 +0000 (15:46 +0200)
committerKevin Wolf <kwolf@redhat.com>
Thu, 27 Apr 2017 15:26:28 +0000 (17:26 +0200)
commit48758a84738c5be8cf022062ed0b85ff2ebacc0c
treef1207a4088f71c1458ef491d5b2df8976d215a47
parent3258b91141090b05edcaab8f1d1dd355ca91b49a
qemu-img/convert: Move bs_n > 1 && -B check down

It does not make much sense to use a backing image for the target when
you concatenate multiple images (because then there is no correspondence
between the source images' backing files and the target's); but it was
still possible to give one by using -o backing_file=X instead of -B X.

Fix this by moving the check.

(Also, change the error message because -B is not the only way to
 specify the backing file, evidently.)

Signed-off-by: Max Reitz <mreitz@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
qemu-img.c
tests/qemu-iotests/122.out