summaryrefslogtreecommitdiff
path: root/lib/gunzip.c
Commit message (Collapse)AuthorAgeLines
* gunzip.c: Only include gzwrite on CONFIG_CMD_UNZIPTom Rini2016-01-19-0/+2
| | | | | | | | | Only when we have CONFIG_CMD_UNZIP enabled do we have the 'gzwrite' command. While this command should be separated from CONFIG_CMD_UNZIP we should also only include the write portion of the gz code in that case as well. Signed-off-by: Tom Rini <trini@konsulko.com>
* block: pass block dev not num to read/write/erase()Stephen Warren2016-01-13-2/+1
| | | | | | | | | | | This will allow the implementation to make use of data in the block_dev structure beyond the base device number. This will be useful so that eMMC block devices can encompass the HW partition ID rather than treating this out-of-band. Equally, the existence of the priv field is crying out for this patch to exist. Signed-off-by: Stephen Warren <swarren@nvidia.com> Reviewed-by: Tom Rini <trini@konsulko.com>
* Move console definitions into a new console.h fileSimon Glass2015-11-19-0/+1
| | | | | | | | The console includes a global variable and several functions that are only used by a small subset of U-Boot files. Before adding more functions, move the definitions into their own header file. Signed-off-by: Simon Glass <sjg@chromium.org>
* gunzip: add gzwrite routine for extracting compresed images to block deviceEric Nelson2015-04-22-1/+194
| | | | | | | | | | Initial filesystem images are generally highly compressible. Add a routine gzwrite that allows gzip-compressed images to be written to block devices. Signed-off-by: Eric Nelson <eric.nelson@boundarydevices.com> Reviewed-by: Tom Rini <trini@ti.com>
* gunzip: Update lenp even on errorSimon Glass2015-01-14-3/+4
| | | | | | | This allows the caller to easily detect how much of the destination buffer has been used. Signed-off-by: Simon Glass <sjg@chromium.org>
* gzip: correctly bounds-check output bufferKees Cook2013-09-03-2/+2
| | | | | | | | The output buffer size must not be reset by the gzip decoder or there is a risk of overflowing memory during decompression. Signed-off-by: Kees Cook <keescook@chromium.org> Acked-by: Simon Glass <sjg@chromium.org>
* Add GPL-2.0+ SPDX-License-Identifier to source filesWolfgang Denk2013-07-24-17/+1
| | | | | | Signed-off-by: Wolfgang Denk <wd@denx.de> [trini: Fixup common/cmd_io.c] Signed-off-by: Tom Rini <trini@ti.com>
* gunzip: rename z{alloc, free} to gz{alloc, free}Mike Frysinger2012-04-30-7/+4
| | | | | | | This allows us to add a proper zalloc() func (one that does a zeroing alloc), and removes duplicate prototypes. Signed-off-by: Mike Frysinger <vapier@gentoo.org>
* Fix gunzip to work for any gziped uImage sizeCatalin Radu2011-04-12-6/+10
| | | | Signed-off-by: Catalin Radu <Catalin@VirtualMetrix.com>
* zlib/gunzip: Use WATCHDOG_RESET macroStefan Roese2010-10-12-5/+0
| | | | | | | | | | | | | | | | | | | | | | As usually done in U-Boot, the watchdog_reset code is called via a macro (WATCHDOG_RESET). In zlib.c this was done differently, by using a function pointer which is initialized with WATCHDOG_RESET upon watchdog usage or with NULL otherwise. This patch now uses the plain WATCHDOG_RESET macros to call the function resulting in slightly smaller U-Boot images and simpler code. U-Boot code size reduction: PowerPC board with watchdog support (lwmon5): -> 80 bytes smaller image size PowerPC board without watchdog support (sequoia): -> 112 bytes smaller image size Signed-off-by: Stefan Roese <sr@denx.de> Cc: Detlev Zundel <dzu@denx.de> Cc: Wolfgang Denk <wd@denx.de> Acked-by: Detlev Zundel <dzu@denx.de>
* Rename lib_generic/ to lib/Peter Tyser2010-04-13-0/+124
Now that the other architecture-specific lib directories have been moved out of the top-level directory there's not much reason to have the '_generic' suffix on the common lib directory. Signed-off-by: Peter Tyser <ptyser@xes-inc.com>