conf: use virXMLNodeContentString for boot options parsing

Using XPath here doesn't add any benefit.

Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
This commit is contained in:
Pavel Hrdina 2017-08-16 10:28:16 +02:00
parent 422cf16079
commit 49991b74d9

View File

@ -17062,7 +17062,6 @@ virDomainDefParseBootOptions(virDomainDefPtr def,
virHashTablePtr *bootHash)
{
xmlNodePtr *nodes = NULL;
xmlNodePtr oldnode;
char *tmp = NULL;
char *name = NULL;
int ret = -1;
@ -17169,8 +17168,6 @@ virDomainDefParseBootOptions(virDomainDefPtr def,
}
if (n == 1) {
oldnode = ctxt->node;
ctxt->node = nodes[0];
tmp = virXMLPropString(nodes[0], "type");
if (!tmp) {
@ -17181,7 +17178,7 @@ virDomainDefParseBootOptions(virDomainDefPtr def,
if (STREQ_NULLABLE(tmp, "slic")) {
VIR_FREE(tmp);
tmp = virXPathString("string(.)", ctxt);
tmp = virXMLNodeContentString(nodes[0]);
def->os.slic_table = virFileSanitizePath(tmp);
VIR_FREE(tmp);
} else {
@ -17190,7 +17187,6 @@ virDomainDefParseBootOptions(virDomainDefPtr def,
tmp);
goto error;
}
ctxt->node = oldnode;
}
if (virDomainDefParseBootXML(ctxt, def) < 0)