summaryrefslogtreecommitdiff
path: root/sysemu.h
diff options
context:
space:
mode:
authorJan Kiszka <jan.kiszka@siemens.com>2011-02-09 16:29:40 +0100
committerMarcelo Tosatti <mtosatti@redhat.com>2011-02-14 12:39:46 -0200
commite07bbac542d45cb246f393f343eb3b867fed4de1 (patch)
treee2a40a4a9ac0d15b9f948a693b7b967489b93886 /sysemu.h
parent0ab07c623c629acfbc792e5a174129c19faefbb7 (diff)
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>
Diffstat (limited to 'sysemu.h')
-rw-r--r--sysemu.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/sysemu.h b/sysemu.h
index 23ae17e2e..0628d3d82 100644
--- a/sysemu.h
+++ b/sysemu.h
@@ -37,6 +37,16 @@ VMChangeStateEntry *qemu_add_vm_change_state_handler(VMChangeStateHandler *cb,
void *opaque);
void qemu_del_vm_change_state_handler(VMChangeStateEntry *e);
+#define VMSTOP_USER 0
+#define VMSTOP_DEBUG 1
+#define VMSTOP_SHUTDOWN 2
+#define VMSTOP_DISKFULL 3
+#define VMSTOP_WATCHDOG 4
+#define VMSTOP_PANIC 5
+#define VMSTOP_SAVEVM 6
+#define VMSTOP_LOADVM 7
+#define VMSTOP_MIGRATE 8
+
void vm_start(void);
void vm_stop(int reason);