From 456d60692310e7ac25cf822cc1e98192ad636ece Mon Sep 17 00:00:00 2001 From: Hans de Goede Date: Wed, 27 Mar 2013 20:29:40 +0100 Subject: 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 Message-id: 1364412581-3672-3-git-send-email-hdegoede@redhat.com Signed-off-by: Anthony Liguori --- hw/bt-hci-csr.c | 1 + 1 file changed, 1 insertion(+) (limited to 'hw/bt-hci-csr.c') diff --git a/hw/bt-hci-csr.c b/hw/bt-hci-csr.c index e4ada3c731..55c819b085 100644 --- a/hw/bt-hci-csr.c +++ b/hw/bt-hci-csr.c @@ -439,6 +439,7 @@ CharDriverState *uart_hci_init(qemu_irq wakeup) s->chr.opaque = s; s->chr.chr_write = csrhci_write; s->chr.chr_ioctl = csrhci_ioctl; + s->chr.avail_connections = 1; s->hci = qemu_next_hci(); s->hci->opaque = s; -- cgit 1.4.1