All of lore.kernel.org
 help / color / mirror / Atom feed
From: Mike Frysinger <vapier@gentoo.org>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH 3/3] ubifs: BUG: Blocks commpressed with zlib
Date: Mon, 27 Apr 2009 16:44:32 -0400	[thread overview]
Message-ID: <200904271644.33760.vapier@gentoo.org> (raw)
In-Reply-To: <20090427194625.A6B2783420E8@gemini.denx.de>

On Monday 27 April 2009 15:46:25 Wolfgang Denk wrote:
> In message Mike Frysinger wrote:
> > > > - * 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?
> >
> > not sure i follow ... what do you propose changing ?
>
> The comment above seems to indicate that gzip_decompress() is only
> (?) needed because the zunzip() parameters are incompatible with
> those of the lzo decompressor.
>
> So if we create zunzip() just for this purpose, then why  not  create
> it  in a way that the parameters are compatible with those of the lzo
> decompressor, so we can omit  this  whole  gzip_decompress()  wrapper
> function?

that should be a follow up change, but the wrapper already exists today 
regardless of Ricardo's fixes.  i dont think his changes should be held up to 
address that.

that direction should probably cover:
 - fix gunzip code to use size_t's instead of unsigned long
 - re-order lzo arguments to match zlib rather than other way around since lzo 
has very few consumers
-mike
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: This is a digitally signed message part.
Url : http://lists.denx.de/pipermail/u-boot/attachments/20090427/95255cfb/attachment-0001.pgp 

  reply	other threads:[~2009-04-27 20:44 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-04-27 11:21 [U-Boot] [PATCH 1/3] ubifs: BUG realpath string must be ended with NULL Ricardo Ribalda Delgado
2009-04-27 11:21 ` [U-Boot] [PATCH 2/3] lib_generic: gunzip: New function zunzip Ricardo Ribalda Delgado
2009-04-27 11:21   ` [U-Boot] [PATCH 3/3] ubifs: BUG: Blocks commpressed with zlib Ricardo Ribalda Delgado
2009-04-27 12:36     ` Wolfgang Denk
2009-04-27 15:44       ` Stefan Roese
2009-04-27 16:00       ` Mike Frysinger
2009-04-27 19:46         ` Wolfgang Denk
2009-04-27 20:44           ` Mike Frysinger [this message]
2009-04-27 23:26             ` Wolfgang Denk
2009-04-28  7:42               ` Ricardo Ribalda Delgado
2009-04-28 12:43                 ` Mike Frysinger
2009-04-27 16:25       ` Ricardo Ribalda Delgado
2009-04-27 23:25         ` Wolfgang Denk
2009-04-27 12:34   ` [U-Boot] [PATCH 2/3] lib_generic: gunzip: New function zunzip Wolfgang Denk
2009-04-27 12:32 ` [U-Boot] [PATCH 1/3] ubifs: BUG realpath string must be ended with NULL Wolfgang Denk
  -- strict thread matches above, loose matches on Subject: below --
2009-04-27 16:33 Ricardo Ribalda Delgado
2009-04-27 16:33 ` [U-Boot] [PATCH 2/3] lib_generic: gunzip: New function zunzip Ricardo Ribalda Delgado
2009-04-27 16:33   ` [U-Boot] [PATCH 3/3] ubifs: BUG: Blocks commpressed with zlib Ricardo Ribalda Delgado

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=200904271644.33760.vapier@gentoo.org \
    --to=vapier@gentoo.org \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.