]> git.ipfire.org Git - thirdparty/libvirt.git/commit
conf: Make net model enum compare case insensitive
authorCole Robinson <crobinso@redhat.com>
Wed, 13 Mar 2019 15:02:41 +0000 (11:02 -0400)
committerCole Robinson <crobinso@redhat.com>
Tue, 16 Apr 2019 17:11:08 +0000 (13:11 -0400)
commit79c8bc7d6e460cff7fdc30186bf1d99f1c902121
treeaaa5dff2c33e82300080c7615d1c1a2db9b76442
parent41b002f934a22a6875a9bda3e41fca40029c4f3e
conf: Make net model enum compare case insensitive

vbox and vmx drivers do net case insensitive net model comparisons,
so for example 'VMXNET3' and 'vmxnet3' and 'VmxNeT3' in the XML will
translate to the same driver configuration. To convert these drivers
to use net model enum, we will need to do case insensitive comparisons
as well.

Essentially we implement virEnumToString, but with case insensitive
comparison. XML will always be formatted with the enum model string
we track internally, but we will accept any case insensitive variant.

Acked-by: Michal Privoznik <mprivozn@redhat.com>
Signed-off-by: Cole Robinson <crobinso@redhat.com>
src/conf/domain_conf.c
tests/qemuxml2argvdata/net-many-models.xml