Path: blob/master/arch/arm/boot/compressed/decompress.c
10819 views
#define _LINUX_STRING_H_12#include <linux/compiler.h> /* for inline */3#include <linux/types.h> /* for size_t */4#include <linux/stddef.h> /* for NULL */5#include <linux/linkage.h>6#include <asm/string.h>78extern unsigned long free_mem_ptr;9extern unsigned long free_mem_end_ptr;10extern void error(char *);1112#define STATIC static13#define STATIC_RW_DATA /* non-static please */1415#define ARCH_HAS_DECOMP_WDOG1617/* Diagnostic functions */18#ifdef DEBUG19# define Assert(cond,msg) {if(!(cond)) error(msg);}20# define Trace(x) fprintf x21# define Tracev(x) {if (verbose) fprintf x ;}22# define Tracevv(x) {if (verbose>1) fprintf x ;}23# define Tracec(c,x) {if (verbose && (c)) fprintf x ;}24# define Tracecv(c,x) {if (verbose>1 && (c)) fprintf x ;}25#else26# define Assert(cond,msg)27# define Trace(x)28# define Tracev(x)29# define Tracevv(x)30# define Tracec(c,x)31# define Tracecv(c,x)32#endif3334#ifdef CONFIG_KERNEL_GZIP35#include "../../../../lib/decompress_inflate.c"36#endif3738#ifdef CONFIG_KERNEL_LZO39#include "../../../../lib/decompress_unlzo.c"40#endif4142#ifdef CONFIG_KERNEL_LZMA43#include "../../../../lib/decompress_unlzma.c"44#endif4546int do_decompress(u8 *input, int len, u8 *output, void (*error)(char *x))47{48return decompress(input, len, NULL, NULL, output, NULL, error);49}505152