mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-02-01 17:35:17 +00:00
qemu: domain: Tolerate NULL 'cfg' in qemuDomainPrepareDiskSourceChain
The function will be reused in the test code where we don't care much that the gluster debug level can't be populated from the qemu config. Set the level only when 'cfg' is passed. Signed-off-by: Peter Krempa <pkrempa@redhat.com> Reviewed-by: John Ferlan <jferlan@redhat.com>
This commit is contained in:
parent
1e81f198bf
commit
30a7721702
@ -11871,7 +11871,8 @@ qemuDomainPrepareDiskSourceChain(virDomainDiskDefPtr disk,
|
||||
src->detect_zeroes = disk->detect_zeroes;
|
||||
|
||||
for (n = src; virStorageSourceIsBacking(n); n = n->backingStore) {
|
||||
if (n->type == VIR_STORAGE_TYPE_NETWORK &&
|
||||
if (cfg &&
|
||||
n->type == VIR_STORAGE_TYPE_NETWORK &&
|
||||
n->protocol == VIR_STORAGE_NET_PROTOCOL_GLUSTER &&
|
||||
virQEMUCapsGet(qemuCaps, QEMU_CAPS_GLUSTER_DEBUG_LEVEL)) {
|
||||
n->debug = true;
|
||||
|
Loading…
x
Reference in New Issue
Block a user