|
|
c1c534 |
From 9daae960fbe9902f9db5ebc76ded1f197bb3e6ae Mon Sep 17 00:00:00 2001
|
|
|
c1c534 |
Message-Id: <9daae960fbe9902f9db5ebc76ded1f197bb3e6ae@dist-git>
|
|
|
c1c534 |
From: Peter Krempa <pkrempa@redhat.com>
|
|
|
c1c534 |
Date: Wed, 7 Feb 2018 14:16:00 +0100
|
|
|
c1c534 |
Subject: [PATCH] qemu: Remove unused 'cpuhalted' argument from
|
|
|
c1c534 |
qemuDomainHelperGetVcpus
|
|
|
c1c534 |
|
|
|
c1c534 |
The halted state is no longer extracted using this helper so the
|
|
|
c1c534 |
argument can be removed.
|
|
|
c1c534 |
|
|
|
c1c534 |
(cherry picked from commit 2222548b1e55257dc8806abdbefa71a87b22dea1)
|
|
|
c1c534 |
|
|
|
c1c534 |
https://bugzilla.redhat.com/show_bug.cgi?id=1534585
|
|
|
c1c534 |
---
|
|
|
c1c534 |
src/qemu/qemu_driver.c | 14 +++-----------
|
|
|
c1c534 |
1 file changed, 3 insertions(+), 11 deletions(-)
|
|
|
c1c534 |
|
|
|
c1c534 |
diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c
|
|
|
c1c534 |
index bfb3c3c4c5..b5bef7442e 100644
|
|
|
c1c534 |
--- a/src/qemu/qemu_driver.c
|
|
|
c1c534 |
+++ b/src/qemu/qemu_driver.c
|
|
|
c1c534 |
@@ -1490,8 +1490,7 @@ qemuDomainHelperGetVcpus(virDomainObjPtr vm,
|
|
|
c1c534 |
unsigned long long *cpuwait,
|
|
|
c1c534 |
int maxinfo,
|
|
|
c1c534 |
unsigned char *cpumaps,
|
|
|
c1c534 |
- int maplen,
|
|
|
c1c534 |
- bool *cpuhalted)
|
|
|
c1c534 |
+ int maplen)
|
|
|
c1c534 |
{
|
|
|
c1c534 |
size_t ncpuinfo = 0;
|
|
|
c1c534 |
size_t i;
|
|
|
c1c534 |
@@ -1511,9 +1510,6 @@ qemuDomainHelperGetVcpus(virDomainObjPtr vm,
|
|
|
c1c534 |
if (cpumaps)
|
|
|
c1c534 |
memset(cpumaps, 0, sizeof(*cpumaps) * maxinfo);
|
|
|
c1c534 |
|
|
|
c1c534 |
- if (cpuhalted)
|
|
|
c1c534 |
- memset(cpuhalted, 0, sizeof(*cpuhalted) * maxinfo);
|
|
|
c1c534 |
-
|
|
|
c1c534 |
for (i = 0; i < virDomainDefGetVcpusMax(vm->def) && ncpuinfo < maxinfo; i++) {
|
|
|
c1c534 |
virDomainVcpuDefPtr vcpu = virDomainDefGetVcpu(vm->def, i);
|
|
|
c1c534 |
pid_t vcpupid = qemuDomainGetVcpuPid(vm, i);
|
|
|
c1c534 |
@@ -1551,9 +1547,6 @@ qemuDomainHelperGetVcpus(virDomainObjPtr vm,
|
|
|
c1c534 |
return -1;
|
|
|
c1c534 |
}
|
|
|
c1c534 |
|
|
|
c1c534 |
- if (cpuhalted)
|
|
|
c1c534 |
- cpuhalted[ncpuinfo] = qemuDomainGetVcpuHalted(vm, ncpuinfo);
|
|
|
c1c534 |
-
|
|
|
c1c534 |
ncpuinfo++;
|
|
|
c1c534 |
}
|
|
|
c1c534 |
|
|
|
c1c534 |
@@ -5411,8 +5404,7 @@ qemuDomainGetVcpus(virDomainPtr dom,
|
|
|
c1c534 |
goto cleanup;
|
|
|
c1c534 |
}
|
|
|
c1c534 |
|
|
|
c1c534 |
- ret = qemuDomainHelperGetVcpus(vm, info, NULL, maxinfo, cpumaps, maplen,
|
|
|
c1c534 |
- NULL);
|
|
|
c1c534 |
+ ret = qemuDomainHelperGetVcpus(vm, info, NULL, maxinfo, cpumaps, maplen);
|
|
|
c1c534 |
|
|
|
c1c534 |
cleanup:
|
|
|
c1c534 |
virDomainObjEndAPI(&vm;;
|
|
|
c1c534 |
@@ -19567,7 +19559,7 @@ qemuDomainGetStatsVcpu(virQEMUDriverPtr driver,
|
|
|
c1c534 |
|
|
|
c1c534 |
if (qemuDomainHelperGetVcpus(dom, cpuinfo, cpuwait,
|
|
|
c1c534 |
virDomainDefGetVcpus(dom->def),
|
|
|
c1c534 |
- NULL, 0, NULL) < 0) {
|
|
|
c1c534 |
+ NULL, 0) < 0) {
|
|
|
c1c534 |
virResetLastError();
|
|
|
c1c534 |
ret = 0; /* it's ok to be silent and go ahead */
|
|
|
c1c534 |
goto cleanup;
|
|
|
c1c534 |
--
|
|
|
c1c534 |
2.16.1
|
|
|
c1c534 |
|