]> git.ipfire.org Git - thirdparty/libvirt.git/commit
qemuDomainGetStorageSourceByDevstr: Avoid logged errors
authorPeter Krempa <pkrempa@redhat.com>
Mon, 7 Dec 2020 12:19:18 +0000 (13:19 +0100)
committerPeter Krempa <pkrempa@redhat.com>
Tue, 8 Dec 2020 14:12:33 +0000 (15:12 +0100)
commita0a2eb12abc5ba5b5c324042d28af48184af81ea
tree1e6a9502ac2cfa57e36f0121770d31ddb7ef2e73
parent4c4c07b94169ad52f6fc3378f397528a698cf5cf
qemuDomainGetStorageSourceByDevstr: Avoid logged errors

'virStorageFileChainLookup' reports an error when the lookup of the
backing chain entry is unsuccessful. Since we possibly use it multiple
times when looking up backing for 'disk->mirror' the function can report
error which won't be actually reported.

Replace the call to virStorageFileChainLookup by lookup in the chain by
index.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
src/qemu/qemu_domain.c