diff mbox

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

Message ID 1452794525-17594-3-git-send-email-trini@konsulko.com
State Accepted
Delegated to: Tom Rini
Headers show

Commit Message

Tom Rini Jan. 14, 2016, 6:02 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(+)

Comments

Tom Rini Jan. 19, 2016, 6:08 p.m. UTC | #1
On Thu, Jan 14, 2016 at 01:02:05PM -0500, Tom Rini wrote:

> 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>

Applied to u-boot/master, thanks!
diff mbox

Patch

diff --git a/lib/gunzip.c b/lib/gunzip.c
index d86aa87..80b157f 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)
 {
@@ -258,6 +259,7 @@  out:
 
 	return r;
 }
+#endif
 
 /*
  * Uncompress blocks compressed with zlib without headers