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

Re: [libvirt] [PATCH 3/7] Update remote API to support multiples security labels



On Mon, May 21, 2012 at 10:39:25AM -0300, Marcelo Cerri wrote:
> diff --git a/include/libvirt/libvirt.h.in b/include/libvirt/libvirt.h.in
> index a817db8..fdcffd1 100644
> --- a/include/libvirt/libvirt.h.in
> +++ b/include/libvirt/libvirt.h.in
> @@ -1539,6 +1539,9 @@ int                     virDomainSetMemoryFlags (virDomainPtr domain,
>  int                     virDomainGetMaxVcpus    (virDomainPtr domain);
>  int                     virDomainGetSecurityLabel (virDomainPtr domain,
>                                                     virSecurityLabelPtr seclabel);
> +int                     virDomainGetSecurityLabelList (virDomainPtr domain,
> +                                                       virSecurityLabelPtr seclabel,
> +                                                       int nseclabels);

Since we're introducing a more sensible virDomainListAllDomains API
which pre-allocates the return array of the right size, I think we
should make this API behave similarly.


ie

/*
 * @seclabels: will be auto-allocated & filled with domains' security labels. caller must free memory on return
 *
 * Return value: -1 on error, or the number of elements filled in the @seclabels parameter
 */
 int virDomainGetSecurityLabelList(virDomainPtr domain,
                                   virSecurityLabelPtr *seclabels);

> diff --git a/src/libvirt_public.syms b/src/libvirt_public.syms
> index 46c13fb..2c85d22 100644
> --- a/src/libvirt_public.syms
> +++ b/src/libvirt_public.syms
> @@ -527,6 +527,7 @@ LIBVIRT_0.9.10 {
>          virDomainShutdownFlags;
>          virStorageVolResize;
>          virStorageVolWipePattern;
> +        virDomainGetSecurityLabelList;
>  } LIBVIRT_0.9.9;

This needs to be in a new  LIBVIRT_0.9.13 section

Daniel
-- 
|: http://berrange.com      -o-    http://www.flickr.com/photos/dberrange/ :|
|: http://libvirt.org              -o-             http://virt-manager.org :|
|: http://autobuild.org       -o-         http://search.cpan.org/~danberr/ :|
|: http://entangle-photo.org       -o-       http://live.gnome.org/gtk-vnc :|


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