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

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

 



On 11/29/2011 08:44 AM, Daniel P. Berrange wrote:
> From: "Daniel P. Berrange" <berrange@xxxxxxxxxx>
> 
> 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@xxxxxxxxxx    +1-919-301-3266
Libvirt virtualization library http://libvirt.org

Attachment: signature.asc
Description: OpenPGP digital signature

--
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]