]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
qemu: Avoid loop of fake reboots
authorJiri Denemark <jdenemar@redhat.com>
Wed, 21 Sep 2011 14:03:22 +0000 (16:03 +0200)
committerJiri Denemark <jdenemar@redhat.com>
Wed, 21 Sep 2011 14:53:18 +0000 (16:53 +0200)
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.

src/qemu/qemu_process.c

index 3baaa19caebde272d3c48a7ee544a5ae99c77093..bd49b211d31194dcaa7ee2bbd7bfb2d1b612b62a 100644 (file)
@@ -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,