| Russell King | 5de813b | 2010-02-25 12:14:40 +0000 | [diff] [blame] | 1 | #define _LINUX_STRING_H_ | 
|  | 2 |  | 
|  | 3 | #include <linux/compiler.h>	/* for inline */ | 
|  | 4 | #include <linux/types.h>	/* for size_t */ | 
|  | 5 | #include <linux/stddef.h>	/* for NULL */ | 
|  | 6 | #include <linux/linkage.h> | 
|  | 7 | #include <asm/string.h> | 
|  | 8 |  | 
|  | 9 | extern unsigned long free_mem_ptr; | 
|  | 10 | extern unsigned long free_mem_end_ptr; | 
|  | 11 | extern void error(char *); | 
|  | 12 |  | 
|  | 13 | #define STATIC static | 
| Russell King | b89ebad | 2010-03-15 14:29:22 +0000 | [diff] [blame] | 14 | #define STATIC_RW_DATA	/* non-static please */ | 
| Russell King | 5de813b | 2010-02-25 12:14:40 +0000 | [diff] [blame] | 15 |  | 
|  | 16 | #define ARCH_HAS_DECOMP_WDOG | 
|  | 17 |  | 
|  | 18 | /* Diagnostic functions */ | 
|  | 19 | #ifdef DEBUG | 
|  | 20 | #  define Assert(cond,msg) {if(!(cond)) error(msg);} | 
|  | 21 | #  define Trace(x) fprintf x | 
|  | 22 | #  define Tracev(x) {if (verbose) fprintf x ;} | 
|  | 23 | #  define Tracevv(x) {if (verbose>1) fprintf x ;} | 
|  | 24 | #  define Tracec(c,x) {if (verbose && (c)) fprintf x ;} | 
|  | 25 | #  define Tracecv(c,x) {if (verbose>1 && (c)) fprintf x ;} | 
|  | 26 | #else | 
|  | 27 | #  define Assert(cond,msg) | 
|  | 28 | #  define Trace(x) | 
|  | 29 | #  define Tracev(x) | 
|  | 30 | #  define Tracevv(x) | 
|  | 31 | #  define Tracec(c,x) | 
|  | 32 | #  define Tracecv(c,x) | 
|  | 33 | #endif | 
|  | 34 |  | 
|  | 35 | #ifdef CONFIG_KERNEL_GZIP | 
|  | 36 | #include "../../../../lib/decompress_inflate.c" | 
|  | 37 | #endif | 
|  | 38 |  | 
|  | 39 | #ifdef CONFIG_KERNEL_LZO | 
|  | 40 | #include "../../../../lib/decompress_unlzo.c" | 
|  | 41 | #endif | 
|  | 42 |  | 
| Albin Tonnerre | 6e8699f | 2010-04-03 11:40:28 +0100 | [diff] [blame] | 43 | #ifdef CONFIG_KERNEL_LZMA | 
|  | 44 | #include "../../../../lib/decompress_unlzma.c" | 
|  | 45 | #endif | 
|  | 46 |  | 
| Russell King | 5de813b | 2010-02-25 12:14:40 +0000 | [diff] [blame] | 47 | void do_decompress(u8 *input, int len, u8 *output, void (*error)(char *x)) | 
|  | 48 | { | 
|  | 49 | decompress(input, len, NULL, NULL, output, NULL, error); | 
|  | 50 | } |