mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-03-07 17:28:15 +00:00
virsh: Print error if specified bandwidth is invalid for blockjob
It's strange that the command fails but without any error if one specifies as not a number.
This commit is contained in:
parent
9f5afc732c
commit
dba7086fc3
@ -5209,8 +5209,10 @@ blockJobImpl(vshControl *ctl, const vshCmd *cmd,
|
|||||||
if (vshCommandOptString(cmd, "path", &path) < 0)
|
if (vshCommandOptString(cmd, "path", &path) < 0)
|
||||||
goto out;
|
goto out;
|
||||||
|
|
||||||
if (vshCommandOptUL(cmd, "bandwidth", &bandwidth) < 0)
|
if (vshCommandOptUL(cmd, "bandwidth", &bandwidth) < 0) {
|
||||||
|
vshError(ctl, "%s", _("bandwidth must be a number"));
|
||||||
goto out;
|
goto out;
|
||||||
|
}
|
||||||
|
|
||||||
if (mode == VSH_CMD_BLOCK_JOB_ABORT)
|
if (mode == VSH_CMD_BLOCK_JOB_ABORT)
|
||||||
ret = virDomainBlockJobAbort(dom, path, 0);
|
ret = virDomainBlockJobAbort(dom, path, 0);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user