]> xenbits.xensource.com Git - people/liuw/libxenctrl-split/libvirt.git/commitdiff
Move the virHostPMCapability enum helpers into capabilities.c
authorDaniel P. Berrange <berrange@redhat.com>
Tue, 29 Nov 2011 14:22:21 +0000 (14:22 +0000)
committerDaniel P. Berrange <berrange@redhat.com>
Wed, 30 Nov 2011 10:12:29 +0000 (10:12 +0000)
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

src/conf/capabilities.c
src/util/util.h

index ecb1dcd8fe78706ab29a5f911d67e8cf49d9c68f..df5ff2316081cbf012ac72316cd8726633b55aae 100644 (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");
index 690fca0c7ad5110c4a021606633a7bae0352bff0..204e2b9af332d8d78f0440da558944d848dbb335 100644 (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);