diff mbox

[U-Boot] gunzip.c: Only include gzwrite on CONFIG_CMD_UNZIP

Message ID 1452727049-7082-1-git-send-email-trini@konsulko.com
State Accepted
Commit 1811b7d38cf6e6caacc083044bc8f0f8015b5627
Delegated to: Tom Rini
Headers show

Commit Message

Tom Rini Jan. 13, 2016, 11:17 p.m. UTC
Only when we have CONFIG_CMD_UNZIP enabled do we have the 'gzwrite'
command.  While this command should be separated from CONFIG_CMD_UNZIP
we should also only include the write portion of the gz code in that
case as well.

Signed-off-by: Tom Rini <trini@konsulko.com>
---
 lib/gunzip.c |    2 ++
 1 file changed, 2 insertions(+)
diff mbox

Patch

diff --git a/lib/gunzip.c b/lib/gunzip.c
index bdd85c4..7cbb88f 100644
--- a/lib/gunzip.c
+++ b/lib/gunzip.c
@@ -70,6 +70,7 @@  int gunzip(void *dst, int dstlen, unsigned char *src, unsigned long *lenp)
 	return zunzip(dst, dstlen, src, lenp, 1, i);
 }
 
+#ifdef CONFIG_CMD_UNZIP
 __weak
 void gzwrite_progress_init(u64 expectedsize)
 {
@@ -259,6 +260,7 @@  out:
 
 	return r;
 }
+#endif
 
 /*
  * Uncompress blocks compressed with zlib without headers