diff options
author | Michael S. Tsirkin <mst@redhat.com> | 2018-01-24 19:11:47 +0200 |
---|---|---|
committer | Michael S. Tsirkin <mst@redhat.com> | 2018-01-24 19:20:19 +0200 |
commit | e044c0f8dd028ea296396ad8066ba436e9acf350 (patch) | |
tree | ae3dd5b9ce48276ff36f871777d77f55a3b57a35 /util | |
parent | 1ef8185a0613dd2ed24f8d401f14da047d678589 (diff) | |
download | qemu-e044c0f8dd028ea296396ad8066ba436e9acf350.zip qemu-e044c0f8dd028ea296396ad8066ba436e9acf350.tar.gz qemu-e044c0f8dd028ea296396ad8066ba436e9acf350.tar.bz2 |
Revert "qemu: add a cleanup callback function to EventNotifier"
This reverts commit f87d72f5c5bff0837d409a56bd34f439a90119ca as that is
part of a patchset reported to break cleanup and migration.
Cc: Gal Hammer <ghammer@redhat.com>
Cc: Sitong Liu <siliu@redhat.com>
Cc: Xiaoling Gao <xiagao@redhat.com>
Suggested-by: Greg Kurz <groug@kaod.org>
Suggested-by: Paolo Bonzini <pbonzini@redhat.com>
Reported-by: Jose Ricardo Ziviani <joserz@linux.vnet.ibm.com>
Reported-by: Daniel Henrique Barboza <danielhb@linux.vnet.ibm.com>
Diffstat (limited to 'util')
-rw-r--r-- | util/event_notifier-posix.c | 5 | ||||
-rw-r--r-- | util/event_notifier-win32.c | 2 |
2 files changed, 1 insertions, 6 deletions
diff --git a/util/event_notifier-posix.c b/util/event_notifier-posix.c index 6525666..73c4046 100644 --- a/util/event_notifier-posix.c +++ b/util/event_notifier-posix.c @@ -29,7 +29,6 @@ void event_notifier_init_fd(EventNotifier *e, int fd) { e->rfd = fd; e->wfd = fd; - e->cleanup = NULL; } #endif @@ -66,7 +65,6 @@ int event_notifier_init(EventNotifier *e, int active) e->rfd = fds[0]; e->wfd = fds[1]; } - e->cleanup = NULL; if (active) { event_notifier_set(e); } @@ -82,11 +80,10 @@ void event_notifier_cleanup(EventNotifier *e) { if (e->rfd != e->wfd) { close(e->rfd); + e->rfd = -1; } close(e->wfd); - e->rfd = -1; e->wfd = -1; - e->cleanup = NULL; } int event_notifier_get_fd(const EventNotifier *e) diff --git a/util/event_notifier-win32.c b/util/event_notifier-win32.c index eff8670..62c53b0 100644 --- a/util/event_notifier-win32.c +++ b/util/event_notifier-win32.c @@ -19,7 +19,6 @@ int event_notifier_init(EventNotifier *e, int active) { e->event = CreateEvent(NULL, TRUE, FALSE, NULL); assert(e->event); - e->cleanup = NULL; return 0; } @@ -27,7 +26,6 @@ void event_notifier_cleanup(EventNotifier *e) { CloseHandle(e->event); e->event = NULL; - e->cleanup = NULL; } HANDLE event_notifier_get_handle(EventNotifier *e) |