Loading media/mtp/MtpServer.cpp +5 −4 Original line number Diff line number Diff line Loading @@ -802,7 +802,7 @@ MtpResponseCode MtpServer::doGetPartialObject(MtpOperationCode operation) { int result = mDatabase->getObjectFilePath(handle, pathBuf, fileLength, format); if (result != MTP_RESPONSE_OK) return result; if (offset + length > fileLength) if (offset + length > (uint64_t)fileLength) length = fileLength - offset; const char* filePath = (const char *)pathBuf; Loading Loading @@ -1005,7 +1005,7 @@ done: static void deleteRecursive(const char* path) { char pathbuf[PATH_MAX]; int pathLength = strlen(path); size_t pathLength = strlen(path); if (pathLength >= sizeof(pathbuf) - 1) { ALOGE("path too long: %s\n", path); } Loading Loading @@ -1127,12 +1127,13 @@ MtpResponseCode MtpServer::doSendPartialObject() { // can't start writing past the end of the file if (offset > edit->mSize) { ALOGD("writing past end of object, offset: %lld, edit->mSize: %lld", offset, edit->mSize); ALOGD("writing past end of object, offset: %" PRIu64 ", edit->mSize: %" PRIu64, offset, edit->mSize); return MTP_RESPONSE_GENERAL_ERROR; } const char* filePath = (const char *)edit->mPath; ALOGV("receiving partial %s %lld %" PRIu32 "\n", filePath, offset, length); ALOGV("receiving partial %s %" PRIu64 " %" PRIu32, filePath, offset, length); // read the header, and possibly some data int ret = mData.read(mFD); Loading media/mtp/MtpStorageInfo.cpp +3 −1 Original line number Diff line number Diff line Loading @@ -16,6 +16,8 @@ #define LOG_TAG "MtpStorageInfo" #include <inttypes.h> #include "MtpDebug.h" #include "MtpDataPacket.h" #include "MtpStorageInfo.h" Loading Loading @@ -63,7 +65,7 @@ void MtpStorageInfo::read(MtpDataPacket& packet) { void MtpStorageInfo::print() { ALOGD("Storage Info %08X:\n\tmStorageType: %d\n\tmFileSystemType: %d\n\tmAccessCapability: %d\n", mStorageID, mStorageType, mFileSystemType, mAccessCapability); ALOGD("\tmMaxCapacity: %lld\n\tmFreeSpaceBytes: %lld\n\tmFreeSpaceObjects: %d\n", ALOGD("\tmMaxCapacity: %" PRIu64 "\n\tmFreeSpaceBytes: %" PRIu64 "\n\tmFreeSpaceObjects: %d\n", mMaxCapacity, mFreeSpaceBytes, mFreeSpaceObjects); ALOGD("\tmStorageDescription: %s\n\tmVolumeIdentifier: %s\n", mStorageDescription, mVolumeIdentifier); Loading Loading
media/mtp/MtpServer.cpp +5 −4 Original line number Diff line number Diff line Loading @@ -802,7 +802,7 @@ MtpResponseCode MtpServer::doGetPartialObject(MtpOperationCode operation) { int result = mDatabase->getObjectFilePath(handle, pathBuf, fileLength, format); if (result != MTP_RESPONSE_OK) return result; if (offset + length > fileLength) if (offset + length > (uint64_t)fileLength) length = fileLength - offset; const char* filePath = (const char *)pathBuf; Loading Loading @@ -1005,7 +1005,7 @@ done: static void deleteRecursive(const char* path) { char pathbuf[PATH_MAX]; int pathLength = strlen(path); size_t pathLength = strlen(path); if (pathLength >= sizeof(pathbuf) - 1) { ALOGE("path too long: %s\n", path); } Loading Loading @@ -1127,12 +1127,13 @@ MtpResponseCode MtpServer::doSendPartialObject() { // can't start writing past the end of the file if (offset > edit->mSize) { ALOGD("writing past end of object, offset: %lld, edit->mSize: %lld", offset, edit->mSize); ALOGD("writing past end of object, offset: %" PRIu64 ", edit->mSize: %" PRIu64, offset, edit->mSize); return MTP_RESPONSE_GENERAL_ERROR; } const char* filePath = (const char *)edit->mPath; ALOGV("receiving partial %s %lld %" PRIu32 "\n", filePath, offset, length); ALOGV("receiving partial %s %" PRIu64 " %" PRIu32, filePath, offset, length); // read the header, and possibly some data int ret = mData.read(mFD); Loading
media/mtp/MtpStorageInfo.cpp +3 −1 Original line number Diff line number Diff line Loading @@ -16,6 +16,8 @@ #define LOG_TAG "MtpStorageInfo" #include <inttypes.h> #include "MtpDebug.h" #include "MtpDataPacket.h" #include "MtpStorageInfo.h" Loading Loading @@ -63,7 +65,7 @@ void MtpStorageInfo::read(MtpDataPacket& packet) { void MtpStorageInfo::print() { ALOGD("Storage Info %08X:\n\tmStorageType: %d\n\tmFileSystemType: %d\n\tmAccessCapability: %d\n", mStorageID, mStorageType, mFileSystemType, mAccessCapability); ALOGD("\tmMaxCapacity: %lld\n\tmFreeSpaceBytes: %lld\n\tmFreeSpaceObjects: %d\n", ALOGD("\tmMaxCapacity: %" PRIu64 "\n\tmFreeSpaceBytes: %" PRIu64 "\n\tmFreeSpaceObjects: %d\n", mMaxCapacity, mFreeSpaceBytes, mFreeSpaceObjects); ALOGD("\tmStorageDescription: %s\n\tmVolumeIdentifier: %s\n", mStorageDescription, mVolumeIdentifier); Loading