summaryrefslogtreecommitdiffstats
path: root/media/mtp/MtpDataPacket.cpp
diff options
context:
space:
mode:
authorMike Lockwood <lockwood@android.com>2010-06-29 18:11:52 -0400
committerMike Lockwood <lockwood@android.com>2010-06-30 13:59:32 -0400
commitb14e588bec4d5e39e61b020b5b575f2ce555d316 (patch)
treef4d08eaa3bd5832b3bfebbdb9d19c8fcde45b54e /media/mtp/MtpDataPacket.cpp
parent703f87c890591e3a20ba0da237233c36a7c47bc7 (diff)
downloadframeworks_av-b14e588bec4d5e39e61b020b5b575f2ce555d316.zip
frameworks_av-b14e588bec4d5e39e61b020b5b575f2ce555d316.tar.gz
frameworks_av-b14e588bec4d5e39e61b020b5b575f2ce555d316.tar.bz2
MTP: replace printfs with logcat
Change-Id: I2c30921098e2dc049dc5fc1e0a548ead33c363e0 Signed-off-by: Mike Lockwood <lockwood@android.com>
Diffstat (limited to 'media/mtp/MtpDataPacket.cpp')
-rw-r--r--media/mtp/MtpDataPacket.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/media/mtp/MtpDataPacket.cpp b/media/mtp/MtpDataPacket.cpp
index d12425a..a7e975c 100644
--- a/media/mtp/MtpDataPacket.cpp
+++ b/media/mtp/MtpDataPacket.cpp
@@ -14,6 +14,8 @@
* limitations under the License.
*/
+#define LOG_TAG "MtpDataPacket"
+
#include <stdio.h>
#include <sys/types.h>
#include <fcntl.h>
@@ -312,15 +314,12 @@ void MtpDataPacket::putString(const char* s)
int MtpDataPacket::read(int fd) {
// first read the header
int ret = ::read(fd, mBuffer, MTP_CONTAINER_HEADER_SIZE);
-printf("MtpDataPacket::read 1 returned %d\n", ret);
if (ret != MTP_CONTAINER_HEADER_SIZE)
return -1;
// then the following data
int total = MtpPacket::getUInt32(MTP_CONTAINER_LENGTH_OFFSET);
int remaining = total - MTP_CONTAINER_HEADER_SIZE;
-printf("total: %d, remaining: %d\n", total, remaining);
ret = ::read(fd, &mBuffer[0] + MTP_CONTAINER_HEADER_SIZE, remaining);
-printf("MtpDataPacket::read 2 returned %d\n", ret);
if (ret != remaining)
return -1;