Re: [PATCH 02/50] list: Expose pool type via virStoragePoolGetInfo

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

 



On Fri, Jul 20, 2012 at 00:40:33 +0800, Osier Yang wrote:
> Mainly for later patches' use, to filter the pools by pool type.
> 
> include/libvirt/libvirt.h.in: Add enum virStoragePoolType; Add
> pool type to virStoragePoolInfo.
> 
> src/conf/storage_conf.h: Remove enum virStoragePoolType.
> 
> src/storage/storage_driver.c: Expose pool type via storagePoolGetInfo.
> ---
>  include/libvirt/libvirt.h.in |   17 +++++++++++++++++
>  src/conf/storage_conf.h      |   19 -------------------
>  src/storage/storage_driver.c |    2 ++
>  3 files changed, 19 insertions(+), 19 deletions(-)
> 
> diff --git a/include/libvirt/libvirt.h.in b/include/libvirt/libvirt.h.in
> index e34438c..2820b2a 100644
> --- a/include/libvirt/libvirt.h.in
> +++ b/include/libvirt/libvirt.h.in
> @@ -2335,6 +2335,22 @@ typedef struct _virStoragePool virStoragePool;
>   */
>  typedef virStoragePool *virStoragePoolPtr;
>  
> +typedef enum {
> +    VIR_STORAGE_POOL_DIR,      /* Local directory */
> +    VIR_STORAGE_POOL_FS,       /* Local filesystem */
> +    VIR_STORAGE_POOL_NETFS,    /* Networked filesystem - eg NFS, GFS, etc */
> +    VIR_STORAGE_POOL_LOGICAL,  /* Logical volume groups / volumes */
> +    VIR_STORAGE_POOL_DISK,     /* Disk partitions */
> +    VIR_STORAGE_POOL_ISCSI,    /* iSCSI targets */
> +    VIR_STORAGE_POOL_SCSI,     /* SCSI HBA */
> +    VIR_STORAGE_POOL_MPATH,    /* Multipath devices */
> +    VIR_STORAGE_POOL_RBD,      /* RADOS Block Device */
> +    VIR_STORAGE_POOL_SHEEPDOG, /* Sheepdog device */
> +
> +#ifdef VIR_ENUM_SENTINELS
> +    VIR_STORAGE_POOL_LAST,
> +#endif
> +} virStoragePoolType;
>  
>  typedef enum {
>      VIR_STORAGE_POOL_INACTIVE = 0, /* Not running */
> @@ -2365,6 +2381,7 @@ typedef enum {
>  typedef struct _virStoragePoolInfo virStoragePoolInfo;
>  
>  struct _virStoragePoolInfo {
> +  int type;                      /* virStoragePoolType */
>    int state;                     /* virStoragePoolState flags */
>    unsigned long long capacity;   /* Logical size bytes */
>    unsigned long long allocation; /* Current allocation bytes */

Oops, you can't change public structs. Any combination of an app and libvirt
library that would not have the same definition of this struct would fail.

Jirka

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