Re: [libvirt-php] add flags support to virStorageVolCreateXML

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

 



On 28.01.2016 15:46, Vasiliy Tolstov wrote:
> Signed-off-by: Vasiliy Tolstov <v.tolstov@xxxxxxxxx>
> ---
>  src/libvirt-php.c | 8 ++++++--
>  1 file changed, 6 insertions(+), 2 deletions(-)
> 
> diff --git a/src/libvirt-php.c b/src/libvirt-php.c
> index f3b3f9f81e6d..a0c960957edc 100644
> --- a/src/libvirt-php.c
> +++ b/src/libvirt-php.c
> @@ -1238,6 +1238,8 @@ PHP_MINIT_FUNCTION(libvirt)
>      REGISTER_LONG_CONSTANT("VIR_STORAGE_VOL_RESIZE_ALLOCATE",        1, CONST_CS | CONST_PERSISTENT);
>      REGISTER_LONG_CONSTANT("VIR_STORAGE_VOL_RESIZE_DELTA",           2, CONST_CS | CONST_PERSISTENT);
>      REGISTER_LONG_CONSTANT("VIR_STORAGE_VOL_RESIZE_SHRINK",          4, CONST_CS | CONST_PERSISTENT);
> +    REGISTER_LONG_CONSTANT("VIR_STORAGE_VOL_CREATE_PREALLOC_METADATA", VIR_STORAGE_VOL_CREATE_PREALLOC_METADATA, CONST_CS | CONST_PERSISTENT);
> +    REGISTER_LONG_CONSTANT("VIR_STORAGE_VOL_CREATE_REFLINK", VIR_STORAGE_VOL_CREATE_REFLINK, CONST_CS | CONST_PERSISTENT);
>  
>      /* Domain vCPU flags */
>      REGISTER_LONG_CONSTANT("VIR_DOMAIN_VCPU_CONFIG",    VIR_DOMAIN_VCPU_CONFIG, CONST_CS | CONST_PERSISTENT);
> @@ -7105,6 +7107,7 @@ PHP_FUNCTION(libvirt_storagevolume_get_xml_desc)
>   * Description:     Function is used to create the new storage pool and return the handle to new storage pool
>   * Arguments:       @res [resource]: libvirt storagepool resource
>   *                  @xml [string]: XML string to create the storage volume in the storage pool
> + *                  @flags [int]: virStorageVolCreateXML flags
>   * Returns:         libvirt storagevolume resource
>   */
>  PHP_FUNCTION(libvirt_storagevolume_create_xml)
> @@ -7114,11 +7117,12 @@ PHP_FUNCTION(libvirt_storagevolume_create_xml)
>      zval *zpool;
>      virStorageVolPtr volume=NULL;
>      char *xml;
> +    long flags = 0;
>      int xml_len;
>  
> -    GET_STORAGEPOOL_FROM_ARGS("rs",&zpool,&xml,&xml_len);
> +    GET_STORAGEPOOL_FROM_ARGS("rs|l",&zpool,&xml,&xml_len, &flags);
>  
> -    volume=virStorageVolCreateXML(pool->pool,xml,0);
> +    volume=virStorageVolCreateXML(pool->pool, xml, flags);
>      DPRINTF("%s: virStorageVolCreateXML(%p, <xml>, 0) returned %p\n", PHPFUNC, pool->pool, volume);
>      if (volume==NULL) RETURN_FALSE;
>  
> 

ACKed and pushed. Thanks.

Michal

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