提交 58fe995e 编写于 作者: M Matthias Bolte

esx: Make the domain part of the hostname optional

Before the driver assumed that there is always a domain part. That's
not true. Now the domain part is handled as optional.
上级 d6c40aae
...@@ -783,14 +783,17 @@ esxGetHostname(virConnectPtr conn) ...@@ -783,14 +783,17 @@ esxGetHostname(virConnectPtr conn)
} }
if (domainName == NULL || strlen(domainName) < 1) { if (domainName == NULL || strlen(domainName) < 1) {
ESX_ERROR(conn, VIR_ERR_INTERNAL_ERROR, complete = strdup(hostName);
"Missing or empty 'domainName' property");
goto failure;
}
if (virAsprintf(&complete, "%s.%s", hostName, domainName) < 0) { if (complete == NULL) {
virReportOOMError(conn); virReportOOMError(conn);
goto failure; goto failure;
}
} else {
if (virAsprintf(&complete, "%s.%s", hostName, domainName) < 0) {
virReportOOMError(conn);
goto failure;
}
} }
cleanup: cleanup:
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册