Both errors from the cgroups code and from the affinity code would be
overwritten by the API. Report the more specific error.
---
src/qemu/qemu_driver.c | 12 ++----------
1 file changed, 2 insertions(+), 10 deletions(-)
diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c
index a762521..24c1ca4 100644
--- a/src/qemu/qemu_driver.c
+++ b/src/qemu/qemu_driver.c
@@ -5066,20 +5066,12 @@ qemuDomainPinVcpuFlags(virDomainPtr dom,
if (virCgroupNewThread(priv->cgroup, VIR_CGROUP_THREAD_VCPU, vcpu,
false, &cgroup_vcpu) < 0)
goto endjob;
- if (qemuSetupCgroupCpusetCpus(cgroup_vcpu, pcpumap) < 0) {
- virReportError(VIR_ERR_OPERATION_INVALID,
- _("failed to set cpuset.cpus in cgroup"
- " for vcpu %d"), vcpu);
+ if (qemuSetupCgroupCpusetCpus(cgroup_vcpu, pcpumap) < 0)
goto endjob;
- }
} else {
if (virProcessSetAffinity(qemuDomainGetVcpuPid(vm, vcpu),
- pcpumap) < 0) {
- virReportError(VIR_ERR_SYSTEM_ERROR,
- _("failed to set cpu affinity for vcpu %d"),
- vcpu);
+ pcpumap) < 0)
goto endjob;
- }
}
virBitmapFree(vcpuinfolive->cpumask);
--
2.6.2