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:
Osier Yang 2013-05-24 11:59:14 +08:00
parent d1527ba5d7
commit 2a3a725c33
1 changed files with 1 additions and 1 deletions

View File

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