提交 23b9502b 编写于 作者: P Peter Krempa

conf: Improve error messages if parsing of vCPU count fails

上级 c58e1f4d
......@@ -9087,7 +9087,7 @@ static virDomainDefPtr virDomainDefParseXML(virCapsPtr caps,
def->maxvcpus = count;
if (count == 0 || (unsigned short) count != count) {
virReportError(VIR_ERR_XML_ERROR,
_("invalid maxvcpus %lu"), count);
_("invalid maximum number of vCPUs '%lu'"), count);
goto error;
}
}
......@@ -9103,13 +9103,14 @@ static virDomainDefPtr virDomainDefParseXML(virCapsPtr caps,
def->vcpus = count;
if (count == 0 || (unsigned short) count != count) {
virReportError(VIR_ERR_XML_ERROR,
_("invalid current vcpus %lu"), count);
_("invalid current number of vCPUs '%lu'"), count);
goto error;
}
if (def->maxvcpus < count) {
virReportError(VIR_ERR_INTERNAL_ERROR,
_("maxvcpus must not be less than current vcpus (%d < %lu)"),
_("maxvcpus must not be less than current vcpus "
"(%d < %lu)"),
def->maxvcpus, count);
goto error;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册