Improve vm_stop reason declarations

Define and use dedicated constants for vm_stop reasons, they actually
have nothing to do with the EXCP_* defines used so far. At this chance,
specify more detailed reasons so that VM state change handlers can
evaluate them.

Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
This commit is contained in:
Jan Kiszka 2011-02-09 16:29:40 +01:00 committed by Marcelo Tosatti
parent 0ab07c623c
commit e07bbac542
12 changed files with 33 additions and 22 deletions

View file

@ -1575,7 +1575,7 @@ static int qemu_savevm_state(Monitor *mon, QEMUFile *f)
int ret;
saved_vm_running = vm_running;
vm_stop(0);
vm_stop(VMSTOP_SAVEVM);
if (qemu_savevm_state_blocked(mon)) {
ret = -EINVAL;
@ -1904,7 +1904,7 @@ void do_savevm(Monitor *mon, const QDict *qdict)
}
saved_vm_running = vm_running;
vm_stop(0);
vm_stop(VMSTOP_SAVEVM);
memset(sn, 0, sizeof(*sn));