mirror of https://gitee.com/openkylin/libvirt.git
virsh: Fix regression of vol-resize
Introduced by commit 1daa4ba33a
. vshCommandOptStringReq returns
0 on *success* or the option is not required && not present, both
are right result. Error out when returning 0 is not correct.
the caller, it doesn't have to check wether it
This commit is contained in:
parent
d1527ba5d7
commit
2a3a725c33
|
@ -1076,7 +1076,7 @@ cmdVolResize(vshControl *ctl, const vshCmd *cmd)
|
|||
if (!(vol = vshCommandOptVol(ctl, cmd, "vol", "pool", NULL)))
|
||||
return false;
|
||||
|
||||
if (vshCommandOptStringReq(ctl, cmd, "capacity", &capacityStr) <= 0)
|
||||
if (vshCommandOptStringReq(ctl, cmd, "capacity", &capacityStr) < 0)
|
||||
goto cleanup;
|
||||
virSkipSpaces(&capacityStr);
|
||||
if (*capacityStr == '-') {
|
||||
|
|
Loading…
Reference in New Issue