[libvirt] [PATCH 01/13] Remove manual one-shot global initializers

Eric Blake eblake at redhat.com
Tue Jul 31 19:06:59 UTC 2012


On 07/31/2012 10:58 AM, Daniel P. Berrange wrote:
> From: "Daniel P. Berrange" <berrange at redhat.com>
> 
> Remove the use of a manually run virLogStartup and
> virNodeSuspendInitialize methods. Instead make sure they
> are automatically run using VIR_ONCE_GLOBAL_INIT
> 
> Signed-off-by: Daniel P. Berrange <berrange at redhat.com>
> ---
>  daemon/libvirtd.c         |    1 -
>  src/libvirt.c             |    4 +---
>  src/libvirt_private.syms  |    3 ---
>  src/util/logging.c        |   54 +++++++++++++--------------------------------
>  src/util/logging.h        |    2 --
>  src/util/virnodesuspend.c |   25 +++++++++++----------
>  src/util/virnodesuspend.h |    1 -
>  7 files changed, 29 insertions(+), 61 deletions(-)

ACK, what you have is a strict improvement.  But given commit a22a36e8,

> @@ -407,8 +406,7 @@ virInitialize(void)
>  
>      if (virThreadInitialize() < 0 ||
>          virErrorInitialize() < 0 ||
> -        virRandomInitialize(time(NULL) ^ getpid()) ||
> -        virNodeSuspendInit() < 0)
> +        virRandomInitialize(time(NULL) ^ getpid()))

...should we be getting rid of virRandomInitialize and doing that in a
one-shot initializer as well, since at least seclabeltest would have
benefitted from it?

-- 
Eric Blake   eblake at redhat.com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 620 bytes
Desc: OpenPGP digital signature
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20120731/9687fd78/attachment-0001.sig>


More information about the libvir-list mailing list