[Libvirt-cim] [PATCH] get_disk_pool() is only valid for newer versions of libvirt

Richard Maciel rmaciel at linux.vnet.ibm.com
Wed Sep 9 13:54:42 UTC 2009


On 09/04/2009 05:49 PM, Kaitlin Rupert wrote:
> # HG changeset patch
> # User Kaitlin Rupert<karupert at us.ibm.com>
> # Date 1252098766 25200
> # Node ID 2b627ddf93c9d303b87fd186a6d6334465a9a14c
> # Parent  23572a8bc37d425291732467773f46224f640b72
> get_disk_pool() is only valid for newer versions of libvirt
>
> This patches fixes a compile issue with older versions of libvirt.
>
> diff -r 23572a8bc37d -r 2b627ddf93c9 src/Virt_DevicePool.h
> --- a/src/Virt_DevicePool.h	Thu Sep 03 16:42:54 2009 -0700
> +++ b/src/Virt_DevicePool.h	Fri Sep 04 14:12:46 2009 -0700
> @@ -28,6 +28,12 @@
>
>   #include "pool_parsing.h"
>
> +#if LIBVIR_VERSION_NUMBER>  4000
> +# define VIR_USE_LIBVIRT_STORAGE 1
> +#else
> +# define VIR_USE_LIBVIRT_STORAGE 0
> +#endif
> +
>   /**
>    * Get the InstanceID of a pool that a given RASD id (for type) is in
>    *
> @@ -135,6 +141,7 @@
>                                     uint16_t type,
>                                     CMPIStatus *status);
>
> +#if VIR_USE_LIBVIRT_STORAGE
>   /**
>    * Get the configuration settings of a given storage pool
>    *
> @@ -143,6 +150,7 @@
>    * @returns An int that indicates whether the function was successful
>    */
>   int get_disk_pool(virStoragePoolPtr poolptr, struct virt_pool **pool);
> +#endif

Duplicated #endif?

>
>   #endif
>
>
> _______________________________________________
> Libvirt-cim mailing list
> Libvirt-cim at redhat.com
> https://www.redhat.com/mailman/listinfo/libvirt-cim


-- 
Richard Maciel, MSc
IBM Linux Technology Center
rmaciel at linux.vnet.ibm.com




More information about the Libvirt-cim mailing list