aboutsummaryrefslogtreecommitdiffstats
path: root/minzip/Zip.c
diff options
context:
space:
mode:
authorNarayan Kamath <narayan@google.com>2015-02-24 13:18:14 +0000
committerAndroid Git Automerger <android-git-automerger@android.com>2015-02-24 13:18:14 +0000
commit6f58e899be728fc2ab3cf3902e52937ebd58e02d (patch)
tree3a25aecea25432046d2fd56ebe26741514d4af80 /minzip/Zip.c
parentf9ee77ab52941e6f3be8e97fb0a150480ea8760a (diff)
parent829d392a75f536861adfddefc21ec635f3460144 (diff)
downloadbootable_recovery-6f58e899be728fc2ab3cf3902e52937ebd58e02d.zip
bootable_recovery-6f58e899be728fc2ab3cf3902e52937ebd58e02d.tar.gz
bootable_recovery-6f58e899be728fc2ab3cf3902e52937ebd58e02d.tar.bz2
am 829d392a: Merge "Delete unused functions from minzip."
* commit '829d392a75f536861adfddefc21ec635f3460144': Delete unused functions from minzip.
Diffstat (limited to 'minzip/Zip.c')
-rw-r--r--minzip/Zip.c43
1 files changed, 1 insertions, 42 deletions
diff --git a/minzip/Zip.c b/minzip/Zip.c
index 579e531..12e06f6 100644
--- a/minzip/Zip.c
+++ b/minzip/Zip.c
@@ -484,7 +484,7 @@ const ZipEntry* mzFindZipEntry(const ZipArchive* pArchive,
/*
* Return true if the entry is a symbolic link.
*/
-bool mzIsZipEntrySymlink(const ZipEntry* pEntry)
+static bool mzIsZipEntrySymlink(const ZipEntry* pEntry)
{
if ((pEntry->versionMadeBy & 0xff00) == CENVEM_UNIX) {
return S_ISLNK(pEntry->externalFileAttributes >> 16);
@@ -628,30 +628,6 @@ static bool crcProcessFunction(const unsigned char *data, int dataLen,
return true;
}
-/*
- * Check the CRC on this entry; return true if it is correct.
- * May do other internal checks as well.
- */
-bool mzIsZipEntryIntact(const ZipArchive *pArchive, const ZipEntry *pEntry)
-{
- unsigned long crc;
- bool ret;
-
- crc = crc32(0L, Z_NULL, 0);
- ret = mzProcessZipEntryContents(pArchive, pEntry, crcProcessFunction,
- (void *)&crc);
- if (!ret) {
- LOGE("Can't calculate CRC for entry\n");
- return false;
- }
- if (crc != (unsigned long)pEntry->crc32) {
- LOGW("CRC for entry %.*s (0x%08lx) != expected (0x%08lx)\n",
- pEntry->fileNameLen, pEntry->fileName, crc, pEntry->crc32);
- return false;
- }
- return true;
-}
-
typedef struct {
char *buf;
int bufLen;
@@ -733,23 +709,6 @@ bool mzExtractZipEntryToFile(const ZipArchive *pArchive,
return true;
}
-/*
- * Obtain a pointer to the in-memory representation of a stored entry.
- */
-bool mzGetStoredEntry(const ZipArchive *pArchive,
- const ZipEntry *pEntry, unsigned char **addr, size_t *length)
-{
- if (pEntry->compression != STORED) {
- LOGE("Can't getStoredEntry for '%s'; not stored\n",
- pEntry->fileName);
- return false;
- }
-
- *addr = pArchive->addr + pEntry->offset;
- *length = pEntry->uncompLen;
- return true;
-}
-
typedef struct {
unsigned char* buffer;
long len;