summaryrefslogtreecommitdiffstats
path: root/adb/transport_usb.cpp
diff options
context:
space:
mode:
authorYabin Cui <yabinc@google.com>2015-09-02 17:44:28 -0700
committerYabin Cui <yabinc@google.com>2015-09-02 20:21:00 -0700
commit7a3f8d6691b3fbd8014a98de8455dbcfcc9629e4 (patch)
tree40d5108385c64636f2512ecc675be9b009479722 /adb/transport_usb.cpp
parent03bbd64aa99bb03bf80a9340750afa96bdb34280 (diff)
downloadsystem_core-7a3f8d6691b3fbd8014a98de8455dbcfcc9629e4.tar.gz
system_core-7a3f8d6691b3fbd8014a98de8455dbcfcc9629e4.tar.bz2
system_core-7a3f8d6691b3fbd8014a98de8455dbcfcc9629e4.zip
adb: clean up debug tracing a little.
Always use LOG() for debug tracing. Remove useless D_lock. I believe it is useless to lock just before and after fprintf. I verified the log output both on host and on device. The output looks fine to me. Change-Id: I96ccfe408ff56864361551afe9ad464d197ae104
Diffstat (limited to 'adb/transport_usb.cpp')
-rw-r--r--adb/transport_usb.cpp14
1 files changed, 7 insertions, 7 deletions
diff --git a/adb/transport_usb.cpp b/adb/transport_usb.cpp
index 96ccdad23..b520607bb 100644
--- a/adb/transport_usb.cpp
+++ b/adb/transport_usb.cpp
@@ -28,24 +28,24 @@
static int remote_read(apacket *p, atransport *t)
{
if(usb_read(t->usb, &p->msg, sizeof(amessage))){
- D("remote usb: read terminated (message)\n");
+ D("remote usb: read terminated (message)");
return -1;
}
if(check_header(p, t)) {
- D("remote usb: check_header failed\n");
+ D("remote usb: check_header failed");
return -1;
}
if(p->msg.data_length) {
if(usb_read(t->usb, p->data, p->msg.data_length)){
- D("remote usb: terminated (data)\n");
+ D("remote usb: terminated (data)");
return -1;
}
}
if(check_data(p)) {
- D("remote usb: check_data failed\n");
+ D("remote usb: check_data failed");
return -1;
}
@@ -57,12 +57,12 @@ static int remote_write(apacket *p, atransport *t)
unsigned size = p->msg.data_length;
if(usb_write(t->usb, &p->msg, sizeof(amessage))) {
- D("remote usb: 1 - write terminated\n");
+ D("remote usb: 1 - write terminated");
return -1;
}
if(p->msg.data_length == 0) return 0;
if(usb_write(t->usb, &p->data, size)) {
- D("remote usb: 2 - write terminated\n");
+ D("remote usb: 2 - write terminated");
return -1;
}
@@ -82,7 +82,7 @@ static void remote_kick(atransport *t)
void init_usb_transport(atransport *t, usb_handle *h, ConnectionState state)
{
- D("transport: usb\n");
+ D("transport: usb");
t->close = remote_close;
t->kick = remote_kick;
t->read_from_remote = remote_read;