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

Eric Blake eblake at redhat.com
Tue Nov 29 16:11:17 UTC 2011


On 11/29/2011 08:44 AM, Daniel P. Berrange wrote:
> 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,

ACK.  And agree that it is an API-changer, so it must go in now before
we release and solidify the API.

-- 
Eric Blake   eblake at redhat.com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 620 bytes
Desc: OpenPGP digital signature
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20111129/e836b3a6/attachment-0001.sig>


More information about the libvir-list mailing list