diff options
author | Hans de Goede <hdegoede@redhat.com> | 2012-09-12 15:08:38 +0200 |
---|---|---|
committer | Gerd Hoffmann <kraxel@redhat.com> | 2012-09-13 09:50:47 +0200 |
commit | 09054d19e72f6991cd359d41c479badd92f62a06 (patch) | |
tree | 747eb665651c28fd26493e65ea540dac992725f4 | |
parent | fc3f6e1b106abcf6b8cf487ac8f8e5fc2fd86776 (diff) | |
download | qemu-09054d19e72f6991cd359d41c479badd92f62a06.zip qemu-09054d19e72f6991cd359d41c479badd92f62a06.tar.gz qemu-09054d19e72f6991cd359d41c479badd92f62a06.tar.bz2 |
usb-redir: Add chardev open / close debug logging
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
-rw-r--r-- | hw/usb/redirect.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/hw/usb/redirect.c b/hw/usb/redirect.c index 5e987e9..9a4be6d 100644 --- a/hw/usb/redirect.c +++ b/hw/usb/redirect.c @@ -854,6 +854,7 @@ static void usbredir_chardev_close_bh(void *opaque) usbredir_device_disconnect(dev); if (dev->parser) { + DPRINTF("destroying usbredirparser\n"); usbredirparser_destroy(dev->parser); dev->parser = NULL; } @@ -869,6 +870,8 @@ static void usbredir_chardev_open(USBRedirDevice *dev) usbredir_chardev_close_bh(dev); qemu_bh_cancel(dev->chardev_close_bh); + DPRINTF("creating usbredirparser\n"); + strcpy(version, "qemu usb-redir guest "); pstrcat(version, sizeof(version), qemu_get_version()); @@ -980,9 +983,11 @@ static void usbredir_chardev_event(void *opaque, int event) switch (event) { case CHR_EVENT_OPENED: + DPRINTF("chardev open\n"); usbredir_chardev_open(dev); break; case CHR_EVENT_CLOSED: + DPRINTF("chardev close\n"); qemu_bh_schedule(dev->chardev_close_bh); break; } @@ -1228,6 +1233,7 @@ static void usbredir_device_disconnect(void *priv) qemu_del_timer(dev->attach_timer); if (dev->dev.attached) { + DPRINTF("detaching device\n"); usb_device_detach(&dev->dev); /* * Delay next usb device attach to give the guest a chance to see |