suspend: add qmp events

Send qmp events on suspend and wakeup so libvirt
has a chance to track the vm state.

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
This commit is contained in:
Gerd Hoffmann 2012-02-23 13:45:26 +01:00 committed by Anthony Liguori
parent 6595abc044
commit 53370b78ec
3 changed files with 10 additions and 0 deletions

View file

@ -488,6 +488,12 @@ void monitor_protocol_event(MonitorEvent event, QObject *data)
case QEVENT_DEVICE_TRAY_MOVED:
event_name = "DEVICE_TRAY_MOVED";
break;
case QEVENT_SUSPEND:
event_name = "SUSPEND";
break;
case QEVENT_WAKEUP:
event_name = "WAKEUP";
break;
default:
abort();
break;