[RFC PATCH 19/30] qemu: domain: Tolerate NULL 'cfg' in qemuDomainPrepareDiskSourceChain

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxx>
---
 src/qemu/qemu_domain.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/src/qemu/qemu_domain.c b/src/qemu/qemu_domain.c
index b8abae1afb..8fbc793e92 100644
--- a/src/qemu/qemu_domain.c
+++ b/src/qemu/qemu_domain.c
@@ -11862,7 +11862,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;
-- 
2.14.3

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list



[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]

  Powered by Linux