]> git.ipfire.org Git - thirdparty/libvirt.git/commit
util: storage: Improve error message when requesting image above 'start'
authorPeter Krempa <pkrempa@redhat.com>
Tue, 21 Apr 2015 15:38:08 +0000 (17:38 +0200)
committerPeter Krempa <pkrempa@redhat.com>
Wed, 22 Apr 2015 12:24:32 +0000 (14:24 +0200)
commitdff92b3f2fe63da63391f929134b06d3be992a40
tree9d7cfd81bcb5b6339c230fd35a58d8eb7ed94dde
parent9447f3c5fb6d0014d6d0856777c638d904365025
util: storage: Improve error message when requesting image above 'start'

When a user would specify a backing chain index that is above the start
point libvirt would report a rather unhelpful error:

invalid argument: could not find backing store 1 in chain for 'sub/link2'

This patch adds an explicit check that the index is below start point in
the backing store and reports the following error if not:

invalid argument: requested backing store index 1 is above 'sub/../qcow2' in chain for 'sub/link2'

Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1177062
src/util/virstoragefile.c