提交 5feb9f94 编写于 作者: M Michal Privoznik

esx: Report error in esxVI_LookupVirtualMachineByName

When reviewing 00d9edfe I've changed proposed patch and
made it to not report error if no domain is found. This is wrong
and the original patch was okay. Thing is, both callers pass
occurrence = OptionalItem so no error message overwriting is done
as I thought initially.
Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
上级 7bdd06b4
......@@ -3014,8 +3014,11 @@ esxVI_LookupVirtualMachineByName(esxVI_Context *ctx, const char *name,
break;
}
if (!(*virtualMachine) && occurrence != esxVI_Occurrence_OptionalItem)
if (!(*virtualMachine) && occurrence != esxVI_Occurrence_OptionalItem) {
virReportError(VIR_ERR_NO_DOMAIN,
_("Could not find domain with name '%s'"), name);
goto cleanup;
}
result = 0;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册