mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-03-20 07:59:00 +00:00
virsh: Fix regression of vol-resize
Introduced by commit 1daa4ba33acf. 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)))
|
if (!(vol = vshCommandOptVol(ctl, cmd, "vol", "pool", NULL)))
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
if (vshCommandOptStringReq(ctl, cmd, "capacity", &capacityStr) <= 0)
|
if (vshCommandOptStringReq(ctl, cmd, "capacity", &capacityStr) < 0)
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
virSkipSpaces(&capacityStr);
|
virSkipSpaces(&capacityStr);
|
||||||
if (*capacityStr == '-') {
|
if (*capacityStr == '-') {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user