From: Alessandro Rubini <rubini-list@gnudd.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH] zlib: allow 0 as destination pointer
Date: Wed, 29 Jul 2009 11:20:50 +0200 [thread overview]
Message-ID: <20090729092050.GA24275@mail.gnudd.com> (raw)
In-Reply-To: <002901ca1029@st.com>
> Hi rhabarber1848,
> please could you test latest two zlib patches I have sent few minutes ago?
Unfortunately you add outcb() only in inflatestart and inflateend. IT should
also go in the main loop.
Being an out-callback with arguments, it should be called during copy to
output, with proper arguments (and in that form it would be a fix to
the official zlib).
I tried this one, which is a quick hack (no arguments passed, so not
suitable for upstream zlib in any case). Moreover, one of those two
should be sufficient, but I don't know which one exactly. I'm lazy so I
won't trace program flow in detail.
I think rhabarber should test with this addition too and select which one
is the good one.
(formatted for git-am for quick testing, even thought he talk is irrelevant
as a commit message).
ps: please note that your addition of outcb() has white-space inconsistency with
zlib.c (which is not u-boot style while those lines are).
/alessandro
---
lib_generic/zlib.c | 6 ++++++
1 files changed, 6 insertions(+), 0 deletions(-)
diff --git a/lib_generic/zlib.c b/lib_generic/zlib.c
index 6a78dc9..66b18eb 100644
--- a/lib_generic/zlib.c
+++ b/lib_generic/zlib.c
@@ -1129,6 +1129,10 @@ unsigned out;
state = (struct inflate_state FAR *)strm->state;
+ /* call watchdog_reset if needed (addition for U-Boot) */
+ if (strm->outcb != Z_NULL)
+ (*strm->outcb)(Z_NULL, 0);
+
/* if it hasn't been done already, allocate space for the window */
if (state->window == Z_NULL) {
state->window = (unsigned char FAR *)
@@ -1741,6 +1745,8 @@ int flush;
Tracev((stderr, "inflate: codes ok\n"));
state->mode = LEN;
case LEN:
+ if (strm->outcb != Z_NULL) /* for watchdog (U-Boot) */
+ (*strm->outcb)(Z_NULL, 0);
if (have >= 6 && left >= 258) {
RESTORE();
inflate_fast(strm, out);
--
1.6.0.2
next parent reply other threads:[~2009-07-29 9:20 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <002901ca1029@st.com>
2009-07-29 9:20 ` Alessandro Rubini [this message]
2009-07-29 10:32 ` [U-Boot] [PATCH] zlib: allow 0 as destination pointer rhabarber1848
2009-07-29 10:50 ` Giuseppe CONDORELLI
[not found] <05a201ca0ec5@st.com>
2009-07-27 15:09 ` [U-Boot] [PATCH v3] zlib: updated to v.1.2.3 Alessandro Rubini
2009-07-27 15:30 ` Stefan Roese
2009-07-27 16:40 ` [U-Boot] [PATCH] zlib: allow 0 as destination pointer Alessandro Rubini
2009-07-27 18:02 ` rhabarber1848
2009-07-27 18:15 ` Wolfgang Denk
2009-07-27 20:13 ` rhabarber1848
2009-07-27 20:45 ` Wolfgang Denk
2009-07-28 6:31 ` Stefan Roese
2009-07-29 6:07 ` Giuseppe CONDORELLI
2009-07-29 6:23 ` Wolfgang Denk
2009-07-29 6:29 ` Giuseppe CONDORELLI
2009-07-29 7:10 ` Wolfgang Denk
2009-07-29 6:53 ` rhabarber1848
2009-07-29 7:11 ` Wolfgang Denk
2009-07-29 8:50 ` Giuseppe CONDORELLI
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=20090729092050.GA24275@mail.gnudd.com \
--to=rubini-list@gnudd.com \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox