diff options
author | Steve Block <steveblock@google.com> | 2012-01-05 23:21:27 +0000 |
---|---|---|
committer | Steve Block <steveblock@google.com> | 2012-01-06 10:04:42 +0000 |
commit | e8e1ddccd616e8226b7cc1e4e9fdb327429249e8 (patch) | |
tree | bd6714388cbff4c72bb5d7dc3d6f90092afa5931 /libdex/ZipArchive.cpp | |
parent | c6284c2f24d180091a824698c0b0869f491ceccc (diff) | |
download | android_dalvik-e8e1ddccd616e8226b7cc1e4e9fdb327429249e8.tar.gz android_dalvik-e8e1ddccd616e8226b7cc1e4e9fdb327429249e8.tar.bz2 android_dalvik-e8e1ddccd616e8226b7cc1e4e9fdb327429249e8.zip |
Rename (IF_)LOGW(_IF) to (IF_)ALOGW(_IF) DO NOT MERGE
See https://android-git.corp.google.com/g/157065
Bug: 5449033
Change-Id: Ia5d301248024df26c2a29dabdfe738e39ec87c82
Diffstat (limited to 'libdex/ZipArchive.cpp')
-rw-r--r-- | libdex/ZipArchive.cpp | 48 |
1 files changed, 24 insertions, 24 deletions
diff --git a/libdex/ZipArchive.cpp b/libdex/ZipArchive.cpp index 75ee03123..f242f6447 100644 --- a/libdex/ZipArchive.cpp +++ b/libdex/ZipArchive.cpp @@ -80,7 +80,7 @@ static int entryToIndex(const ZipArchive* pArchive, const ZipEntry entry) if (ent < 0 || ent >= pArchive->mHashTableSize || pArchive->mHashTable[ent].name == NULL) { - LOGW("Zip: invalid ZipEntry %p (%ld)", entry, ent); + ALOGW("Zip: invalid ZipEntry %p (%ld)", entry, ent); return -1; } return ent; @@ -147,12 +147,12 @@ static int mapCentralDirectory0(int fd, const char* debugFileName, off_t searchStart = fileLength - readAmount; if (lseek(fd, searchStart, SEEK_SET) != searchStart) { - LOGW("Zip: seek %ld failed: %s", (long) searchStart, strerror(errno)); + ALOGW("Zip: seek %ld failed: %s", (long) searchStart, strerror(errno)); return -1; } ssize_t actual = TEMP_FAILURE_RETRY(read(fd, scanBuf, readAmount)); if (actual != (ssize_t) readAmount) { - LOGW("Zip: read %zd failed: %s", readAmount, strerror(errno)); + ALOGW("Zip: read %zd failed: %s", readAmount, strerror(errno)); return -1; } @@ -188,12 +188,12 @@ static int mapCentralDirectory0(int fd, const char* debugFileName, u4 dirOffset = get4LE(eocdPtr + kEOCDFileOffset); if ((long long) dirOffset + (long long) dirSize > (long long) eocdOffset) { - LOGW("Zip: bad offsets (dir %ld, size %u, eocd %ld)", + ALOGW("Zip: bad offsets (dir %ld, size %u, eocd %ld)", (long) dirOffset, dirSize, (long) eocdOffset); return -1; } if (numEntries == 0) { - LOGW("Zip: empty archive?"); + ALOGW("Zip: empty archive?"); return -1; } @@ -207,7 +207,7 @@ static int mapCentralDirectory0(int fd, const char* debugFileName, if (sysMapFileSegmentInShmem(fd, dirOffset, dirSize, &pArchive->mDirectoryMap) != 0) { - LOGW("Zip: cd map failed"); + ALOGW("Zip: cd map failed"); return -1; } @@ -295,17 +295,17 @@ static int parseZipArchive(ZipArchive* pArchive) int i; for (i = 0; i < numEntries; i++) { if (get4LE(ptr) != kCDESignature) { - LOGW("Zip: missed a central dir sig (at %d)", i); + ALOGW("Zip: missed a central dir sig (at %d)", i); goto bail; } if (ptr + kCDELen > cdPtr + cdLength) { - LOGW("Zip: ran off the end (at %d)", i); + ALOGW("Zip: ran off the end (at %d)", i); goto bail; } long localHdrOffset = (long) get4LE(ptr + kCDELocalOffset); if (localHdrOffset >= pArchive->mDirectoryOffset) { - LOGW("Zip: bad LFH offset %ld at entry %d", localHdrOffset, i); + ALOGW("Zip: bad LFH offset %ld at entry %d", localHdrOffset, i); goto bail; } @@ -320,7 +320,7 @@ static int parseZipArchive(ZipArchive* pArchive) ptr += kCDELen + fileNameLen + extraLen + commentLen; if ((size_t)(ptr - cdPtr) > cdLength) { - LOGW("Zip: bad CD advance (%d vs %zd) at entry %d", + ALOGW("Zip: bad CD advance (%d vs %zd) at entry %d", (int) (ptr - cdPtr), cdLength, i); goto bail; } @@ -454,7 +454,7 @@ ZipEntry dexZipFindEntry(const ZipArchive* pArchive, const char* entryName) ZipEntry findEntryByIndex(ZipArchive* pArchive, int idx) { if (idx < 0 || idx >= pArchive->mNumEntries) { - LOGW("Invalid index %d", idx); + ALOGW("Invalid index %d", idx); return NULL; } @@ -531,24 +531,24 @@ int dexZipGetEntryInfo(const ZipArchive* pArchive, ZipEntry entry, if (pOffset != NULL) { long localHdrOffset = (long) get4LE(ptr + kCDELocalOffset); if (localHdrOffset + kLFHLen >= cdOffset) { - LOGW("Zip: bad local hdr offset in zip"); + ALOGW("Zip: bad local hdr offset in zip"); return -1; } u1 lfhBuf[kLFHLen]; if (lseek(pArchive->mFd, localHdrOffset, SEEK_SET) != localHdrOffset) { - LOGW("Zip: failed seeking to lfh at offset %ld", localHdrOffset); + ALOGW("Zip: failed seeking to lfh at offset %ld", localHdrOffset); return -1; } ssize_t actual = TEMP_FAILURE_RETRY(read(pArchive->mFd, lfhBuf, sizeof(lfhBuf))); if (actual != sizeof(lfhBuf)) { - LOGW("Zip: failed reading lfh from offset %ld", localHdrOffset); + ALOGW("Zip: failed reading lfh from offset %ld", localHdrOffset); return -1; } if (get4LE(lfhBuf) != kLFHSignature) { - LOGW("Zip: didn't find signature at start of lfh, offset=%ld", + ALOGW("Zip: didn't find signature at start of lfh, offset=%ld", localHdrOffset); return -1; } @@ -556,13 +556,13 @@ int dexZipGetEntryInfo(const ZipArchive* pArchive, ZipEntry entry, off_t dataOffset = localHdrOffset + kLFHLen + get2LE(lfhBuf + kLFHNameLen) + get2LE(lfhBuf + kLFHExtraLen); if (dataOffset >= cdOffset) { - LOGW("Zip: bad data offset %ld in zip", (long) dataOffset); + ALOGW("Zip: bad data offset %ld in zip", (long) dataOffset); return -1; } /* check lengths */ if ((off_t)(dataOffset + compLen) > cdOffset) { - LOGW("Zip: bad compressed length in zip (%ld + %zd > %ld)", + ALOGW("Zip: bad compressed length in zip (%ld + %zd > %ld)", (long) dataOffset, compLen, (long) cdOffset); return -1; } @@ -570,7 +570,7 @@ int dexZipGetEntryInfo(const ZipArchive* pArchive, ZipEntry entry, if (method == kCompressStored && (off_t)(dataOffset + uncompLen) > cdOffset) { - LOGW("Zip: bad uncompressed length in zip (%ld + %zd > %ld)", + ALOGW("Zip: bad uncompressed length in zip (%ld + %zd > %ld)", (long) dataOffset, uncompLen, (long) cdOffset); return -1; } @@ -619,7 +619,7 @@ static int inflateToFile(int outFd, int inFd, size_t uncompLen, size_t compLen) LOGE("Installed zlib is not compatible with linked version (%s)", ZLIB_VERSION); } else { - LOGW("Call to inflateInit2 failed (zerr=%d)", zerr); + ALOGW("Call to inflateInit2 failed (zerr=%d)", zerr); } goto bail; } @@ -634,7 +634,7 @@ static int inflateToFile(int outFd, int inFd, size_t uncompLen, size_t compLen) ssize_t actual = TEMP_FAILURE_RETRY(read(inFd, readBuf, getSize)); if (actual != (ssize_t) getSize) { - LOGW("Zip: inflate read failed (%d vs %zd)", + ALOGW("Zip: inflate read failed (%d vs %zd)", (int)actual, getSize); goto z_bail; } @@ -648,7 +648,7 @@ static int inflateToFile(int outFd, int inFd, size_t uncompLen, size_t compLen) /* uncompress the data */ zerr = inflate(&zstream, Z_NO_FLUSH); if (zerr != Z_OK && zerr != Z_STREAM_END) { - LOGW("Zip: inflate zerr=%d (nIn=%p aIn=%u nOut=%p aOut=%u)", + ALOGW("Zip: inflate zerr=%d (nIn=%p aIn=%u nOut=%p aOut=%u)", zerr, zstream.next_in, zstream.avail_in, zstream.next_out, zstream.avail_out); goto z_bail; @@ -671,7 +671,7 @@ static int inflateToFile(int outFd, int inFd, size_t uncompLen, size_t compLen) /* paranoia */ if (zstream.total_out != uncompLen) { - LOGW("Zip: size mismatch on inflated file (%ld vs %zd)", + ALOGW("Zip: size mismatch on inflated file (%ld vs %zd)", zstream.total_out, uncompLen); goto z_bail; } @@ -699,7 +699,7 @@ int dexZipExtractEntryToFile(const ZipArchive* pArchive, int result = -1; int ent = entryToIndex(pArchive, entry); if (ent < 0) { - LOGW("Zip: extract can't find entry %p", entry); + ALOGW("Zip: extract can't find entry %p", entry); goto bail; } @@ -713,7 +713,7 @@ int dexZipExtractEntryToFile(const ZipArchive* pArchive, goto bail; } if (lseek(pArchive->mFd, dataOffset, SEEK_SET) != dataOffset) { - LOGW("Zip: lseek to data at %ld failed", (long) dataOffset); + ALOGW("Zip: lseek to data at %ld failed", (long) dataOffset); goto bail; } |