提交 5b62a951 编写于 作者: J Jiri Denemark

cpu: Properly report errors when parsing CPU map XML

Signed-off-by: NJiri Denemark <jdenemar@redhat.com>
上级 17924643
......@@ -105,17 +105,8 @@ int cpuMapLoad(const char *arch,
goto cleanup;
}
if ((xml = xmlParseFile(mapfile)) == NULL) {
virReportError(VIR_ERR_INTERNAL_ERROR,
_("cannot parse CPU map file: %s"),
mapfile);
if (!(xml = virXMLParseFileCtxt(mapfile, &ctxt)))
goto cleanup;
}
if ((ctxt = xmlXPathNewContext(xml)) == NULL) {
virReportOOMError();
goto cleanup;
}
virBufferAsprintf(&buf, "./arch[@name='%s']", arch);
if (virBufferCheckError(&buf) < 0)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册