提交 c1a75828 编写于 作者: M Michal Privoznik

virCommandWait: Propagate dryRunCallback return value properly

The documentation to virCommandWait() function states that if
@exitstatus is NULL and command finished with error -1 is
returned. In other words, if @dryRunCallback is set and returns
an error (by setting its @status argument to a nonzero value) we
must propagate this error properly honouring the documentation
(and also regular run).
Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
Reviewed-by: NJohn Ferlan <jferlan@redhat.com>
上级 adfcbdff
......@@ -2542,6 +2542,8 @@ virCommandWait(virCommandPtr cmd, int *exitstatus)
dryRunStatus);
if (exitstatus)
*exitstatus = dryRunStatus;
else if (dryRunStatus)
return -1;
return 0;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册