[libvirt] [PATCH 8/8] Always clear out the last_error in virshReportError.

Matthias Bolte matthias.bolte at googlemail.com
Sat Jul 17 16:08:17 UTC 2010


2010/7/8 Chris Lalancette <clalance at redhat.com>:
> Otherwise you can get bogus "unknown error" printouts on
> subsequent commands.
>
> Signed-off-by: Chris Lalancette <clalance at redhat.com>
> ---
>  tools/virsh.c |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/tools/virsh.c b/tools/virsh.c
> index 6a22071..6b7580b 100644
> --- a/tools/virsh.c
> +++ b/tools/virsh.c
> @@ -390,7 +390,7 @@ virshReportError(void)
>          * no error was ever raised, so just ignore */
>         last_error = virSaveLastError();
>         if (!last_error || last_error->code == VIR_ERR_OK)
> -            return;
> +            goto out;
>     }
>
>     if (last_error->code == VIR_ERR_OK) {
> --
> 1.7.1.1

ACK.

Matthias




More information about the libvir-list mailing list