Fix values of PM target type constants

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
* src/util/virnodesuspend.c: Fix suspend target checks
This commit is contained in:
Daniel P. Berrange
2011-11-29 13:58:32 +00:00
parent a001a5e28b
commit 866b0a7069
2 changed files with 9 additions and 6 deletions

View File

@@ -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;
/**