mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-12-22 17:34:18 +03:00
storage_conf: Use xmlStrEqual instead of STREQ
And improve the error message
This commit is contained in:
parent
7ae5999fa3
commit
0175f03cde
@ -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;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user