提交 0175f03c 编写于 作者: O Osier Yang

storage_conf: Use xmlStrEqual instead of STREQ

And improve the error message
上级 7ae5999f
......@@ -972,9 +972,11 @@ virStoragePoolDefParseNode(xmlDocPtr xml,
xmlXPathContextPtr ctxt = NULL;
virStoragePoolDefPtr def = NULL;
if (STRNEQ((const char *)root->name, "pool")) {
if (!xmlStrEqual(root->name, BAD_CAST "pool")) {
virReportError(VIR_ERR_XML_ERROR,
"%s", _("unknown root element for storage pool"));
_("unexpected root element <%s>, "
"expecting <pool>"),
root->name);
goto cleanup;
}
......@@ -1350,9 +1352,11 @@ virStorageVolDefParseNode(virStoragePoolDefPtr pool,
xmlXPathContextPtr ctxt = NULL;
virStorageVolDefPtr def = NULL;
if (STRNEQ((const char *)root->name, "volume")) {
if (!xmlStrEqual(root->name, BAD_CAST "volume")) {
virReportError(VIR_ERR_XML_ERROR,
"%s", _("unknown root element for storage vol"));
_("unexpected root element <%s>, "
"expecting <volume>"),
root->name);
goto cleanup;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册