Re: [libvirt] [PATCH 02/20] Secret manipulation step 2: Internal API

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

 



On Sun, Aug 16, 2009 at 10:47:55PM +0200, Miloslav Trmač wrote:
> Adds a new driver type.
[...]
> +++ b/src/datatypes.c
> @@ -109,6 +109,23 @@ virStorageVolFreeName(virStorageVolPtr vol, const char *name ATTRIBUTE_UNUSED)
>  }
>  
>  /**
> + * virSecretFreeName:
> + * @secret_: a secret object
> + *
> + * Destroy the vol object, this is just used by the vol hash callback.

> + * Returns 0 in case of success and -1 in case of failure.


  Hum, comment probably need to be updated, isn't it ?

> + */
> +static void
> +virSecretFreeName(void *secret_, const char *name ATTRIBUTE_UNUSED)
> +{
> +    virSecretPtr secret;
> +
> +    secret = secret_;
> +    virUnrefSecret(secret);
> +}
> +
> +/**
>   * virGetConnect:
>   *
>   * Allocates a new hypervisor connection structure

  datatype.c part looks fine

> diff --git a/src/datatypes.h b/src/datatypes.h
> index da83e02..56c3777 100644
> --- a/src/datatypes.h
> +++ b/src/datatypes.h
[...]
>  
> +typedef virSecretPtr
> +    (*virDrvSecretLookupByUUIDString)        (virConnectPtr conn,
> +                                              const char *uuid);
> +typedef virSecretPtr
> +    (*virDrvSecretDefineXML)                 (virConnectPtr conn,

  the flags should be propagated in the internal drivers APIs

> +typedef char *
> +    (*virDrvSecretGetXMLDesc)                (virSecretPtr secret);
> +typedef int
> +    (*virDrvSecretSetValue)                  (virSecretPtr secret,
> +                                              const unsigned char *value,
   here too

> +typedef unsigned char *
> +    (*virDrvSecretGetValue)                  (virSecretPtr secret,
> +                                              size_t *value_size,
> +                                              bool libvirt_internal_call);
> +typedef int
> +    (*virDrvSecretUndefine)                  (virSecretPtr secret);
> +typedef int
> +    (*virDrvSecretNumOfSecrets)              (virConnectPtr conn);
> +typedef int
> +    (*virDrvSecretListSecrets)               (virConnectPtr conn,
> +                                              char **uuids,
> +                                              int maxuuids);
   and here


  looks fine overall, ACK once the flags gets added,

   thanks !

Daniel

-- 
Daniel Veillard      | libxml Gnome XML XSLT toolkit  http://xmlsoft.org/
daniel@xxxxxxxxxxxx  | Rpmfind RPM search engine http://rpmfind.net/
http://veillard.com/ | virtualization library  http://libvirt.org/

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