mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-09-09 09:14:57 +00:00
virsh: fix setting weight and device-weights at the same time
When setting both blkio weight and device-weights at the same time, the weight is lost. Fix it.
This commit is contained in:
parent
55ecc49bbc
commit
7e976db4ea
@ -4788,14 +4788,14 @@ cmdBlkiotune(vshControl * ctl, const vshCmd * cmd)
|
|||||||
if (!virStrcpy(temp->field, VIR_DOMAIN_BLKIO_WEIGHT,
|
if (!virStrcpy(temp->field, VIR_DOMAIN_BLKIO_WEIGHT,
|
||||||
sizeof(temp->field)))
|
sizeof(temp->field)))
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
}
|
weight = 0;
|
||||||
|
} else if (device_weight) {
|
||||||
if (device_weight) {
|
|
||||||
temp->value.s = vshStrdup(ctl, device_weight);
|
temp->value.s = vshStrdup(ctl, device_weight);
|
||||||
temp->type = VIR_TYPED_PARAM_STRING;
|
temp->type = VIR_TYPED_PARAM_STRING;
|
||||||
if (!virStrcpy(temp->field, VIR_DOMAIN_BLKIO_DEVICE_WEIGHT,
|
if (!virStrcpy(temp->field, VIR_DOMAIN_BLKIO_DEVICE_WEIGHT,
|
||||||
sizeof(temp->field)))
|
sizeof(temp->field)))
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
|
device_weight = NULL;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user