summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLuiz Capitulino2010-02-25 16:06:59 +0100
committerAnthony Liguori2010-03-08 18:30:01 +0100
commit6b8f8fff78185cb260d1ca3c30352c0bf5601d36 (patch)
treea3558ffdc1314824429e303914b9a7067b94e04c
parentblock: Emit BLOCK_IO_ERROR before vm_stop() call (diff)
downloadqemu-6b8f8fff78185cb260d1ca3c30352c0bf5601d36.tar.gz
qemu-6b8f8fff78185cb260d1ca3c30352c0bf5601d36.tar.xz
qemu-6b8f8fff78185cb260d1ca3c30352c0bf5601d36.zip
QMP: Move STOP event into do_vm_stop()
I've introduced the STOP event in the main loop, this is wrong as it will be only emitted if the io thread is enabled. This fixes that by moving the STOP event to do_vm_stop(). Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
-rw-r--r--vl.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/vl.c b/vl.c
index 10d8e34e50..833113852f 100644
--- a/vl.c
+++ b/vl.c
@@ -3137,6 +3137,7 @@ static void do_vm_stop(int reason)
vm_running = 0;
pause_all_vcpus();
vm_state_notify(0, reason);
+ monitor_protocol_event(QEVENT_STOP, NULL);
}
}
@@ -4105,7 +4106,6 @@ static void main_loop(void)
qemu_irq_raise(qemu_system_powerdown);
}
if ((r = qemu_vmstop_requested())) {
- monitor_protocol_event(QEVENT_STOP, NULL);
vm_stop(r);
}
}