diff options
Diffstat (limited to 'lib')
| -rw-r--r-- | lib/Kconfig | 4 | ||||
| -rw-r--r-- | lib/Makefile | 1 | ||||
| -rw-r--r-- | lib/decompress.c | 5 |
3 files changed, 10 insertions, 0 deletions
diff --git a/lib/Kconfig b/lib/Kconfig index 1cfe51628e1..97b136ff117 100644 --- a/lib/Kconfig +++ b/lib/Kconfig | |||
| @@ -117,6 +117,10 @@ config DECOMPRESS_BZIP2 | |||
| 117 | config DECOMPRESS_LZMA | 117 | config DECOMPRESS_LZMA |
| 118 | tristate | 118 | tristate |
| 119 | 119 | ||
| 120 | config DECOMPRESS_LZO | ||
| 121 | select LZO_DECOMPRESS | ||
| 122 | tristate | ||
| 123 | |||
| 120 | # | 124 | # |
| 121 | # Generic allocator support is selected if needed | 125 | # Generic allocator support is selected if needed |
| 122 | # | 126 | # |
diff --git a/lib/Makefile b/lib/Makefile index 347ad8db29d..911b25aed1e 100644 --- a/lib/Makefile +++ b/lib/Makefile | |||
| @@ -69,6 +69,7 @@ obj-$(CONFIG_LZO_DECOMPRESS) += lzo/ | |||
| 69 | lib-$(CONFIG_DECOMPRESS_GZIP) += decompress_inflate.o | 69 | lib-$(CONFIG_DECOMPRESS_GZIP) += decompress_inflate.o |
| 70 | lib-$(CONFIG_DECOMPRESS_BZIP2) += decompress_bunzip2.o | 70 | lib-$(CONFIG_DECOMPRESS_BZIP2) += decompress_bunzip2.o |
| 71 | lib-$(CONFIG_DECOMPRESS_LZMA) += decompress_unlzma.o | 71 | lib-$(CONFIG_DECOMPRESS_LZMA) += decompress_unlzma.o |
| 72 | lib-$(CONFIG_DECOMPRESS_LZO) += decompress_unlzo.o | ||
| 72 | 73 | ||
| 73 | obj-$(CONFIG_TEXTSEARCH) += textsearch.o | 74 | obj-$(CONFIG_TEXTSEARCH) += textsearch.o |
| 74 | obj-$(CONFIG_TEXTSEARCH_KMP) += ts_kmp.o | 75 | obj-$(CONFIG_TEXTSEARCH_KMP) += ts_kmp.o |
diff --git a/lib/decompress.c b/lib/decompress.c index d2842f57167..a7606815541 100644 --- a/lib/decompress.c +++ b/lib/decompress.c | |||
| @@ -9,6 +9,7 @@ | |||
| 9 | #include <linux/decompress/bunzip2.h> | 9 | #include <linux/decompress/bunzip2.h> |
| 10 | #include <linux/decompress/unlzma.h> | 10 | #include <linux/decompress/unlzma.h> |
| 11 | #include <linux/decompress/inflate.h> | 11 | #include <linux/decompress/inflate.h> |
| 12 | #include <linux/decompress/unlzo.h> | ||
| 12 | 13 | ||
| 13 | #include <linux/types.h> | 14 | #include <linux/types.h> |
| 14 | #include <linux/string.h> | 15 | #include <linux/string.h> |
| @@ -22,6 +23,9 @@ | |||
| 22 | #ifndef CONFIG_DECOMPRESS_LZMA | 23 | #ifndef CONFIG_DECOMPRESS_LZMA |
| 23 | # define unlzma NULL | 24 | # define unlzma NULL |
| 24 | #endif | 25 | #endif |
| 26 | #ifndef CONFIG_DECOMPRESS_LZO | ||
| 27 | # define unlzo NULL | ||
| 28 | #endif | ||
| 25 | 29 | ||
| 26 | static const struct compress_format { | 30 | static const struct compress_format { |
| 27 | unsigned char magic[2]; | 31 | unsigned char magic[2]; |
| @@ -32,6 +36,7 @@ static const struct compress_format { | |||
| 32 | { {037, 0236}, "gzip", gunzip }, | 36 | { {037, 0236}, "gzip", gunzip }, |
| 33 | { {0x42, 0x5a}, "bzip2", bunzip2 }, | 37 | { {0x42, 0x5a}, "bzip2", bunzip2 }, |
| 34 | { {0x5d, 0x00}, "lzma", unlzma }, | 38 | { {0x5d, 0x00}, "lzma", unlzma }, |
| 39 | { {0x89, 0x4c}, "lzo", unlzo }, | ||
| 35 | { {0, 0}, NULL, NULL } | 40 | { {0, 0}, NULL, NULL } |
| 36 | }; | 41 | }; |
| 37 | 42 | ||
