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

Re: [libvirt] [PATCH 5/5] qemu: Disable errors in qemudShutdownVMDaemon



On Mon, Jan 11, 2010 at 03:34:48PM -0500, Cole Robinson wrote:
> 
> Signed-off-by: Cole Robinson <crobinso redhat com>
> ---
>  src/qemu/qemu_driver.c |   10 ++++++++++
>  1 files changed, 10 insertions(+), 0 deletions(-)
> 
> diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c
> index fc6b9fa..38be88f 100644
> --- a/src/qemu/qemu_driver.c
> +++ b/src/qemu/qemu_driver.c
> @@ -2616,12 +2616,17 @@ static void qemudShutdownVMDaemon(virConnectPtr conn,
>      int ret;
>      int retries = 0;
>      qemuDomainObjPrivatePtr priv = vm->privateData;
> +    virErrorPtr origerr = NULL;
>  
>      if (!virDomainObjIsActive(vm))
>          return;
>  
>      VIR_DEBUG("Shutting down VM '%s'", vm->def->name);
>  
> +    /* This method is routinely used in clean up paths. Disable error
> +     * reporting so we don't squash a legit error. */
> +    origerr = virSaveLastError();
> +
>      if (driver->macFilter) {
>          int i;
>          virDomainDefPtr def = vm->def;
> @@ -2701,6 +2706,11 @@ retry:
>          vm->def->id = -1;
>          vm->newDef = NULL;
>      }
> +
> +    if (origerr) {
> +        virSetError(origerr);
> +        virFreeError(origerr);
> +    }
>  }

ACK

Daniel
-- 
|: Red Hat, Engineering, London   -o-   http://people.redhat.com/berrange/ :|
|: http://libvirt.org  -o-  http://virt-manager.org  -o-  http://ovirt.org :|
|: http://autobuild.org       -o-         http://search.cpan.org/~danberr/ :|
|: GnuPG: 7D3B9505  -o-  F3C9 553F A1DA 4AC2 5648 23C1 B3DF F742 7D3B 9505 :|


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