[libvirt] [PATCH 2/4] qemu: Remove unused 'cpuhalted' argument from qemuDomainHelperGetVcpus

Peter Krempa pkrempa at redhat.com
Tue Feb 6 15:30:53 UTC 2018


The halted state is no longer extracted using this helper so the
argument can be removed.
---
 src/qemu/qemu_driver.c | 14 +++-----------
 1 file changed, 3 insertions(+), 11 deletions(-)

diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c
index 172a8a3f73..eaa6049fee 100644
--- a/src/qemu/qemu_driver.c
+++ b/src/qemu/qemu_driver.c
@@ -1490,8 +1490,7 @@ qemuDomainHelperGetVcpus(virDomainObjPtr vm,
                          unsigned long long *cpuwait,
                          int maxinfo,
                          unsigned char *cpumaps,
-                         int maplen,
-                         bool *cpuhalted)
+                         int maplen)
 {
     size_t ncpuinfo = 0;
     size_t i;
@@ -1511,9 +1510,6 @@ qemuDomainHelperGetVcpus(virDomainObjPtr vm,
     if (cpumaps)
         memset(cpumaps, 0, sizeof(*cpumaps) * maxinfo);

-    if (cpuhalted)
-        memset(cpuhalted, 0, sizeof(*cpuhalted) * maxinfo);
-
     for (i = 0; i < virDomainDefGetVcpusMax(vm->def) && ncpuinfo < maxinfo; i++) {
         virDomainVcpuDefPtr vcpu = virDomainDefGetVcpu(vm->def, i);
         pid_t vcpupid = qemuDomainGetVcpuPid(vm, i);
@@ -1551,9 +1547,6 @@ qemuDomainHelperGetVcpus(virDomainObjPtr vm,
                 return -1;
         }

-        if (cpuhalted)
-            cpuhalted[ncpuinfo] = qemuDomainGetVcpuHalted(vm, ncpuinfo);
-
         ncpuinfo++;
     }

@@ -5461,8 +5454,7 @@ qemuDomainGetVcpus(virDomainPtr dom,
         goto cleanup;
     }

-    ret = qemuDomainHelperGetVcpus(vm, info, NULL, maxinfo, cpumaps, maplen,
-                                   NULL);
+    ret = qemuDomainHelperGetVcpus(vm, info, NULL, maxinfo, cpumaps, maplen);

  cleanup:
     virDomainObjEndAPI(&vm);
@@ -19700,7 +19692,7 @@ qemuDomainGetStatsVcpu(virQEMUDriverPtr driver,

     if (qemuDomainHelperGetVcpus(dom, cpuinfo, cpuwait,
                                  virDomainDefGetVcpus(dom->def),
-                                 NULL, 0, NULL) < 0) {
+                                 NULL, 0) < 0) {
         virResetLastError();
         ret = 0; /* it's ok to be silent and go ahead */
         goto cleanup;
-- 
2.15.0




More information about the libvir-list mailing list