blob: deca61c044971b750720388352378104e5f042a2 [file] [log] [blame]
Nicholas Flintham1e3d3112013-04-10 10:48:38 +01001#define _LINUX_STRING_H_
2
3#include <linux/compiler.h>
4#include <linux/types.h>
5#include <linux/stddef.h>
6#include <linux/linkage.h>
7#include <asm/string.h>
8
9extern unsigned long free_mem_ptr;
10extern unsigned long free_mem_end_ptr;
11extern void error(char *);
12
13#define STATIC static
14#define STATIC_RW_DATA
15
16#define ARCH_HAS_DECOMP_WDOG
17
18#ifdef DEBUG
19# define Assert(cond,msg) {if(!(cond)) error(msg);}
20# define Trace(x) fprintf x
21# 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#else
26# 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#endif
33
34#ifdef CONFIG_KERNEL_GZIP
35#include "../../../../lib/decompress_inflate.c"
36#endif
37
38#ifdef CONFIG_KERNEL_LZO
39#include "../../../../lib/decompress_unlzo.c"
40#endif
41
42#ifdef CONFIG_KERNEL_LZMA
43#include "../../../../lib/decompress_unlzma.c"
44#endif
45
46#ifdef CONFIG_KERNEL_XZ
47#define memmove memmove
48#define memcpy memcpy
49#include "../../../../lib/decompress_unxz.c"
50#endif
51
52int do_decompress(u8 *input, int len, u8 *output, void (*error)(char *x))
53{
54 return decompress(input, len, NULL, NULL, output, NULL, error);
55}