mirror of
https://github.com/libvirt/libvirt.git
synced 2026-10-02 12:20:06 -05:00
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:
1 parent
d1527ba5d7
commit
2a3a725c33
1 file changed
+1
-1
@@ -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 == '-') {
|
||||
|
||||
Reference in new issue
Block a user