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:
Peter Krempa 2021-05-06 17:02:50 +02:00
parent 0bcd3eecbf
commit 26cbc01bfc

View File

@ -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;