[PATCH 04/14] Move the virHostPMCapability enum helpers into capabilities.c

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: "Daniel P. Berrange" <berrange@xxxxxxxxxx>

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 enm
---
 src/conf/capabilities.c |    5 +++--
 src/util/util.h         |    2 --
 2 files changed, 3 insertions(+), 4 deletions(-)

diff --git a/src/conf/capabilities.c b/src/conf/capabilities.c
index ecb1dcd..df5ff23 100644
--- a/src/conf/capabilities.c
+++ b/src/conf/capabilities.c
@@ -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");
diff --git a/src/util/util.h b/src/util/util.h
index 690fca0..204e2b9 100644
--- a/src/util/util.h
+++ b/src/util/util.h
@@ -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);
 
-- 
1.7.6.4

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list


[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]