qemu: Remove unused 'cpuhalted' argument from qemuDomainHelperGetVcpus

The halted state is no longer extracted using this helper so the
argument can be removed.
This commit is contained in:
Peter Krempa 2018-02-06 15:55:14 +01:00
parent 38d26864f7
commit 2222548b1e

View File

@ -1490,8 +1490,7 @@ qemuDomainHelperGetVcpus(virDomainObjPtr vm,
unsigned long long *cpuwait, unsigned long long *cpuwait,
int maxinfo, int maxinfo,
unsigned char *cpumaps, unsigned char *cpumaps,
int maplen, int maplen)
bool *cpuhalted)
{ {
size_t ncpuinfo = 0; size_t ncpuinfo = 0;
size_t i; size_t i;
@ -1511,9 +1510,6 @@ qemuDomainHelperGetVcpus(virDomainObjPtr vm,
if (cpumaps) if (cpumaps)
memset(cpumaps, 0, sizeof(*cpumaps) * maxinfo); memset(cpumaps, 0, sizeof(*cpumaps) * maxinfo);
if (cpuhalted)
memset(cpuhalted, 0, sizeof(*cpuhalted) * maxinfo);
for (i = 0; i < virDomainDefGetVcpusMax(vm->def) && ncpuinfo < maxinfo; i++) { for (i = 0; i < virDomainDefGetVcpusMax(vm->def) && ncpuinfo < maxinfo; i++) {
virDomainVcpuDefPtr vcpu = virDomainDefGetVcpu(vm->def, i); virDomainVcpuDefPtr vcpu = virDomainDefGetVcpu(vm->def, i);
pid_t vcpupid = qemuDomainGetVcpuPid(vm, i); pid_t vcpupid = qemuDomainGetVcpuPid(vm, i);
@ -1551,9 +1547,6 @@ qemuDomainHelperGetVcpus(virDomainObjPtr vm,
return -1; return -1;
} }
if (cpuhalted)
cpuhalted[ncpuinfo] = qemuDomainGetVcpuHalted(vm, ncpuinfo);
ncpuinfo++; ncpuinfo++;
} }
@ -5461,8 +5454,7 @@ qemuDomainGetVcpus(virDomainPtr dom,
goto cleanup; goto cleanup;
} }
ret = qemuDomainHelperGetVcpus(vm, info, NULL, maxinfo, cpumaps, maplen, ret = qemuDomainHelperGetVcpus(vm, info, NULL, maxinfo, cpumaps, maplen);
NULL);
cleanup: cleanup:
virDomainObjEndAPI(&vm); virDomainObjEndAPI(&vm);
@ -19700,7 +19692,7 @@ qemuDomainGetStatsVcpu(virQEMUDriverPtr driver,
if (qemuDomainHelperGetVcpus(dom, cpuinfo, cpuwait, if (qemuDomainHelperGetVcpus(dom, cpuinfo, cpuwait,
virDomainDefGetVcpus(dom->def), virDomainDefGetVcpus(dom->def),
NULL, 0, NULL) < 0) { NULL, 0) < 0) {
virResetLastError(); virResetLastError();
ret = 0; /* it's ok to be silent and go ahead */ ret = 0; /* it's ok to be silent and go ahead */
goto cleanup; goto cleanup;