]> xenbits.xensource.com Git - libvirt.git/commit
conf: Refactor storage of guest capabilities
authorPeter Krempa <pkrempa@redhat.com>
Wed, 23 Oct 2019 15:04:20 +0000 (17:04 +0200)
committerPeter Krempa <pkrempa@redhat.com>
Wed, 13 Nov 2019 07:16:04 +0000 (08:16 +0100)
commit7a6e7bad1cb7800411ad368a69360fa667a703b1
tree29c21909c05c8897ef16e9da1baedd44259f55e7
parent2936a7517e6fc435e54dffb06ec29b745f773bfe
conf: Refactor storage of guest capabilities

The capabilities are declared in the XML schema so passing feature names
as strings from hypervisor drivers makes no sense.

Additionally some of the features expose so called 'toggles' while
others not. This knowledge was encoded by a bunch of 'STREQ's in the
formatter.

Change all of this by declaring the features as an enum and use it
instead of a dynamically allocated array.

Presence of 'toggles' is encoded together with the conversion strings
rather than in the formatter directly.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
src/conf/capabilities.c
src/conf/capabilities.h
tests/qemucaps2xmloutdata/caps.aarch64.xml
tests/qemucaps2xmloutdata/caps.x86_64.xml