~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

TOMOYO Linux Cross Reference
Linux/arch/arm/boot/compressed/decompress.c

Version: ~ [ linux-6.11.5 ] ~ [ linux-6.10.14 ] ~ [ linux-6.9.12 ] ~ [ linux-6.8.12 ] ~ [ linux-6.7.12 ] ~ [ linux-6.6.58 ] ~ [ linux-6.5.13 ] ~ [ linux-6.4.16 ] ~ [ linux-6.3.13 ] ~ [ linux-6.2.16 ] ~ [ linux-6.1.114 ] ~ [ linux-6.0.19 ] ~ [ linux-5.19.17 ] ~ [ linux-5.18.19 ] ~ [ linux-5.17.15 ] ~ [ linux-5.16.20 ] ~ [ linux-5.15.169 ] ~ [ linux-5.14.21 ] ~ [ linux-5.13.19 ] ~ [ linux-5.12.19 ] ~ [ linux-5.11.22 ] ~ [ linux-5.10.228 ] ~ [ linux-5.9.16 ] ~ [ linux-5.8.18 ] ~ [ linux-5.7.19 ] ~ [ linux-5.6.19 ] ~ [ linux-5.5.19 ] ~ [ linux-5.4.284 ] ~ [ linux-5.3.18 ] ~ [ linux-5.2.21 ] ~ [ linux-5.1.21 ] ~ [ linux-5.0.21 ] ~ [ linux-4.20.17 ] ~ [ linux-4.19.322 ] ~ [ linux-4.18.20 ] ~ [ linux-4.17.19 ] ~ [ linux-4.16.18 ] ~ [ linux-4.15.18 ] ~ [ linux-4.14.336 ] ~ [ linux-4.13.16 ] ~ [ linux-4.12.14 ] ~ [ linux-4.11.12 ] ~ [ linux-4.10.17 ] ~ [ linux-4.9.337 ] ~ [ linux-4.4.302 ] ~ [ linux-3.10.108 ] ~ [ linux-2.6.32.71 ] ~ [ linux-2.6.0 ] ~ [ linux-2.4.37.11 ] ~ [ unix-v6-master ] ~ [ ccs-tools-1.8.9 ] ~ [ policy-sample ] ~
Architecture: ~ [ i386 ] ~ [ alpha ] ~ [ m68k ] ~ [ mips ] ~ [ ppc ] ~ [ sparc ] ~ [ sparc64 ] ~

  1 // SPDX-License-Identifier: GPL-2.0
  2 #define _LINUX_STRING_H_
  3 
  4 #include <linux/compiler.h>     /* for inline */
  5 #include <linux/types.h>        /* for size_t */
  6 #include <linux/stddef.h>       /* for NULL */
  7 #include <linux/linkage.h>
  8 #include <asm/string.h>
  9 #include "misc.h"
 10 
 11 #define STATIC static
 12 #define STATIC_RW_DATA  /* non-static please */
 13 
 14 /* Diagnostic functions */
 15 #ifdef DEBUG
 16 #  define Assert(cond,msg) {if(!(cond)) error(msg);}
 17 #  define Trace(x) fprintf x
 18 #  define Tracev(x) {if (verbose) fprintf x ;}
 19 #  define Tracevv(x) {if (verbose>1) fprintf x ;}
 20 #  define Tracec(c,x) {if (verbose && (c)) fprintf x ;}
 21 #  define Tracecv(c,x) {if (verbose>1 && (c)) fprintf x ;}
 22 #else
 23 #  define Assert(cond,msg)
 24 #  define Trace(x)
 25 #  define Tracev(x)
 26 #  define Tracevv(x)
 27 #  define Tracec(c,x)
 28 #  define Tracecv(c,x)
 29 #endif
 30 
 31 /* Not needed, but used in some headers pulled in by decompressors */
 32 extern char * strstr(const char * s1, const char *s2);
 33 extern size_t strlen(const char *s);
 34 extern int strcmp(const char *cs, const char *ct);
 35 extern int memcmp(const void *cs, const void *ct, size_t count);
 36 extern char * strchrnul(const char *, int);
 37 
 38 #ifdef CONFIG_KERNEL_GZIP
 39 #include "../../../../lib/decompress_inflate.c"
 40 #endif
 41 
 42 #ifdef CONFIG_KERNEL_LZO
 43 #include "../../../../lib/decompress_unlzo.c"
 44 #endif
 45 
 46 #ifdef CONFIG_KERNEL_LZMA
 47 #include "../../../../lib/decompress_unlzma.c"
 48 #endif
 49 
 50 #ifdef CONFIG_KERNEL_XZ
 51 /* Prevent KASAN override of string helpers in decompressor */
 52 #undef memmove
 53 #define memmove memmove
 54 #undef memcpy
 55 #define memcpy memcpy
 56 #include "../../../../lib/decompress_unxz.c"
 57 #endif
 58 
 59 #ifdef CONFIG_KERNEL_LZ4
 60 #include "../../../../lib/decompress_unlz4.c"
 61 #endif
 62 
 63 int do_decompress(u8 *input, int len, u8 *output, void (*error)(char *x))
 64 {
 65         return __decompress(input, len, NULL, NULL, output, 0, NULL, error);
 66 }
 67 

~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

kernel.org | git.kernel.org | LWN.net | Project Home | SVN repository | Mail admin

Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.

sflogo.php