From: Jiri Denemark Date: Wed, 21 Sep 2011 14:03:22 +0000 (+0200) Subject: qemu: Avoid loop of fake reboots X-Git-Tag: v0.9.6~11 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=3abadf82d74af3324113090f5273d0778a3ac4dd;p=thirdparty%2Flibvirt.git qemu: Avoid loop of fake reboots Once virDomainReboot is called for a domain, guest OS initiated shutdown would always result in reboot instead of shutdown. Only virDomainShutdown would actually shutd such domain down. That's because we forgot to reset fakeReboot flag once we asked the domain to reboot. --- diff --git a/src/qemu/qemu_process.c b/src/qemu/qemu_process.c index 3baaa19cae..bd49b211d3 100644 --- a/src/qemu/qemu_process.c +++ b/src/qemu/qemu_process.c @@ -445,6 +445,7 @@ qemuProcessHandleShutdown(qemuMonitorPtr mon ATTRIBUTE_UNUSED, priv->gotShutdown = true; if (priv->fakeReboot) { + priv->fakeReboot = false; virDomainObjRef(vm); virThread th; if (virThreadCreate(&th,