
Dear Ricardo Ribalda Delgado,
In message 1240831297-15862-3-git-send-email-ricardo.ribalda@uam.es you wrote:
Blocks compressed with zlib dont have the full gzip header.
Without this patch, block compressed with zlib cannot be readed!
Signed-off-by: Ricardo Ribalda Delgado ricardo.ribalda@uam.es
...
#include "ubifs.h" +#include <u-boot/zlib.h>
#if !defined(CONFIG_SYS_64BIT_VSPRINTF) #warning Please define CONFIG_SYS_64BIT_VSPRINTF for correct output! @@ -33,15 +34,17 @@ DECLARE_GLOBAL_DATA_PTR;
/* compress.c */
+int zunzip(void *dst, int dstlen, unsigned char *src, unsigned long *lenp,
int stoponerr, int offset);
The prototype declaration should be in the neader file. Please remove here.
- We need a wrapper for gunzip() because the parameters are
*/
- We need a wrapper for zunzip() because the parameters are
- incompatible with the lzo decompressor.
static int gzip_decompress(const unsigned char *in, size_t in_len, unsigned char *out, size_t *out_len) { unsigned long len = in_len;
- return gunzip(out, *out_len, (unsigned char *)in, &len);
- return zunzip(out, *out_len, (unsigned char *)in, &len, 0, 0);
}
If the only purpose of zunzip() is to be used here, then why do we not make the parameters fit the intended purpose, thus avoiding an additional wrapper?
Best regards,
Wolfgang Denk