summaryrefslogtreecommitdiffstats
path: root/lib/decompress.c
diff options
context:
space:
mode:
authorAlbin Tonnerre <albin.tonnerre@free-electrons.com>2010-01-08 14:42:46 -0800
committerLinus Torvalds <torvalds@linux-foundation.org>2010-01-11 09:34:05 -0800
commitcacb246f8db2b9eba89d44a0f0dd4f6ed93bc113 (patch)
tree8fff3df983d02c362ba90b334b77a7a93315455e /lib/decompress.c
parent13510997d600a076e064f10587a8f6d20f8fff41 (diff)
downloadlinux-stable-cacb246f8db2b9eba89d44a0f0dd4f6ed93bc113.tar.gz
linux-stable-cacb246f8db2b9eba89d44a0f0dd4f6ed93bc113.tar.bz2
linux-stable-cacb246f8db2b9eba89d44a0f0dd4f6ed93bc113.zip
Add LZO compression support for initramfs and old-style initrd
Signed-off-by: Albin Tonnerre <albin.tonnerre@free-electrons.com> Tested-by: Wu Zhangjin <wuzhangjin@gmail.com> Acked-by: "H. Peter Anvin" <hpa@zytor.com> Cc: Ingo Molnar <mingo@elte.hu> Cc: Thomas Gleixner <tglx@linutronix.de> Tested-by: Russell King <rmk@arm.linux.org.uk> Acked-by: Russell King <rmk@arm.linux.org.uk> Cc: Ralf Baechle <ralf@linux-mips.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'lib/decompress.c')
-rw-r--r--lib/decompress.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/decompress.c b/lib/decompress.c
index d2842f571674..a7606815541f 100644
--- a/lib/decompress.c
+++ b/lib/decompress.c
@@ -9,6 +9,7 @@
#include <linux/decompress/bunzip2.h>
#include <linux/decompress/unlzma.h>
#include <linux/decompress/inflate.h>
+#include <linux/decompress/unlzo.h>
#include <linux/types.h>
#include <linux/string.h>
@@ -22,6 +23,9 @@
#ifndef CONFIG_DECOMPRESS_LZMA
# define unlzma NULL
#endif
+#ifndef CONFIG_DECOMPRESS_LZO
+# define unlzo NULL
+#endif
static const struct compress_format {
unsigned char magic[2];
@@ -32,6 +36,7 @@ static const struct compress_format {
{ {037, 0236}, "gzip", gunzip },
{ {0x42, 0x5a}, "bzip2", bunzip2 },
{ {0x5d, 0x00}, "lzma", unlzma },
+ { {0x89, 0x4c}, "lzo", unlzo },
{ {0, 0}, NULL, NULL }
};