mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-02-22 11:22:23 +00:00
virsh: Actually make blkdeviotune --group_name work
Function vshCommandOptStringReq() returns -1 on error and 0 on success. The code, however, used the 'group_name' variable only if it returned 1 (never). Signed-off-by: Martin Kletzander <mkletzan@redhat.com>
This commit is contained in:
parent
87ee705183
commit
a20e8bcad5
@ -1398,11 +1398,12 @@ cmdBlkdeviotune(vshControl *ctl, const vshCmd *cmd)
|
||||
VSH_ADD_IOTUNE(write-iops-sec-max-length, WRITE_IOPS_SEC_MAX_LENGTH);
|
||||
#undef VSH_ADD_IOTUNE
|
||||
|
||||
rv = vshCommandOptStringReq(ctl, cmd, "group_name", &group_name);
|
||||
if (rv < 0) {
|
||||
if (vshCommandOptStringReq(ctl, cmd, "group_name", &group_name) < 0) {
|
||||
vshError(ctl, "%s", _("Unable to parse group parameter"));
|
||||
goto cleanup;
|
||||
} else if (rv > 0) {
|
||||
}
|
||||
|
||||
if (group_name) {
|
||||
if (virTypedParamsAddString(¶ms, &nparams, &maxparams,
|
||||
VIR_DOMAIN_BLOCK_IOTUNE_GROUP_NAME,
|
||||
group_name) < 0)
|
||||
|
Loading…
x
Reference in New Issue
Block a user