[libvirt] [PATCH 01/14] Fix values of PM target type constants

Daniel P. Berrange berrange at redhat.com
Tue Nov 29 15:44:36 UTC 2011


From: "Daniel P. Berrange" <berrange at redhat.com>

The VIR_NODE_SUSPEND_TARGET constants are not flags, so they
should just be assigned straightforward incrementing values.

* include/libvirt/libvirt.h.in: Change VIR_NODE_SUSPEND_TARGET
  values
---
 include/libvirt/libvirt.h.in |    9 ++++++---
 1 files changed, 6 insertions(+), 3 deletions(-)

diff --git a/include/libvirt/libvirt.h.in b/include/libvirt/libvirt.h.in
index f8ca5cf..f32b197 100644
--- a/include/libvirt/libvirt.h.in
+++ b/include/libvirt/libvirt.h.in
@@ -257,9 +257,12 @@ typedef enum {
  * transitioned to.
  */
 typedef enum {
-    VIR_NODE_SUSPEND_TARGET_MEM     = (1 << 0),
-    VIR_NODE_SUSPEND_TARGET_DISK    = (1 << 1),
-    VIR_NODE_SUSPEND_TARGET_HYBRID  = (1 << 2),
+    VIR_NODE_SUSPEND_TARGET_MEM     = 0,
+    VIR_NODE_SUSPEND_TARGET_DISK    = 1,
+    VIR_NODE_SUSPEND_TARGET_HYBRID  = 2,
+
+    /* This constant is subject to change */
+    VIR_NODE_SUSPEND_TARGET_LAST,
 } virNodeSuspendTarget;
 
 /**
-- 
1.7.6.4




More information about the libvir-list mailing list