提交 a20e8bca 编写于 作者: M Martin Kletzander

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: NMartin Kletzander <mkletzan@redhat.com>
上级 87ee7051
......@@ -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(&params, &nparams, &maxparams,
VIR_DOMAIN_BLOCK_IOTUNE_GROUP_NAME,
group_name) < 0)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册