1
0
mirror of https://gitlab.com/libvirt/libvirt.git synced 2024-12-25 01:34:11 +03:00

Move the virHostPMCapability enum helpers into capabilities.c

The virHostPMCapability enum helper was declared in util.h
but implemented in capabilities.c, which is in a completely
separate library at link time. Move the declaration into the
capabilities.c file and rename it to match normal conventions

* src/util/util.h: Remove virHostPMCapability enum decl
* src/conf/capabilities.c: Add virCapsHostPMTarget enum
This commit is contained in:
Daniel P. Berrange 2011-11-29 14:22:21 +00:00
parent ae5e55289d
commit 6ea25cd975
2 changed files with 3 additions and 4 deletions

View File

@ -36,7 +36,8 @@
#define VIR_FROM_THIS VIR_FROM_CAPABILITIES
VIR_ENUM_IMPL(virHostPMCapability, VIR_NODE_SUSPEND_TARGET_LAST,
VIR_ENUM_DECL(virCapsHostPMTarget)
VIR_ENUM_IMPL(virCapsHostPMTarget, VIR_NODE_SUSPEND_TARGET_LAST,
"suspend_mem", "suspend_disk", "suspend_hybrid");
/**
@ -704,7 +705,7 @@ virCapabilitiesFormatXML(virCapsPtr caps)
while (pm) {
int bit = ffs(pm) - 1;
virBufferAsprintf(&xml, " <%s/>\n",
virHostPMCapabilityTypeToString(bit));
virCapsHostPMTargetTypeToString(bit));
pm &= ~(1U << bit);
}
virBufferAddLit(&xml, " </power_management>\n");

View File

@ -263,8 +263,6 @@ void virTypedParameterArrayClear(virTypedParameterPtr params, int nparams);
/* Power Management Capabilities of the host system */
VIR_ENUM_DECL(virHostPMCapability)
int virDiscoverHostPMFeature(unsigned int *bitmask, unsigned int feature);
int virGetPMCapabilities(unsigned int *bitmask);