From 7a3f8d6691b3fbd8014a98de8455dbcfcc9629e4 Mon Sep 17 00:00:00 2001 From: Yabin Cui Date: Wed, 2 Sep 2015 17:44:28 -0700 Subject: 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 --- adb/transport_usb.cpp | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'adb/transport_usb.cpp') 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; -- cgit v1.2.3