]> git.ipfire.org Git - thirdparty/libvirt.git/commit
domain_conf: Fix str2enum translation of video driver name
authorMichal Privoznik <mprivozn@redhat.com>
Wed, 25 Sep 2019 07:54:49 +0000 (09:54 +0200)
committerMichal Privoznik <mprivozn@redhat.com>
Wed, 25 Sep 2019 08:02:12 +0000 (10:02 +0200)
commit20cc7f9e8a3324a4ba7dcd126a656386ea212b29
treec08d87afec80c0190d2ace17911e6f1ea27adc75
parentfdff7294d14d4e4b8402add3ba81c9f2e7bfca3a
domain_conf: Fix str2enum translation of video driver name

In bc1e924cf0d we've introduced video driver name and whilst
doing so we've utilized VIR_ENUM_IMPL() macro. Then, in domain
XML parsing code the generated
virDomainVideoBackendTypeFromString() is called and its return
value is assigned directly to an unsigned int variable which is
wrong. Also, the video driver enum has 'default' value which is
not formatted into domain XML but is accepted during parsing.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
src/conf/domain_conf.c
src/conf/domain_conf.h