mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-01-15 00:55:17 +00:00
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:
parent
422cf16079
commit
49991b74d9
@ -17062,7 +17062,6 @@ virDomainDefParseBootOptions(virDomainDefPtr def,
|
|||||||
virHashTablePtr *bootHash)
|
virHashTablePtr *bootHash)
|
||||||
{
|
{
|
||||||
xmlNodePtr *nodes = NULL;
|
xmlNodePtr *nodes = NULL;
|
||||||
xmlNodePtr oldnode;
|
|
||||||
char *tmp = NULL;
|
char *tmp = NULL;
|
||||||
char *name = NULL;
|
char *name = NULL;
|
||||||
int ret = -1;
|
int ret = -1;
|
||||||
@ -17169,8 +17168,6 @@ virDomainDefParseBootOptions(virDomainDefPtr def,
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (n == 1) {
|
if (n == 1) {
|
||||||
oldnode = ctxt->node;
|
|
||||||
ctxt->node = nodes[0];
|
|
||||||
tmp = virXMLPropString(nodes[0], "type");
|
tmp = virXMLPropString(nodes[0], "type");
|
||||||
|
|
||||||
if (!tmp) {
|
if (!tmp) {
|
||||||
@ -17181,7 +17178,7 @@ virDomainDefParseBootOptions(virDomainDefPtr def,
|
|||||||
|
|
||||||
if (STREQ_NULLABLE(tmp, "slic")) {
|
if (STREQ_NULLABLE(tmp, "slic")) {
|
||||||
VIR_FREE(tmp);
|
VIR_FREE(tmp);
|
||||||
tmp = virXPathString("string(.)", ctxt);
|
tmp = virXMLNodeContentString(nodes[0]);
|
||||||
def->os.slic_table = virFileSanitizePath(tmp);
|
def->os.slic_table = virFileSanitizePath(tmp);
|
||||||
VIR_FREE(tmp);
|
VIR_FREE(tmp);
|
||||||
} else {
|
} else {
|
||||||
@ -17190,7 +17187,6 @@ virDomainDefParseBootOptions(virDomainDefPtr def,
|
|||||||
tmp);
|
tmp);
|
||||||
goto error;
|
goto error;
|
||||||
}
|
}
|
||||||
ctxt->node = oldnode;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (virDomainDefParseBootXML(ctxt, def) < 0)
|
if (virDomainDefParseBootXML(ctxt, def) < 0)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user