From 978dd6d48bbe648fac1d05e110e35f2038b1c5a9 Mon Sep 17 00:00:00 2001 From: Cole Robinson Date: Fri, 8 Jan 2010 21:07:37 -0500 Subject: [PATCH] qemu: Disable errors in qemudShutdownVMDaemon --- src/qemu/qemu_driver.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c index 02f612fffa..deb8adc2ca 100644 --- a/src/qemu/qemu_driver.c +++ b/src/qemu/qemu_driver.c @@ -2622,12 +2622,17 @@ static void qemudShutdownVMDaemon(virConnectPtr conn, int ret; int retries = 0; qemuDomainObjPrivatePtr priv = vm->privateData; + virErrorPtr orig_err; 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. */ + orig_err = virSaveLastError(); + if (driver->macFilter) { int i; virDomainDefPtr def = vm->def; @@ -2707,6 +2712,11 @@ retry: vm->def->id = -1; vm->newDef = NULL; } + + if (orig_err) { + virSetError(orig_err); + virFreeError(orig_err); + } }