提交 b7eb4b93 编写于 作者: J John Ferlan

openvz: Add more descriptive error message on Find failure

If openvzDomainLookupByID or openvzDomainLookupByName fails
to find a vm, let's be a bit more descriptive by providing
the failing id or name in the error message.
Signed-off-by: NJohn Ferlan <jferlan@redhat.com>
Reviewed-by: NJim Fehlig <jfehlig@suse.com>
上级 e5d682c0
......@@ -351,7 +351,8 @@ static virDomainPtr openvzDomainLookupByID(virConnectPtr conn,
openvzDriverUnlock(driver);
if (!vm) {
virReportError(VIR_ERR_NO_DOMAIN, NULL);
virReportError(VIR_ERR_NO_DOMAIN,
_("no domain with matching id '%d'"), id);
goto cleanup;
}
......@@ -425,7 +426,8 @@ static virDomainPtr openvzDomainLookupByName(virConnectPtr conn,
openvzDriverUnlock(driver);
if (!vm) {
virReportError(VIR_ERR_NO_DOMAIN, NULL);
virReportError(VIR_ERR_NO_DOMAIN,
_("no domain with matching name '%s'"), name);
goto cleanup;
}
......@@ -1114,8 +1116,8 @@ openvzDomainCreateWithFlags(virDomainPtr dom, unsigned int flags)
openvzDriverUnlock(driver);
if (!vm) {
virReportError(VIR_ERR_NO_DOMAIN, "%s",
_("no domain with matching id"));
virReportError(VIR_ERR_NO_DOMAIN,
_("no domain with matching name '%s'"), dom->name);
goto cleanup;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册