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

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

 



On 07/31/2012 10:58 AM, Daniel P. Berrange wrote:
> From: "Daniel P. Berrange" <berrange@xxxxxxxxxx>
> 
> 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@xxxxxxxxxx>
> ---
>  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@xxxxxxxxxx    +1-919-301-3266
Libvirt virtualization library http://libvirt.org

Attachment: signature.asc
Description: OpenPGP digital signature

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