aboutsummaryrefslogtreecommitdiffstats
path: root/minzip/Zip.c
diff options
context:
space:
mode:
authorTao Bao <tbao@google.com>2015-07-15 14:13:06 -0700
committerSteve Kondik <steve@cyngn.com>2015-11-07 19:02:26 -0800
commitbc0135bff02f3afa6f281085f0982052fd7f2d56 (patch)
treed9e8bc163831903404e5c4ad1d13201d5652352e /minzip/Zip.c
parent5e6a4191867c7a7bdba1caf37b14fdf2416605b2 (diff)
downloadbootable_recovery-bc0135bff02f3afa6f281085f0982052fd7f2d56.zip
bootable_recovery-bc0135bff02f3afa6f281085f0982052fd7f2d56.tar.gz
bootable_recovery-bc0135bff02f3afa6f281085f0982052fd7f2d56.tar.bz2
Clean up LOG functions.
For fatal errors, use LOGE to show messages. Bug: 22236461 Change-Id: I2b7d761576894ac37fcbadcba690ae14affe8f07 (cherry picked from commit d7d0f7503456c3d275a49f90be35e03f02c51bbd)
Diffstat (limited to 'minzip/Zip.c')
-rw-r--r--minzip/Zip.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/minzip/Zip.c b/minzip/Zip.c
index c1dec74..bdb565c 100644
--- a/minzip/Zip.c
+++ b/minzip/Zip.c
@@ -198,10 +198,10 @@ static bool parseZipArchive(ZipArchive* pArchive)
*/
val = get4LE(pArchive->addr);
if (val == ENDSIG) {
- LOGI("Found Zip archive, but it looks empty\n");
+ LOGW("Found Zip archive, but it looks empty\n");
goto bail;
} else if (val != LOCSIG) {
- LOGV("Not a Zip archive (found 0x%08x)\n", val);
+ LOGW("Not a Zip archive (found 0x%08x)\n", val);
goto bail;
}
@@ -217,7 +217,7 @@ static bool parseZipArchive(ZipArchive* pArchive)
ptr--;
}
if (ptr < (const unsigned char*) pArchive->addr) {
- LOGI("Could not find end-of-central-directory in Zip\n");
+ LOGW("Could not find end-of-central-directory in Zip\n");
goto bail;
}
@@ -429,7 +429,7 @@ int mzOpenZipArchive(unsigned char* addr, size_t length, ZipArchive* pArchive)
if (length < ENDHDR) {
err = -1;
- LOGV("File '%s' too small to be zip (%zd)\n", fileName, map.length);
+ LOGW("Archive %p is too small to be zip (%zd)\n", pArchive, length);
goto bail;
}
@@ -438,7 +438,7 @@ int mzOpenZipArchive(unsigned char* addr, size_t length, ZipArchive* pArchive)
if (!parseZipArchive(pArchive)) {
err = -1;
- LOGV("Parsing '%s' failed\n", fileName);
+ LOGW("Parsing archive %p failed\n", pArchive);
goto bail;
}
@@ -548,7 +548,7 @@ static bool processDeflatedEntry(const ZipArchive *pArchive,
/* uncompress the data */
zerr = inflate(&zstream, Z_NO_FLUSH);
if (zerr != Z_OK && zerr != Z_STREAM_END) {
- LOGD("zlib inflate call failed (zerr=%d)\n", zerr);
+ LOGW("zlib inflate call failed (zerr=%d)\n", zerr);
goto z_bail;
}
@@ -1007,7 +1007,7 @@ bool mzExtractRecursive(const ZipArchive *pArchive,
if (callback != NULL) callback(targetFile, cookie);
}
- LOGD("Extracted %d file(s)\n", extractCount);
+ LOGV("Extracted %d file(s)\n", extractCount);
free(helper.buf);
free(zpath);