提交 d6917156 编写于 作者: H Hu Tao 提交者: Eric Blake

Make virDomainObjParseNode() static

Make virDomainObjParseNode() static since it is called only
in one file.
上级 78ba748e
......@@ -6081,24 +6081,10 @@ cleanup:
}
virDomainObjPtr virDomainObjParseFile(virCapsPtr caps,
const char *filename)
{
xmlDocPtr xml;
virDomainObjPtr obj = NULL;
if ((xml = virXMLParseFile(filename))) {
obj = virDomainObjParseNode(caps, xml, xmlDocGetRootElement(xml));
xmlFreeDoc(xml);
}
return obj;
}
virDomainObjPtr virDomainObjParseNode(virCapsPtr caps,
xmlDocPtr xml,
xmlNodePtr root)
static virDomainObjPtr
virDomainObjParseNode(virCapsPtr caps,
xmlDocPtr xml,
xmlNodePtr root)
{
xmlXPathContextPtr ctxt = NULL;
virDomainObjPtr obj = NULL;
......@@ -6123,6 +6109,22 @@ cleanup:
return obj;
}
virDomainObjPtr virDomainObjParseFile(virCapsPtr caps,
const char *filename)
{
xmlDocPtr xml;
virDomainObjPtr obj = NULL;
if ((xml = virXMLParseFile(filename))) {
obj = virDomainObjParseNode(caps, xml, xmlDocGetRootElement(xml));
xmlFreeDoc(xml);
}
return obj;
}
static int virDomainDefMaybeAddController(virDomainDefPtr def,
int type,
int idx)
......
......@@ -1246,9 +1246,6 @@ virDomainDefPtr virDomainDefParseNode(virCapsPtr caps,
virDomainObjPtr virDomainObjParseFile(virCapsPtr caps,
const char *filename);
virDomainObjPtr virDomainObjParseNode(virCapsPtr caps,
xmlDocPtr xml,
xmlNodePtr root);
int virDomainDefAddImplicitControllers(virDomainDefPtr def);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册