1
0
mirror of https://gitlab.com/libvirt/libvirt.git synced 2025-03-07 17:28:15 +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
(cherry picked from commit 2a3a725c33aba2046443d33eb473eb54517f61c8)
This commit is contained in:
Osier Yang 2013-05-24 11:59:14 +08:00 committed by Ján Tomko
parent a413bc2dda
commit 8a7dbdc344

View File

@ -1099,7 +1099,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 == '-') {