conf: Honour flags in virDomainPanicDefParseXML

Without them we're keeping <alias/> even for inactive XML.

Signed-off-by: Martin Kletzander <mkletzan@redhat.com>
This commit is contained in:
Martin Kletzander 2016-10-13 09:56:14 +02:00
parent 88ecc38f03
commit 041dfc2b7d

View File

@ -10692,7 +10692,8 @@ virDomainTPMDefParseXML(xmlNodePtr node,
} }
static virDomainPanicDefPtr static virDomainPanicDefPtr
virDomainPanicDefParseXML(xmlNodePtr node) virDomainPanicDefParseXML(xmlNodePtr node,
unsigned int flags)
{ {
virDomainPanicDefPtr panic; virDomainPanicDefPtr panic;
char *model = NULL; char *model = NULL;
@ -10700,7 +10701,7 @@ virDomainPanicDefParseXML(xmlNodePtr node)
if (VIR_ALLOC(panic) < 0) if (VIR_ALLOC(panic) < 0)
return NULL; return NULL;
if (virDomainDeviceInfoParseXML(node, NULL, &panic->info, 0) < 0) if (virDomainDeviceInfoParseXML(node, NULL, &panic->info, flags) < 0)
goto error; goto error;
model = virXMLPropString(node, "model"); model = virXMLPropString(node, "model");
@ -13592,7 +13593,7 @@ virDomainDeviceDefParse(const char *xmlStr,
goto error; goto error;
break; break;
case VIR_DOMAIN_DEVICE_PANIC: case VIR_DOMAIN_DEVICE_PANIC:
if (!(dev->data.panic = virDomainPanicDefParseXML(node))) if (!(dev->data.panic = virDomainPanicDefParseXML(node, flags)))
goto error; goto error;
break; break;
case VIR_DOMAIN_DEVICE_MEMORY: case VIR_DOMAIN_DEVICE_MEMORY:
@ -17545,8 +17546,7 @@ virDomainDefParseXML(xmlDocPtr xml,
if (n && VIR_ALLOC_N(def->panics, n) < 0) if (n && VIR_ALLOC_N(def->panics, n) < 0)
goto error; goto error;
for (i = 0; i < n; i++) { for (i = 0; i < n; i++) {
virDomainPanicDefPtr panic = virDomainPanicDefPtr panic = virDomainPanicDefParseXML(nodes[i], flags);
virDomainPanicDefParseXML(nodes[i]);
if (!panic) if (!panic)
goto error; goto error;