aboutsummaryrefslogtreecommitdiff
path: root/linux/lib
diff options
context:
space:
mode:
authorLasse Collin <lasse.collin@tukaani.org>2010-11-24 07:26:31 +0200
committerLasse Collin <lasse.collin@tukaani.org>2010-11-24 07:26:31 +0200
commit7af581c41d3342d1b247824456ae83f78d071106 (patch)
tree1fad5bc5d72e37cd7053dea5d88f5620268c92ab /linux/lib
parentb4f568b4e0d0c39da0fa98497122a3cee8c0e34e (diff)
downloadxz-embedded-7af581c41d3342d1b247824456ae83f78d071106.tar.gz
Get rid of XZ_IGNORE_KCONFIG macro.
It's no longer needed because initramfs decompression uses the regular xz_dec module. The definitions of memeq(), memzero(), and get_le32() macros were moved to be done after all headers have been included. Shouldn't matter in practice but looks safer just in case some of those names appear in other headers in the future.
Diffstat (limited to 'linux/lib')
-rw-r--r--linux/lib/decompress_unxz.c6
-rw-r--r--linux/lib/xz/xz_private.h15
2 files changed, 8 insertions, 13 deletions
diff --git a/linux/lib/decompress_unxz.c b/linux/lib/decompress_unxz.c
index e21194f..dbd90db 100644
--- a/linux/lib/decompress_unxz.c
+++ b/linux/lib/decompress_unxz.c
@@ -119,11 +119,9 @@
#define XZ_INTERNAL_CRC32 1
/*
- * Ignore the configuration specified in the kernel config for the xz_dec
- * module. For boot time use, we enable only the BCJ filter of the current
- * architecture, or none if no BCJ filter is available for the architecture.
+ * For boot time use, we enable only the BCJ filter of the current
+ * architecture or none if no BCJ filter is available for the architecture.
*/
-#define XZ_IGNORE_KCONFIG
#ifdef CONFIG_X86
# define XZ_DEC_X86
#endif
diff --git a/linux/lib/xz/xz_private.h b/linux/lib/xz/xz_private.h
index 213d026..0ec855f 100644
--- a/linux/lib/xz/xz_private.h
+++ b/linux/lib/xz/xz_private.h
@@ -11,19 +11,14 @@
#define XZ_PRIVATE_H
#ifdef __KERNEL__
+# include <linux/xz.h>
+# include <asm/byteorder.h>
+# include <asm/unaligned.h>
/* XZ_PREBOOT may be defined only via decompress_unxz.c. */
# ifndef XZ_PREBOOT
# include <linux/slab.h>
# include <linux/vmalloc.h>
# include <linux/string.h>
-# define memeq(a, b, size) (memcmp(a, b, size) == 0)
-# define memzero(buf, size) memset(buf, 0, size)
-# endif
-# include <asm/byteorder.h>
-# include <asm/unaligned.h>
-# define get_le32(p) le32_to_cpup((const uint32_t *)(p))
- /* XZ_IGNORE_KCONFIG may be defined only via decompress_unxz.c. */
-# ifndef XZ_IGNORE_KCONFIG
# ifdef CONFIG_XZ_DEC_X86
# define XZ_DEC_X86
# endif
@@ -42,8 +37,10 @@
# ifdef CONFIG_XZ_DEC_SPARC
# define XZ_DEC_SPARC
# endif
+# define memeq(a, b, size) (memcmp(a, b, size) == 0)
+# define memzero(buf, size) memset(buf, 0, size)
# endif
-# include <linux/xz.h>
+# define get_le32(p) le32_to_cpup((const uint32_t *)(p))
#else
/*
* For userspace builds, use a separate header to define the required