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

Re: [libvirt] [PATCH] libvirtd: don't ignore virInitialize failure



On 05/20/2010 04:05 AM, Jim Meyering wrote:
> I almost missed this; it was so similar to what I though
> was the sole ignore-virInitialize-failure bug (in python set-up)
> that I thought I'd already fixed it.
> 
>>From f48e364b6f2182f7fa88862b2e1a789e2d83a027 Mon Sep 17 00:00:00 2001
> From: Jim Meyering <meyering redhat com>
> Date: Thu, 20 May 2010 09:52:20 +0200
> Subject: [PATCH] libvirtd: don't ignore virInitialize failure
> 
> * daemon/libvirtd.c (main): Diagnose virInitialize failure
> and exit nonzero.
> ---
>  daemon/libvirtd.c |    5 ++++-
>  1 files changed, 4 insertions(+), 1 deletions(-)
> 
> diff --git a/daemon/libvirtd.c b/daemon/libvirtd.c
> index afa10fb..aac2d08 100644
> --- a/daemon/libvirtd.c
> +++ b/daemon/libvirtd.c
> @@ -3028,7 +3028,10 @@ int main(int argc, char **argv) {
>          {0, 0, 0, 0}
>      };
> 
> -    virInitialize();
> +    if (virInitialize() < 0) {
> +        fprintf (stderr, _("libvirtd: initialization failed\n"));
> +        exit (EXIT_FAILURE);
> +    }

ACK

-- 
Chris Lalancette


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