]> xenbits.xensource.com Git - libvirt.git/commitdiff
virDomainVideoDriverDefParseXML: Allow zero value for @vgaconf
authorMichal Privoznik <mprivozn@redhat.com>
Wed, 5 May 2021 09:18:58 +0000 (11:18 +0200)
committerMichal Privoznik <mprivozn@redhat.com>
Thu, 6 May 2021 07:10:30 +0000 (09:10 +0200)
It was always allowed, but in a very unusual and weird way. Just
look at the original commit that introduced it (78fc843c7b5).
Also, we document that "io" value is accepted (which translates
to VIR_DOMAIN_VIDEO_VGACONF_IO with value of zero).

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
src/conf/domain_conf.c

index 3319cb49cf985c867f843c6cd948ec366ec47259..77105e6a07b89c1a7798ccbefeaa3f7030d2fc28 100644 (file)
@@ -14326,7 +14326,7 @@ virDomainVideoDriverDefParseXML(xmlNodePtr node,
 
     if (virXMLPropEnum(driver, "vgaconf",
                        virDomainVideoVGAConfTypeFromString,
-                       VIR_XML_PROP_NONZERO, &def->vgaconf) < 0)
+                       VIR_XML_PROP_NONE, &def->vgaconf) < 0)
         return NULL;
 
     return g_steal_pointer(&def);