Rename (IF_)LOGE(_IF) to (IF_)ALOGE(_IF) DO NOT MERGE
See https://android-git.corp.google.com/g/#/c/157220 Bug: 5449033 Change-Id: Ic9c19d30693bd56755f55906127cd6bd7126096c
This commit is contained in:
parent
61d341b8d3
commit
1b781ab0e0
|
@ -205,7 +205,7 @@ bool GenerationCache<K, V>::removeOldest() {
|
|||
removeAt(index);
|
||||
return true;
|
||||
}
|
||||
LOGE("GenerationCache: removeOldest failed to find the item in the cache "
|
||||
ALOGE("GenerationCache: removeOldest failed to find the item in the cache "
|
||||
"with the given key, but we know it must be in there. "
|
||||
"Is the key comparator kaput?");
|
||||
}
|
||||
|
|
|
@ -473,7 +473,7 @@ ssize_t _FileAsset::read(void* buf, size_t count)
|
|||
/* read from the file */
|
||||
//printf("file read\n");
|
||||
if (ftell(mFp) != mStart + mOffset) {
|
||||
LOGE("Hosed: %ld != %ld+%ld\n",
|
||||
ALOGE("Hosed: %ld != %ld+%ld\n",
|
||||
ftell(mFp), (long) mStart, (long) mOffset);
|
||||
assert(false);
|
||||
}
|
||||
|
@ -581,7 +581,7 @@ const void* _FileAsset::getBuffer(bool wordAligned)
|
|||
|
||||
buf = new unsigned char[allocLen];
|
||||
if (buf == NULL) {
|
||||
LOGE("alloc of %ld bytes failed\n", (long) allocLen);
|
||||
ALOGE("alloc of %ld bytes failed\n", (long) allocLen);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
@ -590,7 +590,7 @@ const void* _FileAsset::getBuffer(bool wordAligned)
|
|||
long oldPosn = ftell(mFp);
|
||||
fseek(mFp, mStart, SEEK_SET);
|
||||
if (fread(buf, 1, mLength, mFp) != (size_t) mLength) {
|
||||
LOGE("failed reading %ld bytes\n", (long) mLength);
|
||||
ALOGE("failed reading %ld bytes\n", (long) mLength);
|
||||
delete[] buf;
|
||||
return NULL;
|
||||
}
|
||||
|
@ -658,7 +658,7 @@ const void* _FileAsset::ensureAlignment(FileMap* map)
|
|||
getAssetSource(), (int)mLength);
|
||||
unsigned char* buf = new unsigned char[mLength];
|
||||
if (buf == NULL) {
|
||||
LOGE("alloc of %ld bytes failed\n", (long) mLength);
|
||||
ALOGE("alloc of %ld bytes failed\n", (long) mLength);
|
||||
return NULL;
|
||||
}
|
||||
memcpy(buf, data, mLength);
|
||||
|
|
|
@ -1461,7 +1461,7 @@ bool AssetManager::scanAndMergeZipLocked(SortedVector<AssetDir::FileInfo>* pMerg
|
|||
entry = pZip->findEntryByIndex(i);
|
||||
if (pZip->getEntryFileName(entry, nameBuf, sizeof(nameBuf)) != 0) {
|
||||
// TODO: fix this if we expect to have long names
|
||||
LOGE("ARGH: name too long?\n");
|
||||
ALOGE("ARGH: name too long?\n");
|
||||
continue;
|
||||
}
|
||||
//printf("Comparing %s in %s?\n", nameBuf, dirName.string());
|
||||
|
|
|
@ -232,7 +232,7 @@ write_update_file(BackupDataWriter* dataStream, int fd, int mode, const String8&
|
|||
lseek(fd, 0, SEEK_SET);
|
||||
|
||||
if (sizeof(metadata) != 16) {
|
||||
LOGE("ERROR: metadata block is the wrong size!");
|
||||
ALOGE("ERROR: metadata block is the wrong size!");
|
||||
}
|
||||
|
||||
bytesLeft = fileSize + sizeof(metadata);
|
||||
|
@ -280,7 +280,7 @@ write_update_file(BackupDataWriter* dataStream, int fd, int mode, const String8&
|
|||
}
|
||||
}
|
||||
}
|
||||
LOGE("write_update_file size mismatch for %s. expected=%d actual=%d."
|
||||
ALOGE("write_update_file size mismatch for %s. expected=%d actual=%d."
|
||||
" You aren't doing proper locking!", realFilename, fileSize, fileSize-bytesLeft);
|
||||
}
|
||||
|
||||
|
@ -525,7 +525,7 @@ int write_tarfile(const String8& packageName, const String8& domain,
|
|||
struct stat64 s;
|
||||
if (lstat64(filepath.string(), &s) != 0) {
|
||||
err = errno;
|
||||
LOGE("Error %d (%s) from lstat64(%s)", err, strerror(err), filepath.string());
|
||||
ALOGE("Error %d (%s) from lstat64(%s)", err, strerror(err), filepath.string());
|
||||
return err;
|
||||
}
|
||||
|
||||
|
@ -540,7 +540,7 @@ int write_tarfile(const String8& packageName, const String8& domain,
|
|||
int fd = open(filepath.string(), O_RDONLY);
|
||||
if (fd < 0) {
|
||||
err = errno;
|
||||
LOGE("Error %d (%s) from open(%s)", err, strerror(err), filepath.string());
|
||||
ALOGE("Error %d (%s) from open(%s)", err, strerror(err), filepath.string());
|
||||
return err;
|
||||
}
|
||||
|
||||
|
@ -551,7 +551,7 @@ int write_tarfile(const String8& packageName, const String8& domain,
|
|||
char* paxData = buf + 1024;
|
||||
|
||||
if (buf == NULL) {
|
||||
LOGE("Out of mem allocating transfer buffer");
|
||||
ALOGE("Out of mem allocating transfer buffer");
|
||||
err = ENOMEM;
|
||||
goto cleanup;
|
||||
}
|
||||
|
@ -688,11 +688,11 @@ int write_tarfile(const String8& packageName, const String8& domain,
|
|||
ssize_t nRead = read(fd, buf, toRead);
|
||||
if (nRead < 0) {
|
||||
err = errno;
|
||||
LOGE("Unable to read file [%s], err=%d (%s)", filepath.string(),
|
||||
ALOGE("Unable to read file [%s], err=%d (%s)", filepath.string(),
|
||||
err, strerror(err));
|
||||
break;
|
||||
} else if (nRead == 0) {
|
||||
LOGE("EOF but expect %lld more bytes in [%s]", (long long) toWrite,
|
||||
ALOGE("EOF but expect %lld more bytes in [%s]", (long long) toWrite,
|
||||
filepath.string());
|
||||
err = EIO;
|
||||
break;
|
||||
|
|
|
@ -183,13 +183,13 @@ size_t BlobCache::getFdCount() const {
|
|||
status_t BlobCache::flatten(void* buffer, size_t size, int fds[], size_t count)
|
||||
const {
|
||||
if (count != 0) {
|
||||
LOGE("flatten: nonzero fd count: %d", count);
|
||||
ALOGE("flatten: nonzero fd count: %d", count);
|
||||
return BAD_VALUE;
|
||||
}
|
||||
|
||||
// Write the cache header
|
||||
if (size < sizeof(Header)) {
|
||||
LOGE("flatten: not enough room for cache header");
|
||||
ALOGE("flatten: not enough room for cache header");
|
||||
return BAD_VALUE;
|
||||
}
|
||||
Header* header = reinterpret_cast<Header*>(buffer);
|
||||
|
@ -210,7 +210,7 @@ status_t BlobCache::flatten(void* buffer, size_t size, int fds[], size_t count)
|
|||
|
||||
size_t entrySize = sizeof(EntryHeader) + keySize + valueSize;
|
||||
if (byteOffset + entrySize > size) {
|
||||
LOGE("flatten: not enough room for cache entries");
|
||||
ALOGE("flatten: not enough room for cache entries");
|
||||
return BAD_VALUE;
|
||||
}
|
||||
|
||||
|
@ -234,18 +234,18 @@ status_t BlobCache::unflatten(void const* buffer, size_t size, int fds[],
|
|||
mCacheEntries.clear();
|
||||
|
||||
if (count != 0) {
|
||||
LOGE("unflatten: nonzero fd count: %d", count);
|
||||
ALOGE("unflatten: nonzero fd count: %d", count);
|
||||
return BAD_VALUE;
|
||||
}
|
||||
|
||||
// Read the cache header
|
||||
if (size < sizeof(Header)) {
|
||||
LOGE("unflatten: not enough room for cache header");
|
||||
ALOGE("unflatten: not enough room for cache header");
|
||||
return BAD_VALUE;
|
||||
}
|
||||
const Header* header = reinterpret_cast<const Header*>(buffer);
|
||||
if (header->mMagicNumber != blobCacheMagic) {
|
||||
LOGE("unflatten: bad magic number: %d", header->mMagicNumber);
|
||||
ALOGE("unflatten: bad magic number: %d", header->mMagicNumber);
|
||||
return BAD_VALUE;
|
||||
}
|
||||
if (header->mBlobCacheVersion != blobCacheVersion ||
|
||||
|
@ -261,7 +261,7 @@ status_t BlobCache::unflatten(void const* buffer, size_t size, int fds[],
|
|||
for (size_t i = 0; i < numEntries; i++) {
|
||||
if (byteOffset + sizeof(EntryHeader) > size) {
|
||||
mCacheEntries.clear();
|
||||
LOGE("unflatten: not enough room for cache entry headers");
|
||||
ALOGE("unflatten: not enough room for cache entry headers");
|
||||
return BAD_VALUE;
|
||||
}
|
||||
|
||||
|
@ -273,7 +273,7 @@ status_t BlobCache::unflatten(void const* buffer, size_t size, int fds[],
|
|||
|
||||
if (byteOffset + entrySize > size) {
|
||||
mCacheEntries.clear();
|
||||
LOGE("unflatten: not enough room for cache entry headers");
|
||||
ALOGE("unflatten: not enough room for cache entry headers");
|
||||
return BAD_VALUE;
|
||||
}
|
||||
|
||||
|
|
|
@ -108,7 +108,7 @@ bool FileMap::create(const char* origFileName, int fd, off64_t offset, size_t le
|
|||
mFileHandle = (HANDLE) _get_osfhandle(fd);
|
||||
mFileMapping = CreateFileMapping( mFileHandle, NULL, protect, 0, 0, NULL);
|
||||
if (mFileMapping == NULL) {
|
||||
LOGE("CreateFileMapping(%p, %lx) failed with error %ld\n",
|
||||
ALOGE("CreateFileMapping(%p, %lx) failed with error %ld\n",
|
||||
mFileHandle, protect, GetLastError() );
|
||||
return false;
|
||||
}
|
||||
|
@ -123,7 +123,7 @@ bool FileMap::create(const char* origFileName, int fd, off64_t offset, size_t le
|
|||
(DWORD)(adjOffset),
|
||||
adjLength );
|
||||
if (mBasePtr == NULL) {
|
||||
LOGE("MapViewOfFile(%ld, %ld) failed with error %ld\n",
|
||||
ALOGE("MapViewOfFile(%ld, %ld) failed with error %ld\n",
|
||||
adjOffset, adjLength, GetLastError() );
|
||||
CloseHandle(mFileMapping);
|
||||
mFileMapping = INVALID_HANDLE_VALUE;
|
||||
|
@ -147,7 +147,7 @@ bool FileMap::create(const char* origFileName, int fd, off64_t offset, size_t le
|
|||
#if NOT_USING_KLIBC
|
||||
mPageSize = sysconf(_SC_PAGESIZE);
|
||||
if (mPageSize == -1) {
|
||||
LOGE("could not get _SC_PAGESIZE\n");
|
||||
ALOGE("could not get _SC_PAGESIZE\n");
|
||||
return false;
|
||||
}
|
||||
#else
|
||||
|
@ -175,7 +175,7 @@ try_again:
|
|||
goto try_again;
|
||||
}
|
||||
|
||||
LOGE("mmap(%ld,%ld) failed: %s\n",
|
||||
ALOGE("mmap(%ld,%ld) failed: %s\n",
|
||||
(long) adjOffset, (long) adjLength, strerror(errno));
|
||||
return false;
|
||||
}
|
||||
|
|
|
@ -520,12 +520,12 @@ int Looper::addFd(int fd, int ident, int events, ALooper_callbackFunc callback,
|
|||
|
||||
if (! callback) {
|
||||
if (! mAllowNonCallbacks) {
|
||||
LOGE("Invalid attempt to set NULL callback but not allowed for this looper.");
|
||||
ALOGE("Invalid attempt to set NULL callback but not allowed for this looper.");
|
||||
return -1;
|
||||
}
|
||||
|
||||
if (ident < 0) {
|
||||
LOGE("Invalid attempt to set NULL callback with ident <= 0.");
|
||||
ALOGE("Invalid attempt to set NULL callback with ident <= 0.");
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
|
@ -553,14 +553,14 @@ int Looper::addFd(int fd, int ident, int events, ALooper_callbackFunc callback,
|
|||
if (requestIndex < 0) {
|
||||
int epollResult = epoll_ctl(mEpollFd, EPOLL_CTL_ADD, fd, & eventItem);
|
||||
if (epollResult < 0) {
|
||||
LOGE("Error adding epoll events for fd %d, errno=%d", fd, errno);
|
||||
ALOGE("Error adding epoll events for fd %d, errno=%d", fd, errno);
|
||||
return -1;
|
||||
}
|
||||
mRequests.add(fd, request);
|
||||
} else {
|
||||
int epollResult = epoll_ctl(mEpollFd, EPOLL_CTL_MOD, fd, & eventItem);
|
||||
if (epollResult < 0) {
|
||||
LOGE("Error modifying epoll events for fd %d, errno=%d", fd, errno);
|
||||
ALOGE("Error modifying epoll events for fd %d, errno=%d", fd, errno);
|
||||
return -1;
|
||||
}
|
||||
mRequests.replaceValueAt(requestIndex, request);
|
||||
|
@ -611,7 +611,7 @@ int Looper::removeFd(int fd) {
|
|||
|
||||
int epollResult = epoll_ctl(mEpollFd, EPOLL_CTL_DEL, fd, NULL);
|
||||
if (epollResult < 0) {
|
||||
LOGE("Error removing epoll events for fd %d, errno=%d", fd, errno);
|
||||
ALOGE("Error removing epoll events for fd %d, errno=%d", fd, errno);
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
|
|
@ -121,11 +121,11 @@ status_t PropertyMap::load(const String8& filename, PropertyMap** outMap) {
|
|||
Tokenizer* tokenizer;
|
||||
status_t status = Tokenizer::open(filename, &tokenizer);
|
||||
if (status) {
|
||||
LOGE("Error %d opening property file %s.", status, filename.string());
|
||||
ALOGE("Error %d opening property file %s.", status, filename.string());
|
||||
} else {
|
||||
PropertyMap* map = new PropertyMap();
|
||||
if (!map) {
|
||||
LOGE("Error allocating property map.");
|
||||
ALOGE("Error allocating property map.");
|
||||
status = NO_MEMORY;
|
||||
} else {
|
||||
#if DEBUG_PARSER_PERFORMANCE
|
||||
|
@ -172,14 +172,14 @@ status_t PropertyMap::Parser::parse() {
|
|||
if (!mTokenizer->isEol() && mTokenizer->peekChar() != '#') {
|
||||
String8 keyToken = mTokenizer->nextToken(WHITESPACE_OR_PROPERTY_DELIMITER);
|
||||
if (keyToken.isEmpty()) {
|
||||
LOGE("%s: Expected non-empty property key.", mTokenizer->getLocation().string());
|
||||
ALOGE("%s: Expected non-empty property key.", mTokenizer->getLocation().string());
|
||||
return BAD_VALUE;
|
||||
}
|
||||
|
||||
mTokenizer->skipDelimiters(WHITESPACE);
|
||||
|
||||
if (mTokenizer->nextChar() != '=') {
|
||||
LOGE("%s: Expected '=' between property key and value.",
|
||||
ALOGE("%s: Expected '=' between property key and value.",
|
||||
mTokenizer->getLocation().string());
|
||||
return BAD_VALUE;
|
||||
}
|
||||
|
@ -188,21 +188,21 @@ status_t PropertyMap::Parser::parse() {
|
|||
|
||||
String8 valueToken = mTokenizer->nextToken(WHITESPACE);
|
||||
if (valueToken.find("\\", 0) >= 0 || valueToken.find("\"", 0) >= 0) {
|
||||
LOGE("%s: Found reserved character '\\' or '\"' in property value.",
|
||||
ALOGE("%s: Found reserved character '\\' or '\"' in property value.",
|
||||
mTokenizer->getLocation().string());
|
||||
return BAD_VALUE;
|
||||
}
|
||||
|
||||
mTokenizer->skipDelimiters(WHITESPACE);
|
||||
if (!mTokenizer->isEol()) {
|
||||
LOGE("%s: Expected end of line, got '%s'.",
|
||||
ALOGE("%s: Expected end of line, got '%s'.",
|
||||
mTokenizer->getLocation().string(),
|
||||
mTokenizer->peekRemainderOfLine().string());
|
||||
return BAD_VALUE;
|
||||
}
|
||||
|
||||
if (mMap->hasProperty(keyToken)) {
|
||||
LOGE("%s: Duplicate property value for key '%s'.",
|
||||
ALOGE("%s: Duplicate property value for key '%s'.",
|
||||
mTokenizer->getLocation().string(), keyToken.string());
|
||||
return BAD_VALUE;
|
||||
}
|
||||
|
|
|
@ -98,7 +98,7 @@ public:
|
|||
#if DEBUG_REFS_FATAL_SANITY_CHECKS
|
||||
LOG_ALWAYS_FATAL("Strong references remain!");
|
||||
#else
|
||||
LOGE("Strong references remain:");
|
||||
ALOGE("Strong references remain:");
|
||||
#endif
|
||||
ref_entry* refs = mStrongRefs;
|
||||
while (refs) {
|
||||
|
@ -116,7 +116,7 @@ public:
|
|||
#if DEBUG_REFS_FATAL_SANITY_CHECKS
|
||||
LOG_ALWAYS_FATAL("Weak references remain:");
|
||||
#else
|
||||
LOGE("Weak references remain!");
|
||||
ALOGE("Weak references remain!");
|
||||
#endif
|
||||
ref_entry* refs = mWeakRefs;
|
||||
while (refs) {
|
||||
|
@ -129,7 +129,7 @@ public:
|
|||
}
|
||||
}
|
||||
if (dumpStack) {
|
||||
LOGE("above errors at:");
|
||||
ALOGE("above errors at:");
|
||||
CallStack stack;
|
||||
stack.update();
|
||||
stack.dump();
|
||||
|
@ -205,7 +205,7 @@ public:
|
|||
close(rc);
|
||||
ALOGD("STACK TRACE for %p saved in %s", this, name);
|
||||
}
|
||||
else LOGE("FAILED TO PRINT STACK TRACE for %p in %s: %s", this,
|
||||
else ALOGE("FAILED TO PRINT STACK TRACE for %p in %s: %s", this,
|
||||
name, strerror(errno));
|
||||
}
|
||||
}
|
||||
|
@ -263,7 +263,7 @@ private:
|
|||
id, mBase, this);
|
||||
#endif
|
||||
|
||||
LOGE("RefBase: removing id %p on RefBase %p"
|
||||
ALOGE("RefBase: removing id %p on RefBase %p"
|
||||
"(weakref_type %p) that doesn't exist!",
|
||||
id, mBase, this);
|
||||
|
||||
|
|
|
@ -296,7 +296,7 @@ static status_t getIdmapPackageId(const uint32_t* map, size_t mapSize, uint32_t
|
|||
Res_png_9patch* Res_png_9patch::deserialize(const void* inData)
|
||||
{
|
||||
if (sizeof(void*) != sizeof(int32_t)) {
|
||||
LOGE("Cannot deserialize on non 32-bit system\n");
|
||||
ALOGE("Cannot deserialize on non 32-bit system\n");
|
||||
return NULL;
|
||||
}
|
||||
deserializeInternal(inData, (Res_png_9patch*) inData);
|
||||
|
@ -1574,7 +1574,7 @@ status_t ResTable::Theme::applyStyle(uint32_t resID, bool force)
|
|||
if (curPackage != p) {
|
||||
const ssize_t pidx = mTable.getResourcePackageIndex(attrRes);
|
||||
if (pidx < 0) {
|
||||
LOGE("Style contains key with bad package: 0x%08x\n", attrRes);
|
||||
ALOGE("Style contains key with bad package: 0x%08x\n", attrRes);
|
||||
bag++;
|
||||
continue;
|
||||
}
|
||||
|
@ -1594,7 +1594,7 @@ status_t ResTable::Theme::applyStyle(uint32_t resID, bool force)
|
|||
}
|
||||
if (curType != t) {
|
||||
if (t >= curPI->numTypes) {
|
||||
LOGE("Style contains key with bad type: 0x%08x\n", attrRes);
|
||||
ALOGE("Style contains key with bad type: 0x%08x\n", attrRes);
|
||||
bag++;
|
||||
continue;
|
||||
}
|
||||
|
@ -1612,7 +1612,7 @@ status_t ResTable::Theme::applyStyle(uint32_t resID, bool force)
|
|||
numEntries = curPI->types[t].numEntries;
|
||||
}
|
||||
if (e >= numEntries) {
|
||||
LOGE("Style contains key with bad entry: 0x%08x\n", attrRes);
|
||||
ALOGE("Style contains key with bad entry: 0x%08x\n", attrRes);
|
||||
bag++;
|
||||
continue;
|
||||
}
|
||||
|
@ -2099,7 +2099,7 @@ ssize_t ResTable::getResource(uint32_t resID, Res_value* outValue, bool mayBeBag
|
|||
if (density > 0) {
|
||||
overrideConfig = (ResTable_config*) malloc(sizeof(ResTable_config));
|
||||
if (overrideConfig == NULL) {
|
||||
LOGE("Couldn't malloc ResTable_config for overrides: %s", strerror(errno));
|
||||
ALOGE("Couldn't malloc ResTable_config for overrides: %s", strerror(errno));
|
||||
return BAD_INDEX;
|
||||
}
|
||||
memcpy(overrideConfig, &mParams, sizeof(ResTable_config));
|
||||
|
|
|
@ -138,7 +138,7 @@ ssize_t StreamingZipInflater::read(void* outBuf, size_t count) {
|
|||
if (mInflateState.avail_in == 0) {
|
||||
int err = readNextChunk();
|
||||
if (err < 0) {
|
||||
LOGE("Unable to access asset data: %d", err);
|
||||
ALOGE("Unable to access asset data: %d", err);
|
||||
if (!mStreamNeedsInit) {
|
||||
::inflateEnd(&mInflateState);
|
||||
initInflateState();
|
||||
|
@ -165,7 +165,7 @@ ssize_t StreamingZipInflater::read(void* outBuf, size_t count) {
|
|||
if (result == Z_OK) result = ::inflate(&mInflateState, Z_SYNC_FLUSH);
|
||||
if (result < 0) {
|
||||
// Whoops, inflation failed
|
||||
LOGE("Error inflating asset: %d", result);
|
||||
ALOGE("Error inflating asset: %d", result);
|
||||
::inflateEnd(&mInflateState);
|
||||
initInflateState();
|
||||
return -1;
|
||||
|
@ -195,7 +195,7 @@ int StreamingZipInflater::readNextChunk() {
|
|||
//ALOGV("Reading input chunk, size %08x didread %08x", toRead, didRead);
|
||||
if (didRead < 0) {
|
||||
// TODO: error
|
||||
LOGE("Error reading asset data");
|
||||
ALOGE("Error reading asset data");
|
||||
return didRead;
|
||||
} else {
|
||||
mInNextChunkOffset += didRead;
|
||||
|
|
|
@ -163,7 +163,7 @@ int androidCreateRawThreadEtc(android_thread_func_t entryFunction,
|
|||
(android_pthread_entry)entryFunction, userData);
|
||||
pthread_attr_destroy(&attr);
|
||||
if (result != 0) {
|
||||
LOGE("androidCreateRawThreadEtc failed (entry=%p, res=%d, errno=%d)\n"
|
||||
ALOGE("androidCreateRawThreadEtc failed (entry=%p, res=%d, errno=%d)\n"
|
||||
"(android threadPriority=%d)",
|
||||
entryFunction, result, errno, threadPriority);
|
||||
return 0;
|
||||
|
|
|
@ -55,12 +55,12 @@ status_t Tokenizer::open(const String8& filename, Tokenizer** outTokenizer) {
|
|||
int fd = ::open(filename.string(), O_RDONLY);
|
||||
if (fd < 0) {
|
||||
result = -errno;
|
||||
LOGE("Error opening file '%s', %s.", filename.string(), strerror(errno));
|
||||
ALOGE("Error opening file '%s', %s.", filename.string(), strerror(errno));
|
||||
} else {
|
||||
struct stat stat;
|
||||
if (fstat(fd, &stat)) {
|
||||
result = -errno;
|
||||
LOGE("Error getting size of file '%s', %s.", filename.string(), strerror(errno));
|
||||
ALOGE("Error getting size of file '%s', %s.", filename.string(), strerror(errno));
|
||||
} else {
|
||||
size_t length = size_t(stat.st_size);
|
||||
|
||||
|
@ -80,7 +80,7 @@ status_t Tokenizer::open(const String8& filename, Tokenizer** outTokenizer) {
|
|||
ssize_t nrd = read(fd, buffer, length);
|
||||
if (nrd < 0) {
|
||||
result = -errno;
|
||||
LOGE("Error reading file '%s', %s.", filename.string(), strerror(errno));
|
||||
ALOGE("Error reading file '%s', %s.", filename.string(), strerror(errno));
|
||||
delete[] buffer;
|
||||
buffer = NULL;
|
||||
} else {
|
||||
|
|
|
@ -527,7 +527,7 @@ bool ZipFileRO::getEntryInfo(ZipEntryRO entry, int* pMethod, size_t* pUncompLen,
|
|||
if (pOffset != NULL) {
|
||||
long localHdrOffset = get4LE(ptr + kCDELocalOffset);
|
||||
if (localHdrOffset + kLFHLen >= cdOffset) {
|
||||
LOGE("ERROR: bad local hdr offset in zip\n");
|
||||
ALOGE("ERROR: bad local hdr offset in zip\n");
|
||||
return false;
|
||||
}
|
||||
|
||||
|
@ -605,7 +605,7 @@ bool ZipFileRO::getEntryInfo(ZipEntryRO entry, int* pMethod, size_t* pUncompLen,
|
|||
if (method == kCompressStored &&
|
||||
(off64_t)(dataOffset + uncompLen) > cdOffset)
|
||||
{
|
||||
LOGE("ERROR: bad uncompressed length in zip (%ld + " ZD " > %ld)\n",
|
||||
ALOGE("ERROR: bad uncompressed length in zip (%ld + " ZD " > %ld)\n",
|
||||
(long) dataOffset, (ZD_TYPE) uncompLen, (long) cdOffset);
|
||||
return false;
|
||||
}
|
||||
|
@ -754,10 +754,10 @@ bool ZipFileRO::uncompressEntry(ZipEntryRO entry, int fd) const
|
|||
if (method == kCompressStored) {
|
||||
ssize_t actual = write(fd, ptr, uncompLen);
|
||||
if (actual < 0) {
|
||||
LOGE("Write failed: %s\n", strerror(errno));
|
||||
ALOGE("Write failed: %s\n", strerror(errno));
|
||||
goto unmap;
|
||||
} else if ((size_t) actual != uncompLen) {
|
||||
LOGE("Partial write during uncompress (" ZD " of " ZD ")\n",
|
||||
ALOGE("Partial write during uncompress (" ZD " of " ZD ")\n",
|
||||
(ZD_TYPE) actual, (ZD_TYPE) uncompLen);
|
||||
goto unmap;
|
||||
} else {
|
||||
|
@ -806,10 +806,10 @@ bail:
|
|||
zerr = inflateInit2(&zstream, -MAX_WBITS);
|
||||
if (zerr != Z_OK) {
|
||||
if (zerr == Z_VERSION_ERROR) {
|
||||
LOGE("Installed zlib is not compatible with linked version (%s)\n",
|
||||
ALOGE("Installed zlib is not compatible with linked version (%s)\n",
|
||||
ZLIB_VERSION);
|
||||
} else {
|
||||
LOGE("Call to inflateInit2 failed (zerr=%d)\n", zerr);
|
||||
ALOGE("Call to inflateInit2 failed (zerr=%d)\n", zerr);
|
||||
}
|
||||
goto bail;
|
||||
}
|
||||
|
@ -873,10 +873,10 @@ bail:
|
|||
zerr = inflateInit2(&zstream, -MAX_WBITS);
|
||||
if (zerr != Z_OK) {
|
||||
if (zerr == Z_VERSION_ERROR) {
|
||||
LOGE("Installed zlib is not compatible with linked version (%s)\n",
|
||||
ALOGE("Installed zlib is not compatible with linked version (%s)\n",
|
||||
ZLIB_VERSION);
|
||||
} else {
|
||||
LOGE("Call to inflateInit2 failed (zerr=%d)\n", zerr);
|
||||
ALOGE("Call to inflateInit2 failed (zerr=%d)\n", zerr);
|
||||
}
|
||||
goto bail;
|
||||
}
|
||||
|
|
|
@ -77,10 +77,10 @@ using namespace android;
|
|||
zerr = inflateInit2(&zstream, -MAX_WBITS);
|
||||
if (zerr != Z_OK) {
|
||||
if (zerr == Z_VERSION_ERROR) {
|
||||
LOGE("Installed zlib is not compatible with linked version (%s)\n",
|
||||
ALOGE("Installed zlib is not compatible with linked version (%s)\n",
|
||||
ZLIB_VERSION);
|
||||
} else {
|
||||
LOGE("Call to inflateInit2 failed (zerr=%d)\n", zerr);
|
||||
ALOGE("Call to inflateInit2 failed (zerr=%d)\n", zerr);
|
||||
}
|
||||
goto bail;
|
||||
}
|
||||
|
@ -189,10 +189,10 @@ bail:
|
|||
zerr = inflateInit2(&zstream, -MAX_WBITS);
|
||||
if (zerr != Z_OK) {
|
||||
if (zerr == Z_VERSION_ERROR) {
|
||||
LOGE("Installed zlib is not compatible with linked version (%s)\n",
|
||||
ALOGE("Installed zlib is not compatible with linked version (%s)\n",
|
||||
ZLIB_VERSION);
|
||||
} else {
|
||||
LOGE("Call to inflateInit2 failed (zerr=%d)\n", zerr);
|
||||
ALOGE("Call to inflateInit2 failed (zerr=%d)\n", zerr);
|
||||
}
|
||||
goto bail;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue