提交 8a7dbdc3 编写于 作者: O Osier Yang 提交者: Ján Tomko

virsh: Fix regression of vol-resize

Introduced by commit 1daa4ba3. 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 2a3a725c)
上级 a413bc2d
......@@ -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 == '-') {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册