public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Giuseppe CONDORELLI <giuseppe.condorelli@st.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH v4 2/2] zlib: add watchdog reset call
Date: Wed, 29 Jul 2009 06:05:20 -0400	[thread overview]
Message-ID: <1248861920-12280-1-git-send-email-giuseppe.condorelli@st.com> (raw)

This patch adds watchdog reset call to allow its invokation during decompression
phase. This control was present on old zlib version and here it is
backported for those relevant routines. This patch is sent as a zlib separate
one beacuse it was not tested due to specific board lack.
zlib patches will be unified just in one when this will be validated through
tests.

Signed-off-by: Giuseppe Condorelli <giuseppe.condorelli@st.com>
---
 lib_generic/zlib.c |    8 +++++++-
 1 files changed, 7 insertions(+), 1 deletions(-)

diff --git a/lib_generic/zlib.c b/lib_generic/zlib.c
index 49fb145..6a78dc9 100644
--- a/lib_generic/zlib.c
+++ b/lib_generic/zlib.c
@@ -1040,6 +1040,8 @@ z_streamp strm;
     state->hold = 0;
     state->bits = 0;
     state->lencode = state->distcode = state->next = state->codes;
+    if (strm->outcb != Z_NULL)
+	(*strm->outcb)(Z_NULL, 0);
     Tracev((stderr, "inflate: reset\n"));
     return Z_OK;
 }
@@ -1950,7 +1952,11 @@ z_streamp strm;
     if (strm == Z_NULL || strm->state == Z_NULL || strm->zfree == (free_func)0)
         return Z_STREAM_ERROR;
     state = (struct inflate_state FAR *)strm->state;
-    if (state->window != Z_NULL) ZFREE(strm, state->window);
+    if (state->window != Z_NULL) {
+	if (strm->outcb != Z_NULL)
+		(*strm->outcb)(Z_NULL, 0);
+	ZFREE(strm, state->window);
+    }
     ZFREE(strm, strm->state);
     strm->state = Z_NULL;
     Tracev((stderr, "inflate: end\n"));
-- 
1.6.0.6

             reply	other threads:[~2009-07-29 10:05 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-07-29 10:05 Giuseppe CONDORELLI [this message]
2009-08-11 20:16 ` [U-Boot] [PATCH v4 2/2] zlib: add watchdog reset call Wolfgang Denk

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=1248861920-12280-1-git-send-email-giuseppe.condorelli@st.com \
    --to=giuseppe.condorelli@st.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