[libvirt] [PATCH 07/13] Add libvirt-admin library

Martin Kletzander mkletzan at redhat.com
Tue Jun 16 11:16:56 UTC 2015


On Tue, Jun 16, 2015 at 11:42:52AM +0100, Daniel P. Berrange wrote:
>On Tue, Jun 16, 2015 at 11:58:24AM +0200, Martin Kletzander wrote:
>> Initial scratch of the admin library.  It has its own virAdmConnectPtr
>> that inherits from virAbstractConnectPtr and thus trivially supports
>> error reporting.
>>
>> There's pkg-config file added and spec-file adjusted as well.
>>
>> Since the library should be "minimalistic" and not depend on any other
>> library, the list of files is especially crafted for it.  Most of them
>> could've been put to it's own sub-libraries that would be LIBADD'd to
>> libvirt_util, libvirt_net_rpc and libvirt_setuid_rpc_client to minimize
>> the number of object files being built, but that's a refactoring that
>> isn't the orginal aim of this commit.
>>
>> Signed-off-by: Martin Kletzander <mkletzan at redhat.com>
>
>
>> +/**
>> + * virAdmInitialize:
>> + *
>> + * Initialize the library.
>> + *
>> + * Returns 0 in case of success, -1 in case of error
>> + */
>> +static int
>> +virAdmInitialize(void)
>> +{
>> +    if (virOnce(&virAdmGlobalOnce, virAdmGlobalInit) < 0)
>> +        return -1;
>> +
>> +    if (virAdmGlobalError)
>> +        return -1;
>> +
>> +    return 0;
>> +}
>
>This is declared static
>

This should not be static,

>
>> +LIBVIRT_ADMIN_1.3.0 {
>> +    global:
>> +        virAdmInitialize;
>> +        virAdmConnectOpen;
>> +        virAdmConnectClose;
>> +        virAdmConnectRef;
>
>So does not need to be listed here
>

so it can be listed here.  This is similarly to virInitialize().

>
>ACK with that removed
>
>Regards,
>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 :|
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20150616/72599667/attachment-0001.sig>


More information about the libvir-list mailing list