|
Hans de Goede |
393f81 |
From 3efd9345ea643cf6f15776425213a92a442dd217 Mon Sep 17 00:00:00 2001
|
|
Hans de Goede |
c8dfc6 |
From: Hans de Goede <hdegoede@redhat.com>
|
|
Hans de Goede |
c8dfc6 |
Date: Wed, 5 Sep 2012 15:56:57 +0200
|
|
Hans de Goede |
393f81 |
Subject: [PATCH 365/365] usb-redir: Add chardev open / close debug logging
|
|
Hans de Goede |
c8dfc6 |
|
|
Hans de Goede |
c8dfc6 |
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
|
|
Hans de Goede |
c8dfc6 |
---
|
|
Hans de Goede |
c8dfc6 |
hw/usb/redirect.c | 6 ++++++
|
|
Hans de Goede |
c8dfc6 |
1 file changed, 6 insertions(+)
|
|
Hans de Goede |
c8dfc6 |
|
|
Hans de Goede |
c8dfc6 |
diff --git a/hw/usb/redirect.c b/hw/usb/redirect.c
|
|
Hans de Goede |
393f81 |
index 812096e..b03c412 100644
|
|
Hans de Goede |
c8dfc6 |
--- a/hw/usb/redirect.c
|
|
Hans de Goede |
c8dfc6 |
+++ b/hw/usb/redirect.c
|
|
Hans de Goede |
c8dfc6 |
@@ -864,6 +864,7 @@ static void usbredir_chardev_close_bh(void *opaque)
|
|
Hans de Goede |
c8dfc6 |
usbredir_device_disconnect(dev);
|
|
Hans de Goede |
c8dfc6 |
|
|
Hans de Goede |
c8dfc6 |
if (dev->parser) {
|
|
Hans de Goede |
c8dfc6 |
+ DPRINTF("destroying usbredirparser\n");
|
|
Hans de Goede |
c8dfc6 |
usbredirparser_destroy(dev->parser);
|
|
Hans de Goede |
c8dfc6 |
dev->parser = NULL;
|
|
Hans de Goede |
c8dfc6 |
}
|
|
Hans de Goede |
c8dfc6 |
@@ -879,6 +880,8 @@ static void usbredir_chardev_open(USBRedirDevice *dev)
|
|
Hans de Goede |
c8dfc6 |
usbredir_chardev_close_bh(dev);
|
|
Hans de Goede |
c8dfc6 |
qemu_bh_cancel(dev->chardev_close_bh);
|
|
Hans de Goede |
c8dfc6 |
|
|
Hans de Goede |
c8dfc6 |
+ DPRINTF("creating usbredirparser\n");
|
|
Hans de Goede |
c8dfc6 |
+
|
|
Hans de Goede |
c8dfc6 |
strcpy(version, "qemu usb-redir guest ");
|
|
Hans de Goede |
c8dfc6 |
pstrcat(version, sizeof(version), qemu_get_version());
|
|
Hans de Goede |
c8dfc6 |
|
|
Hans de Goede |
c8dfc6 |
@@ -990,9 +993,11 @@ static void usbredir_chardev_event(void *opaque, int event)
|
|
Hans de Goede |
c8dfc6 |
|
|
Hans de Goede |
c8dfc6 |
switch (event) {
|
|
Hans de Goede |
c8dfc6 |
case CHR_EVENT_OPENED:
|
|
Hans de Goede |
c8dfc6 |
+ DPRINTF("chardev open\n");
|
|
Hans de Goede |
c8dfc6 |
usbredir_chardev_open(dev);
|
|
Hans de Goede |
c8dfc6 |
break;
|
|
Hans de Goede |
c8dfc6 |
case CHR_EVENT_CLOSED:
|
|
Hans de Goede |
c8dfc6 |
+ DPRINTF("chardev close\n");
|
|
Hans de Goede |
c8dfc6 |
qemu_bh_schedule(dev->chardev_close_bh);
|
|
Hans de Goede |
c8dfc6 |
break;
|
|
Hans de Goede |
c8dfc6 |
}
|
|
Hans de Goede |
c8dfc6 |
@@ -1255,6 +1260,7 @@ static void usbredir_device_disconnect(void *priv)
|
|
Hans de Goede |
c8dfc6 |
qemu_del_timer(dev->attach_timer);
|
|
Hans de Goede |
c8dfc6 |
|
|
Hans de Goede |
c8dfc6 |
if (dev->dev.attached) {
|
|
Hans de Goede |
c8dfc6 |
+ DPRINTF("detaching device\n");
|
|
Hans de Goede |
c8dfc6 |
usb_device_detach(&dev->dev);
|
|
Hans de Goede |
c8dfc6 |
/*
|
|
Hans de Goede |
c8dfc6 |
* Delay next usb device attach to give the guest a chance to see
|
|
Hans de Goede |
c8dfc6 |
--
|
|
Hans de Goede |
c8dfc6 |
1.7.12
|
|
Hans de Goede |
c8dfc6 |
|