[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH 3/3] Implement vm-state notifications
From: |
Anthony Liguori |
Subject: |
[Qemu-devel] [PATCH 3/3] Implement vm-state notifications |
Date: |
Wed, 8 Apr 2009 09:16:44 -0500 |
This patch adds notification whenever a vm starts or stops.
Signed-off-by: Anthony Liguori <address@hidden>
diff --git a/vl.c b/vl.c
index f78cabb..ca0bcf9 100644
--- a/vl.c
+++ b/vl.c
@@ -164,6 +164,8 @@ int main(int argc, char **argv)
#include "libslirp.h"
#endif
+#include "wait.h"
+
//#define DEBUG_UNUSED_IOPORT
//#define DEBUG_IOPORT
//#define DEBUG_NET
@@ -3545,6 +3547,11 @@ static void vm_state_notify(int running, int reason)
{
VMChangeStateEntry *e;
+ if (running)
+ qemu_notify_event("vm-state", "start", "");
+ else
+ qemu_notify_event("vm-state", "stop", "");
+
for (e = vm_change_state_head.lh_first; e; e = e->entries.le_next) {
e->cb(e->opaque, running, reason);
}
- [Qemu-devel] [PATCH 1/3] Allow multiple monitor devices, Anthony Liguori, 2009/04/08
- [Qemu-devel] [PATCH 3/3] Implement vm-state notifications,
Anthony Liguori <=
- [Qemu-devel] [PATCH 2/3] Introduce monitor 'wait' command, Anthony Liguori, 2009/04/08
- [Qemu-devel] Re: [PATCH 2/3] Introduce monitor 'wait' command, Daniel P. Berrange, 2009/04/08
- [Qemu-devel] Re: [PATCH 2/3] Introduce monitor 'wait' command, Anthony Liguori, 2009/04/08
- [Qemu-devel] Re: [libvirt] Re: [PATCH 2/3] Introduce monitor 'wait' command, Gerd Hoffmann, 2009/04/08
- [Qemu-devel] Re: [libvirt] Re: [PATCH 2/3] Introduce monitor 'wait' command, Jan Kiszka, 2009/04/08
- [Qemu-devel] Re: [libvirt] Re: [PATCH 2/3] Introduce monitor 'wait' command, Anthony Liguori, 2009/04/08
- Re: [Qemu-devel] Re: [libvirt] Re: [PATCH 2/3] Introduce monitor 'wait' command, Jamie Lokier, 2009/04/08
- Re: [Qemu-devel] Re: [libvirt] Re: [PATCH 2/3] Introduce monitor 'wait' command, Anthony Liguori, 2009/04/08
- Re: [Qemu-devel] Re: [libvirt] Re: [PATCH 2/3] Introduce monitor 'wait' command, Hollis Blanchard, 2009/04/08
- Re: [Qemu-devel] Re: [libvirt] Re: [PATCH 2/3] Introduce monitor 'wait' command, Anthony Liguori, 2009/04/08