[POWERPC] boot: Record header bytes in gunzip_start
authorMilton Miller <miltonm@bga.com>
Fri, 21 Sep 2007 23:03:34 +0000 (09:03 +1000)
committerPaul Mackerras <paulus@samba.org>
Wed, 3 Oct 2007 01:48:43 +0000 (11:48 +1000)
Record the number of header bytes skipped in the total bytes read field.

This is needed for the initramfs parsing code to find the end of the zip file.

Signed-off-by: Milton Miller <miltonm@bga.com>
Acked-by: David Gibson <david@gibson.dropbear.id.au>
Signed-off-by: Paul Mackerras <paulus@samba.org>
arch/powerpc/boot/gunzip_util.c

index df8ab07e9ff46242749deda96f21b7de015bad46..e1e215e16983cced81a78e14fb9c51aead147e8c 100644 (file)
@@ -78,6 +78,7 @@ void gunzip_start(struct gunzip_state *state, void *src, int srclen)
                        fatal("inflateInit2 returned %d\n\r", r);
        }
 
+       state->s.total_in = hdrlen;
        state->s.next_in = src + hdrlen;
        state->s.avail_in = srclen - hdrlen;
 }