提交 9bf5246f 编写于 作者: M Matthias Bolte

esx: Fix error reporting in esxVI_LookupManagedObjectHelper

As the name parameter can be NULL the error message can only contain it
conditionally.
上级 ec04914c
......@@ -5140,8 +5140,14 @@ esxVI_LookupManagedObjectHelper(esxVI_Context *ctx,
if (candidate == NULL) {
if (occurrence != esxVI_Occurrence_OptionalItem) {
virReportError(VIR_ERR_INTERNAL_ERROR,
_("Could not find %s with name '%s'"), type, name);
if (name != NULL) {
virReportError(VIR_ERR_INTERNAL_ERROR,
_("Could not find %s with name '%s'"), type, name);
} else {
virReportError(VIR_ERR_INTERNAL_ERROR,
_("Could not find %s"), type);
}
goto cleanup;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册