]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
qemu: Remove unused 'cpuhalted' argument from qemuDomainHelperGetVcpus
authorPeter Krempa <pkrempa@redhat.com>
Tue, 6 Feb 2018 14:55:14 +0000 (15:55 +0100)
committerPeter Krempa <pkrempa@redhat.com>
Wed, 7 Feb 2018 12:57:00 +0000 (13:57 +0100)
The halted state is no longer extracted using this helper so the
argument can be removed.

src/qemu/qemu_driver.c

index 172a8a3f73972b0e6b22c270018dcfa6536c5db6..eaa6049fee2a5e2d2682ede67616618814f23c20 100644 (file)
@@ -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;