]> git.ipfire.org Git - thirdparty/libvirt.git/commit
qemu: domain: Properly lookup top of chain in qemuDomainGetStorageSourceByDevstr
authorPeter Krempa <pkrempa@redhat.com>
Wed, 29 Mar 2017 14:56:05 +0000 (16:56 +0200)
committerPeter Krempa <pkrempa@redhat.com>
Wed, 29 Mar 2017 14:56:05 +0000 (16:56 +0200)
commit20ee78bf9bafe542097fe0e144921d001a6799a7
treeeb7e088608b78eaf3be85596425f0b20c3c36968
parente9f9690958b7fc86c4002c16cd2bdccba0dd07d1
qemu: domain: Properly lookup top of chain in qemuDomainGetStorageSourceByDevstr

When idx is 0 virStorageFileChainLookup returns the base (bottom) of the
backing chain rather than the top. This is expected by the callers of
qemuDomainGetStorageSourceByDevstr.

Add a special case for idx == 0
src/qemu/qemu_domain.c