summaryrefslogtreecommitdiffstats
path: root/arch/powerpc/boot/gunzip_util.c
Commit message (Collapse)AuthorAgeFilesLines
* [POWERPC] boot: Simplify gunzip_finishMilton Miller2007-10-031-5/+2
| | | | | | | | | | Call gunzip_partial to calculate the remaining length and copy the data to the user buffer. This makes it shorter and reduces duplication. 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>
* [POWERPC] boot: Record header bytes in gunzip_startMilton Miller2007-10-031-0/+1
| | | | | | | | | | 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>
* [POWERPC] boot: More verbose gunzip error messageMilton Miller2007-04-271-1/+2
| | | | | | | | | | | | Change the error message in gunzip_exactly to be more verbose. Besides the identifier being unrelated to the current function name, the user had no indication if the corruption was near the beginning or the end. 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>
* [POWERPC] bootwrapper: Add a fatal error helperMilton Miller2007-03-261-24/+12
| | | | | | | | | Add a macro fatal that calls printf then exit. User must include stdio.h. Typically replaces 3 lines with 1, although I added back some whitespace. Signed-off-by: Milton Miller <miltonm@bga.com> Signed-off-by: Paul Mackerras <paulus@samba.org>
* [POWERPC] Add documentation for the zImage's gunzip convenience functionsDavid Gibson2007-03-161-2/+79
| | | | | | | | | This patch adds documenting comments to the gunzip convenience functions added in commit ad9d2716cfc1cda5a7e0d7bc0db45e3af8a4adbb. It also removes a stray newline, and an unused global variable. Signed-off-by: David Gibson <david@gibson.dropbear.id.au> Signed-off-by: Paul Mackerras <paulus@samba.org>
* [POWERPC] zImage: Add more flexible gunzip convenience functionsDavid Gibson2007-03-131-0/+140
At present, arch/powerpc/boot/main.c includes a gunzip() function which is a convenient wrapper around zlib. However, it doesn't conveniently allow decompressing part of an image to one location, then the remainder to a different address. This patch adds a new set of more flexible convenience wrappers around zlib, moving them to their own file, gunzip_util.c, in the process. These wrappers allow decompressing sections of the compressed image to different locations. In addition, they transparently handle uncompressed data, avoiding special case code to handle uncompressed vmlinux images. The patch also converts main.c to use the new wrappers, using the new flexibility to avoid decompressing the vmlinux's ELF header twice as we did previously. That in turn means we avoid extending our allocations for the vmlinux to allow space for the extra copy of the ELF header. Signed-off-by: David Gibson <dwg@au1.ibm.com> Signed-off-by: Paul Mackerras <paulus@samba.org>
OpenPOWER on IntegriCloud