aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Maydell <peter.maydell@linaro.org>2014-06-13 14:57:56 +0100
committerPeter Maydell <peter.maydell@linaro.org>2014-06-13 14:57:56 +0100
commit7d5bef0873abdc336c7e9f4e2ddbf30f7348342e (patch)
treec9e5f8eedde0f1cda85c5bdf2b2a30100520649f
parentd61de7255b707f726447d3ed7459e18e0a4fab5b (diff)
parente9d21c436f716603b3844513ba890ac570e642e1 (diff)
Merge remote-tracking branch 'remotes/kraxel/tags/pull-chardev-20140613-1' into staging
char: fix avail_connections init in qemu_chr_open_eventfd() # gpg: Signature made Fri 13 Jun 2014 12:16:50 BST using RSA key ID D3E87138 # gpg: Good signature from "Gerd Hoffmann (work) <kraxel@redhat.com>" # gpg: aka "Gerd Hoffmann <gerd@kraxel.org>" # gpg: aka "Gerd Hoffmann (private) <kraxel@gmail.com>" * remotes/kraxel/tags/pull-chardev-20140613-1: char: fix avail_connections init in qemu_chr_open_eventfd() Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
-rw-r--r--qemu-char.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/qemu-char.c b/qemu-char.c
index 4c04bbc24e..f918f90972 100644
--- a/qemu-char.c
+++ b/qemu-char.c
@@ -2493,7 +2493,13 @@ static gboolean tcp_chr_read(GIOChannel *chan, GIOCondition cond, void *opaque)
#ifndef _WIN32
CharDriverState *qemu_chr_open_eventfd(int eventfd)
{
- return qemu_chr_open_fd(eventfd, eventfd);
+ CharDriverState *chr = qemu_chr_open_fd(eventfd, eventfd);
+
+ if (chr) {
+ chr->avail_connections = 1;
+ }
+
+ return chr;
}
#endif