[libvirt] [PATCH 2/9] qemu: rename gluster_debug_entry

Ján Tomko jtomko at redhat.com
Mon Jan 6 14:25:58 UTC 2020


Remove the 'gluster' part and decouple the return from
the gluster_debug_level parsing to allow adding more options
to this section.

Signed-off-by: Ján Tomko <jtomko at redhat.com>
---
 src/qemu/libvirtd_qemu.aug |  4 ++--
 src/qemu/qemu_conf.c       | 11 +++++++----
 2 files changed, 9 insertions(+), 6 deletions(-)

diff --git a/src/qemu/libvirtd_qemu.aug b/src/qemu/libvirtd_qemu.aug
index 86bea2a32a..557b6f38f8 100644
--- a/src/qemu/libvirtd_qemu.aug
+++ b/src/qemu/libvirtd_qemu.aug
@@ -115,7 +115,7 @@ module Libvirtd_qemu =
 
    let nvram_entry = str_array_entry "nvram"
 
-   let gluster_debug_level_entry = int_entry "gluster_debug_level"
+   let debug_level_entry = int_entry "gluster_debug_level"
 
    let memory_entry = str_entry "memory_backing_dir"
 
@@ -152,7 +152,7 @@ module Libvirtd_qemu =
              | network_entry
              | log_entry
              | nvram_entry
-             | gluster_debug_level_entry
+             | debug_level_entry
              | memory_entry
              | vxhs_entry
              | nbd_entry
diff --git a/src/qemu/qemu_conf.c b/src/qemu/qemu_conf.c
index c07a844dfc..b62dd1df52 100644
--- a/src/qemu/qemu_conf.c
+++ b/src/qemu/qemu_conf.c
@@ -796,10 +796,13 @@ virQEMUDriverConfigLoadNVRAMEntry(virQEMUDriverConfigPtr cfg,
 
 
 static int
-virQEMUDriverConfigLoadGlusterDebugEntry(virQEMUDriverConfigPtr cfg,
-                                         virConfPtr conf)
+virQEMUDriverConfigLoadDebugEntry(virQEMUDriverConfigPtr cfg,
+                                  virConfPtr conf)
 {
-    return virConfGetValueUInt(conf, "gluster_debug_level", &cfg->glusterDebugLevel);
+    if (virConfGetValueUInt(conf, "gluster_debug_level", &cfg->glusterDebugLevel) < 0)
+        return -1;
+
+    return 0;
 }
 
 
@@ -1014,7 +1017,7 @@ int virQEMUDriverConfigLoadFile(virQEMUDriverConfigPtr cfg,
     if (virQEMUDriverConfigLoadNVRAMEntry(cfg, conf, privileged) < 0)
         return -1;
 
-    if (virQEMUDriverConfigLoadGlusterDebugEntry(cfg, conf) < 0)
+    if (virQEMUDriverConfigLoadDebugEntry(cfg, conf) < 0)
         return -1;
 
     if (virQEMUDriverConfigLoadSecurityEntry(cfg, conf, privileged) < 0)
-- 
2.21.0




More information about the libvir-list mailing list