From 041dfc2b7d493a82f568ff54f670e29b9144c97f Mon Sep 17 00:00:00 2001 From: Martin Kletzander Date: Thu, 13 Oct 2016 09:56:14 +0200 Subject: [PATCH] conf: Honour flags in virDomainPanicDefParseXML Without them we're keeping even for inactive XML. Signed-off-by: Martin Kletzander --- src/conf/domain_conf.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c index 0deeb6d06c..93b34e050a 100644 --- a/src/conf/domain_conf.c +++ b/src/conf/domain_conf.c @@ -10692,7 +10692,8 @@ virDomainTPMDefParseXML(xmlNodePtr node, } static virDomainPanicDefPtr -virDomainPanicDefParseXML(xmlNodePtr node) +virDomainPanicDefParseXML(xmlNodePtr node, + unsigned int flags) { virDomainPanicDefPtr panic; char *model = NULL; @@ -10700,7 +10701,7 @@ virDomainPanicDefParseXML(xmlNodePtr node) if (VIR_ALLOC(panic) < 0) return NULL; - if (virDomainDeviceInfoParseXML(node, NULL, &panic->info, 0) < 0) + if (virDomainDeviceInfoParseXML(node, NULL, &panic->info, flags) < 0) goto error; model = virXMLPropString(node, "model"); @@ -13592,7 +13593,7 @@ virDomainDeviceDefParse(const char *xmlStr, goto error; break; case VIR_DOMAIN_DEVICE_PANIC: - if (!(dev->data.panic = virDomainPanicDefParseXML(node))) + if (!(dev->data.panic = virDomainPanicDefParseXML(node, flags))) goto error; break; case VIR_DOMAIN_DEVICE_MEMORY: @@ -17545,8 +17546,7 @@ virDomainDefParseXML(xmlDocPtr xml, if (n && VIR_ALLOC_N(def->panics, n) < 0) goto error; for (i = 0; i < n; i++) { - virDomainPanicDefPtr panic = - virDomainPanicDefParseXML(nodes[i]); + virDomainPanicDefPtr panic = virDomainPanicDefParseXML(nodes[i], flags); if (!panic) goto error; -- GitLab