Skip to contentSkip to conversation

gunzip.c: Only include gzwrite on CONFIG_CMD_UNZIP

PATCH New Tom Rini 1 participant 1 message Jan 13, 2016 Library code

lore
Share & tools
lore

Tom Rini

author
#0 lore raw

PATCH 1/1 gunzip.c: Only include gzwrite on CONFIG_CMD_UNZIP

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.

---
 lib/gunzip.c |    2 ++
 1 file changed, 2 insertions(+)
lib/gunzip.c +2 -0
index bdd85c4..7cbb88f 100644
@@ -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
Signature · 1 line
1.7.9.5