[PATCH 20/22] qemu: driver: Stop using QEMU_ADD_BLOCK_PARAM_ULL in qemuDomainGetStatsBlockExportBackendStorage

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

 



Signed-off-by: Peter Krempa <pkrempa@xxxxxxxxxx>
---
 src/qemu/qemu_driver.c | 18 +++++++-----------
 1 file changed, 7 insertions(+), 11 deletions(-)

diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c
index 703f07a388..2163d14cea 100644
--- a/src/qemu/qemu_driver.c
+++ b/src/qemu/qemu_driver.c
@@ -21493,20 +21493,16 @@ qemuDomainGetStatsBlockExportBackendStorage(const char *entryname,
                                             virTypedParamListPtr params)
 {
     qemuBlockStats *entry;
-    int ret = -1;

-    if (!stats || !entryname || !(entry = virHashLookup(stats, entryname))) {
-        ret = 0;
-        goto cleanup;
-    }
+    if (!stats || !entryname || !(entry = virHashLookup(stats, entryname)))
+        return 0;

-    if (entry->write_threshold)
-        QEMU_ADD_BLOCK_PARAM_ULL(params, recordnr, "threshold",
-                                 entry->write_threshold);
+    if (entry->write_threshold &&
+        virTypedParamListAddULL(params, entry->write_threshold,
+                                "block.%zu.threshold", recordnr) < 0)
+        return -1;

-    ret = 0;
- cleanup:
-    return ret;
+    return 0;
 }


-- 
2.21.0

--
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