aboutsummaryrefslogtreecommitdiff
path: root/net
diff options
context:
space:
mode:
authorHans de Goede <hdegoede@redhat.com>2013-03-27 20:29:40 +0100
committerAnthony Liguori <aliguori@us.ibm.com>2013-04-04 19:21:25 -0500
commit456d60692310e7ac25cf822cc1e98192ad636ece (patch)
tree864cec4d85706b465de5c1e23b9f01417b5eff80 /net
parent44c473decd4de5559487430f876de53c607b1e9d (diff)
downloadqemu-456d60692310e7ac25cf822cc1e98192ad636ece.zip
qemu-456d60692310e7ac25cf822cc1e98192ad636ece.tar.gz
qemu-456d60692310e7ac25cf822cc1e98192ad636ece.tar.bz2
qemu-char: Call fe_claim / fe_release when not using qdev chr properties
chardev-frontends need to explictly check, increase and decrement the avail_connections "property" of the chardev when they are not using a qdev-chardev-property for the chardev. This fixes things like: qemu-kvm -chardev stdio,id=foo -device isa-serial,chardev=foo \ -mon chardev=foo Working, where they should fail. Most of the changes here are due to old hardware emulation code which is using serial_hds directly rather then a qdev-chardev-property. Signed-off-by: Hans de Goede <hdegoede@redhat.com> Message-id: 1364412581-3672-3-git-send-email-hdegoede@redhat.com Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Diffstat (limited to 'net')
-rw-r--r--net/slirp.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/net/slirp.c b/net/slirp.c
index 4df550f..eabfee6 100644
--- a/net/slirp.c
+++ b/net/slirp.c
@@ -660,6 +660,7 @@ static int slirp_guestfwd(SlirpState *s, const char *config_str,
fwd->port = port;
fwd->slirp = s->slirp;
+ qemu_chr_fe_claim_no_fail(fwd->hd);
qemu_chr_add_handlers(fwd->hd, guestfwd_can_read, guestfwd_read,
NULL, fwd);
}