mirror of
https://github.com/libvirt/libvirt.git
synced 2025-02-25 18:55:26 -06: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:
@@ -5209,8 +5209,10 @@ blockJobImpl(vshControl *ctl, const vshCmd *cmd,
|
||||
if (vshCommandOptString(cmd, "path", &path) < 0)
|
||||
goto out;
|
||||
|
||||
if (vshCommandOptUL(cmd, "bandwidth", &bandwidth) < 0)
|
||||
if (vshCommandOptUL(cmd, "bandwidth", &bandwidth) < 0) {
|
||||
vshError(ctl, "%s", _("bandwidth must be a number"));
|
||||
goto out;
|
||||
}
|
||||
|
||||
if (mode == VSH_CMD_BLOCK_JOB_ABORT)
|
||||
ret = virDomainBlockJobAbort(dom, path, 0);
|
||||
|
||||
Reference in New Issue
Block a user