mirror of
https://github.com/libvirt/libvirt.git
synced 2025-02-25 18:55:26 -06:00
qemu: Use 'idx' instead of 'index' for variable name
Apparently for Xen-devel 'index' is a global and causes a build failure, so just use the shortened 'idx' instead to avoid the conflict. Signed-off-by: John Ferlan <jferlan@redhat.com>
This commit is contained in:
parent
634285f9c1
commit
d375368790
@ -4638,7 +4638,7 @@ static void qemuProcessEventHandler(void *data, void *opaque)
|
|||||||
static virCgroupPtr
|
static virCgroupPtr
|
||||||
qemuDomainAddCgroupForThread(virCgroupPtr cgroup,
|
qemuDomainAddCgroupForThread(virCgroupPtr cgroup,
|
||||||
virCgroupThreadName nameval,
|
virCgroupThreadName nameval,
|
||||||
int index,
|
int idx,
|
||||||
char *mem_mask,
|
char *mem_mask,
|
||||||
pid_t pid)
|
pid_t pid)
|
||||||
{
|
{
|
||||||
@ -4646,7 +4646,7 @@ qemuDomainAddCgroupForThread(virCgroupPtr cgroup,
|
|||||||
int rv = -1;
|
int rv = -1;
|
||||||
|
|
||||||
/* Create cgroup */
|
/* Create cgroup */
|
||||||
if (virCgroupNewThread(cgroup, nameval, index, true, &new_cgroup) < 0)
|
if (virCgroupNewThread(cgroup, nameval, idx, true, &new_cgroup) < 0)
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|
||||||
if (mem_mask && virCgroupSetCpusetMems(new_cgroup, mem_mask) < 0)
|
if (mem_mask && virCgroupSetCpusetMems(new_cgroup, mem_mask) < 0)
|
||||||
@ -4657,7 +4657,7 @@ qemuDomainAddCgroupForThread(virCgroupPtr cgroup,
|
|||||||
if (rv < 0) {
|
if (rv < 0) {
|
||||||
virReportSystemError(-rv,
|
virReportSystemError(-rv,
|
||||||
_("unable to add id %d task %d to cgroup"),
|
_("unable to add id %d task %d to cgroup"),
|
||||||
index, pid);
|
idx, pid);
|
||||||
virCgroupRemove(new_cgroup);
|
virCgroupRemove(new_cgroup);
|
||||||
goto error;
|
goto error;
|
||||||
}
|
}
|
||||||
@ -4671,7 +4671,7 @@ qemuDomainAddCgroupForThread(virCgroupPtr cgroup,
|
|||||||
|
|
||||||
static int
|
static int
|
||||||
qemuDomainHotplugAddPin(virBitmapPtr cpumask,
|
qemuDomainHotplugAddPin(virBitmapPtr cpumask,
|
||||||
int index,
|
int idx,
|
||||||
virDomainPinDefPtr **pindef_list,
|
virDomainPinDefPtr **pindef_list,
|
||||||
size_t *npin)
|
size_t *npin)
|
||||||
{
|
{
|
||||||
@ -4685,7 +4685,7 @@ qemuDomainHotplugAddPin(virBitmapPtr cpumask,
|
|||||||
VIR_FREE(pindef);
|
VIR_FREE(pindef);
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
}
|
}
|
||||||
pindef->id = index;
|
pindef->id = idx;
|
||||||
if (VIR_APPEND_ELEMENT_COPY(*pindef_list, *npin, pindef) < 0) {
|
if (VIR_APPEND_ELEMENT_COPY(*pindef_list, *npin, pindef) < 0) {
|
||||||
virBitmapFree(pindef->cpumask);
|
virBitmapFree(pindef->cpumask);
|
||||||
VIR_FREE(pindef);
|
VIR_FREE(pindef);
|
||||||
@ -4699,7 +4699,7 @@ qemuDomainHotplugAddPin(virBitmapPtr cpumask,
|
|||||||
|
|
||||||
static int
|
static int
|
||||||
qemuDomainHotplugPinThread(virBitmapPtr cpumask,
|
qemuDomainHotplugPinThread(virBitmapPtr cpumask,
|
||||||
int index,
|
int idx,
|
||||||
pid_t pid,
|
pid_t pid,
|
||||||
virCgroupPtr cgroup)
|
virCgroupPtr cgroup)
|
||||||
{
|
{
|
||||||
@ -4709,14 +4709,14 @@ qemuDomainHotplugPinThread(virBitmapPtr cpumask,
|
|||||||
if (qemuSetupCgroupCpusetCpus(cgroup, cpumask) < 0) {
|
if (qemuSetupCgroupCpusetCpus(cgroup, cpumask) < 0) {
|
||||||
virReportError(VIR_ERR_OPERATION_INVALID,
|
virReportError(VIR_ERR_OPERATION_INVALID,
|
||||||
_("failed to set cpuset.cpus in cgroup for id %d"),
|
_("failed to set cpuset.cpus in cgroup for id %d"),
|
||||||
index);
|
idx);
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if (virProcessSetAffinity(pid, cpumask) < 0) {
|
if (virProcessSetAffinity(pid, cpumask) < 0) {
|
||||||
virReportError(VIR_ERR_SYSTEM_ERROR,
|
virReportError(VIR_ERR_SYSTEM_ERROR,
|
||||||
_("failed to set cpu affinity for id %d"),
|
_("failed to set cpu affinity for id %d"),
|
||||||
index);
|
idx);
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -4730,12 +4730,12 @@ qemuDomainHotplugPinThread(virBitmapPtr cpumask,
|
|||||||
static int
|
static int
|
||||||
qemuDomainDelCgroupForThread(virCgroupPtr cgroup,
|
qemuDomainDelCgroupForThread(virCgroupPtr cgroup,
|
||||||
virCgroupThreadName nameval,
|
virCgroupThreadName nameval,
|
||||||
int index)
|
int idx)
|
||||||
{
|
{
|
||||||
virCgroupPtr new_cgroup = NULL;
|
virCgroupPtr new_cgroup = NULL;
|
||||||
|
|
||||||
if (cgroup) {
|
if (cgroup) {
|
||||||
if (virCgroupNewThread(cgroup, nameval, index, false, &new_cgroup) < 0)
|
if (virCgroupNewThread(cgroup, nameval, idx, false, &new_cgroup) < 0)
|
||||||
return -1;
|
return -1;
|
||||||
|
|
||||||
/* Remove the offlined cgroup */
|
/* Remove the offlined cgroup */
|
||||||
|
Loading…
Reference in New Issue
Block a user