Replace the VMSTOP macros with a proper state type
Today, when notifying a VM state change with vm_state_notify(), we pass a VMSTOP macro as the 'reason' argument. This is not ideal because the VMSTOP macros tell why qemu stopped and not exactly what the current VM state is. One example to demonstrate this problem is that vm_start() calls vm_state_notify() with reason=0, which turns out to be VMSTOP_USER. This commit fixes that by replacing the VMSTOP macros with a proper state type called RunState. Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
This commit is contained in:
@@ -1116,7 +1116,8 @@ static void win32_rearm_timer(struct qemu_alarm_timer *t)
|
||||
|
||||
#endif /* _WIN32 */
|
||||
|
||||
static void alarm_timer_on_change_state_rearm(void *opaque, int running, int reason)
|
||||
static void alarm_timer_on_change_state_rearm(void *opaque, int running,
|
||||
RunState state)
|
||||
{
|
||||
if (running)
|
||||
qemu_rearm_alarm_timer((struct qemu_alarm_timer *) opaque);
|
||||
|
||||
Reference in New Issue
Block a user