mirror of https://gitee.com/openkylin/libvirt.git
virDomainVideoDefParseXML: Fix parsing of 'backend'
Commit 8391cfbc2d
converted the code to use virXMLPropEnum unfaithfully
ommitting the check where 'backend' must be non-zero when parsed from the
user.
Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
This commit is contained in:
parent
0bcd3eecbf
commit
26cbc01bfc
|
@ -14257,7 +14257,7 @@ virDomainVideoDefParseXML(virDomainXMLOption *xmlopt,
|
|||
if ((driver = virXPathNode("./driver", ctxt))) {
|
||||
if (virXMLPropEnum(driver, "name",
|
||||
virDomainVideoBackendTypeFromString,
|
||||
VIR_XML_PROP_NONE, &def->backend) < 0)
|
||||
VIR_XML_PROP_NONZERO, &def->backend) < 0)
|
||||
return NULL;
|
||||
if (virDomainVirtioOptionsParseXML(driver, &def->virtio) < 0)
|
||||
return NULL;
|
||||
|
|
Loading…
Reference in New Issue