[U-Boot] [PATCH 3/3] ubifs: BUG: Blocks commpressed with zlib
Wolfgang Denk
wd at denx.de
Mon Apr 27 14:36:55 CEST 2009
Dear Ricardo Ribalda Delgado,
In message <1240831297-15862-3-git-send-email-ricardo.ribalda at 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 at 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
--
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
panic: kernel trap (ignored)
More information about the U-Boot
mailing list