Add more logging message and dead code
* Add more logging message to aid in easier debugging
* Remove unnecessary dead/commented code
Change-Id: I9c7fe8f6b674cab41601001458010ab176b89776
Signed-off-by: Nanik Tolaram <nanikjava@gmail.com>
diff --git a/adb/usb_linux.c b/adb/usb_linux.c
index 7d13a5d..d242c8a 100644
--- a/adb/usb_linux.c
+++ b/adb/usb_linux.c
@@ -379,6 +379,7 @@
struct usbdevfs_urb *out = NULL;
int res;
+ D("++ usb_bulk_read ++\n");
memset(urb, 0, sizeof(*urb));
urb->type = USBDEVFS_URB_TYPE_BULK;
urb->endpoint = h->ep_in;
@@ -441,6 +442,7 @@
}
fail:
adb_mutex_unlock(&h->lock);
+ D("-- usb_bulk_read --\n");
return res;
}
@@ -451,6 +453,7 @@
int n;
int need_zero = 0;
+ D("++ usb_write ++\n");
if(h->zero_mask) {
/* if we need 0-markers and our transfer
** is an even multiple of the packet size,
@@ -480,6 +483,7 @@
return n;
}
+ D("-- usb_write --\n");
return 0;
}
@@ -554,7 +558,7 @@
int usb_close(usb_handle *h)
{
- D("[ usb close ... ]\n");
+ D("++ usb close ++\n");
adb_mutex_lock(&usb_lock);
h->next->prev = h->prev;
h->prev->next = h->next;
@@ -562,7 +566,7 @@
h->next = 0;
adb_close(h->desc);
- D("[ usb closed %p (fd = %d) ]\n", h, h->desc);
+ D("-- usb closed %p (fd = %d) --\n", h, h->desc);
adb_mutex_unlock(&usb_lock);
free(h);