From 81517ba37a6cec59f92396b4722861868eb0a500 Mon Sep 17 00:00:00 2001 From: Anton Nefedov Date: Thu, 6 Jul 2017 15:08:49 +0300 Subject: char: add backend hotswap handler MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Frontends should have an interface to setup the handler of a backend change. The interface will be used in the next commits Signed-off-by: Anton Nefedov Reviewed-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Marc-André Lureau Message-Id: <1499342940-56739-3-git-send-email-anton.nefedov@virtuozzo.com> Signed-off-by: Paolo Bonzini --- hw/usb/ccid-card-passthru.c | 2 +- hw/usb/dev-serial.c | 2 +- hw/usb/redirect.c | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) (limited to 'hw/usb') diff --git a/hw/usb/ccid-card-passthru.c b/hw/usb/ccid-card-passthru.c index ac1725e..e9f58c9 100644 --- a/hw/usb/ccid-card-passthru.c +++ b/hw/usb/ccid-card-passthru.c @@ -348,7 +348,7 @@ static int passthru_initfn(CCIDCardState *base) qemu_chr_fe_set_handlers(&card->cs, ccid_card_vscard_can_read, ccid_card_vscard_read, - ccid_card_vscard_event, card, NULL, true); + ccid_card_vscard_event, NULL, card, NULL, true); ccid_card_vscard_send_init(card); } else { error_report("missing chardev"); diff --git a/hw/usb/dev-serial.c b/hw/usb/dev-serial.c index bfbf7cd..dc145a6 100644 --- a/hw/usb/dev-serial.c +++ b/hw/usb/dev-serial.c @@ -502,7 +502,7 @@ static void usb_serial_realize(USBDevice *dev, Error **errp) } qemu_chr_fe_set_handlers(&s->cs, usb_serial_can_read, usb_serial_read, - usb_serial_event, s, NULL, true); + usb_serial_event, NULL, s, NULL, true); usb_serial_handle_reset(dev); if (chr->be_open && !dev->attached) { diff --git a/hw/usb/redirect.c b/hw/usb/redirect.c index aa22d69..115efb9 100644 --- a/hw/usb/redirect.c +++ b/hw/usb/redirect.c @@ -1399,7 +1399,7 @@ static void usbredir_realize(USBDevice *udev, Error **errp) /* Let the backend know we are ready */ qemu_chr_fe_set_handlers(&dev->cs, usbredir_chardev_can_read, usbredir_chardev_read, usbredir_chardev_event, - dev, NULL, true); + NULL, dev, NULL, true); dev->vmstate = qemu_add_vm_change_state_handler(usbredir_vm_state_change, dev); -- cgit v1.1