mirror of
https://github.com/libvirt/libvirt.git
synced 2025-02-25 18:55:26 -06:00
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>
This commit is contained in:
@@ -17,10 +17,10 @@
|
||||
<domain type='kvm'/>
|
||||
</arch>
|
||||
<features>
|
||||
<acpi default='on' toggle='yes'/>
|
||||
<cpuselection/>
|
||||
<deviceboot/>
|
||||
<disksnapshot default='on' toggle='no'/>
|
||||
<acpi default='on' toggle='yes'/>
|
||||
</features>
|
||||
</guest>
|
||||
|
||||
|
||||
@@ -17,11 +17,11 @@
|
||||
<domain type='kvm'/>
|
||||
</arch>
|
||||
<features>
|
||||
<acpi default='on' toggle='yes'/>
|
||||
<apic default='on' toggle='no'/>
|
||||
<cpuselection/>
|
||||
<deviceboot/>
|
||||
<disksnapshot default='on' toggle='no'/>
|
||||
<acpi default='on' toggle='yes'/>
|
||||
<apic default='on' toggle='no'/>
|
||||
</features>
|
||||
</guest>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user