Explorar el Código

[POWERPC] boot: Record header bytes in gunzip_start

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>
Milton Miller hace 18 años
padre
commit
e47654d016
Se han modificado 1 ficheros con 1 adiciones y 0 borrados
  1. 1 0
      arch/powerpc/boot/gunzip_util.c

+ 1 - 0
arch/powerpc/boot/gunzip_util.c

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