char: restore read callback on a reattached (hotplug) chardev
commitac1b84dd1e020648db82a99260891aa982d1142c
authorGal Hammer <ghammer@redhat.com>
Tue, 25 Feb 2014 10:12:35 +0000 (25 12:12 +0200)
committerGerd Hoffmann <kraxel@redhat.com>
Thu, 13 Mar 2014 09:33:45 +0000 (13 10:33 +0100)
treee7690a2d4a7a1c61c8473b0e871f652c556118b9
parent239618707637ec87eba8c452d2b2f75dc5ca20c7
char: restore read callback on a reattached (hotplug) chardev

Fix a bug that was introduced in commit 386a5a1e. A removal of a device
set the chr handlers to NULL. However when the device is plugged back,
its read callback is not restored so data can't be transferred from the
host to the guest (e.g. via the virtio-serial port).

https://bugzilla.redhat.com/show_bug.cgi?id=1027181

Signed-off-by: Gal Hammer <ghammer@redhat.com>
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
qemu-char.c