wok-6.x annotate busybox/stuff/busybox-1.17.0-zmodules.u @ rev 5776

busybox: update patches
author Pascal Bellard <pascal.bellard@slitaz.org>
date Wed Jul 07 20:55:53 2010 +0200 (2010-07-07)
parents 74d790665d71
children 32eeee907ef2
rev   line source
pascal@5776 1 Add LZMA_DEFAULT_MAGIC support
pascal@5776 2 --- busybox-1.17.0/include/unarchive.h
pascal@5776 3 +++ busybox-1.17.0/include/unarchive.h
pascal@5776 4 @@ -9,6 +9,8 @@
pascal@5776 5 COMPRESS_MAGIC = 0x1f9d,
pascal@5776 6 GZIP_MAGIC = 0x1f8b,
pascal@5776 7 BZIP2_MAGIC = 'B' * 256 + 'Z',
pascal@5776 8 + /* lzma default options: lc=3 lp=0 pb=2, historic % 256 == 0 */
pascal@5776 9 + LZMA_DEFAULT_MAGIC = 0x5d00,
pascal@5776 10 /* .xz signature: 0xfd, '7', 'z', 'X', 'Z', 0x00 */
pascal@5776 11 /* More info at: http://tukaani.org/xz/xz-file-format.txt */
pascal@5776 12 XZ_MAGIC1 = 0xfd * 256 + '7',
pascal@5776 13 @@ -20,6 +22,8 @@
pascal@5776 14 COMPRESS_MAGIC = 0x9d1f,
pascal@5776 15 GZIP_MAGIC = 0x8b1f,
pascal@5776 16 BZIP2_MAGIC = 'Z' * 256 + 'B',
pascal@5776 17 + /* lzma default options: lc=3 lp=0 pb=2, historic % 256 == 0 */
pascal@5776 18 + LZMA_DEFAULT_MAGIC = 0x5d,
pascal@5776 19 XZ_MAGIC1 = '7' * 256 + 0xfd,
pascal@5776 20 XZ_MAGIC2 = ((0 * 256 + 'Z') * 256 + 'X') * 256 + 'z',
pascal@5776 21 XZ_MAGIC1a = (('X' * 256 + 'z') * 256 + '7') * 256 + 0xfd,
pascal@5773 22
pascal@5773 23 --- busybox-1.17.0/libbb/read_printf.c
pascal@5773 24 +++ busybox-1.17.0/libbb/read_printf.c
pascal@5776 25 @@ -286,6 +286,16 @@
pascal@5776 26 # endif
pascal@5776 27 goto found_magic;
pascal@5776 28 }
pascal@5776 29 + if (ENABLE_FEATURE_SEAMLESS_LZMA
pascal@5776 30 + && magic.b16[0] == LZMA_DEFAULT_MAGIC
pascal@5776 31 + ) {
pascal@5776 32 +# if BB_MMU
pascal@5776 33 + xformer = unpack_lzma_stream;
pascal@5776 34 +# else
pascal@5776 35 + xformer_prog = "unlzma";
pascal@5776 36 +# endif
pascal@5776 37 + goto found_magic;
pascal@5776 38 + }
pascal@5776 39 if (ENABLE_FEATURE_SEAMLESS_XZ
pascal@5776 40 && magic.b16[0] == XZ_MAGIC1
pascal@5776 41 ) {