event_notifier: add event_notifier_init_fd
authorPaolo Bonzini <pbonzini@redhat.com>
Thu, 5 Jul 2012 15:16:24 +0000 (17:16 +0200)
committerAvi Kivity <avi@redhat.com>
Thu, 12 Jul 2012 11:08:03 +0000 (14:08 +0300)
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Avi Kivity <avi@redhat.com>
event_notifier.c
event_notifier.h

index c339bfee5042257b4982fb07da3343d9c1348959..99c376c6a34b8ee6661772451df92bdb2187f072 100644 (file)
  * See the COPYING file in the top-level directory.
  */
 
+#include "qemu-common.h"
 #include "event_notifier.h"
+
 #ifdef CONFIG_EVENTFD
 #include <sys/eventfd.h>
 #endif
 
+void event_notifier_init_fd(EventNotifier *e, int fd)
+{
+    e->fd = fd;
+}
+
 int event_notifier_init(EventNotifier *e, int active)
 {
 #ifdef CONFIG_EVENTFD
index 9b2edf41a74c3337f2fe5e58e352ff1270db30c9..fd3d9427b5fbed82c0fcbf3f79f8e0468cf1fd88 100644 (file)
 #include "qemu-common.h"
 
 struct EventNotifier {
-       int fd;
+    int fd;
 };
 
+void event_notifier_init_fd(EventNotifier *, int fd);
 int event_notifier_init(EventNotifier *, int active);
 void event_notifier_cleanup(EventNotifier *);
 int event_notifier_get_fd(EventNotifier *);