wok view busybox/stuff/busybox-1.20-zmodules.u @ rev 13605
Up: kmod (11)
author | Christophe Lincoln <pankso@slitaz.org> |
---|---|
date | Sat Nov 10 19:54:06 2012 +0100 (2012-11-10) |
parents | 2a66c0430085 |
children |
line source
1 Add LZMA_DEFAULT_MAGIC support
2 --- busybox-1.20/archival/libarchive/open_transformer.c.ORG
3 +++ busybox-1.20/archival/libarchive/open_transformer.c
4 @@ -126,6 +126,21 @@
5 /* .gz and .bz2 both have 2-byte signature, and their
6 * unpack_XXX_stream wants this header skipped. */
7 xread(fd, magic.b16, sizeof(magic.b16[0]));
8 +#if 1
9 +// SliTaz uses .gz suffix for lzma'd kernel modules
10 +#if BB_BIG_ENDIAN
11 +#define LZMA_DEFAULT_MAGIC 0x5d00
12 +#else
13 +#define LZMA_DEFAULT_MAGIC 0x5d
14 +#endif
15 + if (ENABLE_FEATURE_SEAMLESS_LZMA
16 + && magic.b16[0] == LZMA_DEFAULT_MAGIC
17 + ) {
18 + xlseek(fd, offset, SEEK_CUR);
19 + open_transformer_with_sig(fd, unpack_lzma_stream, "unlzma");
20 + return 0;
21 + }
22 +#endif
23 if (ENABLE_FEATURE_SEAMLESS_GZ
24 && magic.b16[0] == GZIP_MAGIC
25 ) {