conf: capabilities: Refactor API for setting guest capability features

Remove the need to pass around strings and switch to the enum values
instead.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
This commit is contained in:
Peter Krempa
2019-11-12 13:57:23 +01:00
parent 7a6e7bad1c
commit 9a2ca9c947
7 changed files with 77 additions and 97 deletions

View File

@@ -110,8 +110,7 @@ testQemuAddI686Guest(virCapsPtr caps)
machines)))
goto error;
if (!virCapabilitiesAddGuestFeature(guest, "cpuselection", true, false))
goto error;
virCapabilitiesAddGuestFeature(guest, VIR_CAPS_GUEST_FEATURE_TYPE_CPUSELECTION);
machines = NULL;
@@ -161,8 +160,7 @@ testQemuAddX86_64Guest(virCapsPtr caps)
machines)))
goto error;
if (!virCapabilitiesAddGuestFeature(guest, "cpuselection", true, false))
goto error;
virCapabilitiesAddGuestFeature(guest, VIR_CAPS_GUEST_FEATURE_TYPE_CPUSELECTION);
machines = NULL;