1 diff -Nur linux-2.6.16/fs/squashfs/inode.c linux-2.6.16-owrt/fs/squashfs/inode.c
2 --- linux-2.6.16/fs/squashfs/inode.c 2006-03-21 10:55:59.000000000 +0100
3 +++ linux-2.6.16-owrt/fs/squashfs/inode.c 2006-03-21 12:24:37.000000000 +0100
5 * Copyright (c) 2002, 2003, 2004, 2005, 2006
6 * Phillip Lougher <phillip@lougher.org.uk>
8 + * LZMA decompressor support added by Oleg I. Vdovikin
9 + * Copyright (c) 2005 Oleg I.Vdovikin <oleg@cs.msu.su>
11 * This program is free software; you can redistribute it and/or
12 * modify it under the terms of the GNU General Public License
13 * as published by the Free Software Foundation; either version 2,
18 +#define SQUASHFS_LZMA
19 #include <linux/types.h>
20 #include <linux/squashfs_fs.h>
21 #include <linux/module.h>
27 +#include "LzmaDecode.h"
29 +/* default LZMA settings, should be in sync with mksquashfs */
34 +#define LZMA_WORKSPACE_SIZE ((LZMA_BASE_SIZE + \
35 + (LZMA_LIT_SIZE << (LZMA_LC + LZMA_LP))) * sizeof(CProb))
39 static void squashfs_put_super(struct super_block *);
40 static int squashfs_statfs(struct super_block *, struct kstatfs *);
41 static int squashfs_symlink_readpage(struct file *file, struct page *page);
43 const char *, void *);
47 +static unsigned char lzma_workspace[LZMA_WORKSPACE_SIZE];
49 static z_stream stream;
52 static struct file_system_type squashfs_fs_type = {
59 + if ((zlib_err = LzmaDecode(lzma_workspace,
60 + LZMA_WORKSPACE_SIZE, LZMA_LC, LZMA_LP, LZMA_PB,
61 + c_buffer, c_byte, buffer, msblk->read_size, &bytes)) != LZMA_RESULT_OK)
63 + ERROR("lzma returned unexpected result 0x%x\n", zlib_err);
67 stream.next_in = c_buffer;
68 stream.avail_in = c_byte;
69 stream.next_out = buffer;
73 bytes = stream.total_out;
76 up(&msblk->read_data_mutex);
78 @@ -2046,15 +2077,19 @@
79 printk(KERN_INFO "squashfs: version 3.0 (2006/03/15) "
82 +#ifndef SQUASHFS_LZMA
83 if (!(stream.workspace = vmalloc(zlib_inflate_workspacesize()))) {
84 ERROR("Failed to allocate zlib workspace\n");
91 if ((err = register_filesystem(&squashfs_fs_type))) {
92 +#ifndef SQUASHFS_LZMA
93 vfree(stream.workspace);
100 static void __exit exit_squashfs_fs(void)
102 +#ifndef SQUASHFS_LZMA
103 vfree(stream.workspace);
105 unregister_filesystem(&squashfs_fs_type);
106 destroy_inodecache();
108 diff -Nur linux-2.6.16/fs/squashfs/LzmaDecode.c linux-2.6.16-owrt/fs/squashfs/LzmaDecode.c
109 --- linux-2.6.16/fs/squashfs/LzmaDecode.c 1970-01-01 01:00:00.000000000 +0100
110 +++ linux-2.6.16-owrt/fs/squashfs/LzmaDecode.c 2006-03-21 10:56:57.000000000 +0100
116 + LZMA SDK 4.05 Copyright (c) 1999-2004 Igor Pavlov (2004-08-25)
117 + http://www.7-zip.org/
119 + LZMA SDK is licensed under two licenses:
120 + 1) GNU Lesser General Public License (GNU LGPL)
121 + 2) Common Public License (CPL)
122 + It means that you can select one of these two licenses and
123 + follow rules of that license.
126 + Igor Pavlov, as the author of this code, expressly permits you to
127 + statically or dynamically link your code (or bind by name) to the
128 + interfaces of this file without subjecting your linked code to the
129 + terms of the CPL or GNU LGPL. Any modifications or additions
130 + to this file, however, are subject to the LGPL or CPL terms.
133 +#include "LzmaDecode.h"
136 +#define Byte unsigned char
139 +#define kNumTopBits 24
140 +#define kTopValue ((UInt32)1 << kNumTopBits)
142 +#define kNumBitModelTotalBits 11
143 +#define kBitModelTotal (1 << kNumBitModelTotalBits)
144 +#define kNumMoveBits 5
146 +typedef struct _CRangeDecoder
153 + ILzmaInCallback *InCallback;
159 +Byte RangeDecoderReadByte(CRangeDecoder *rd)
161 + if (rd->Buffer == rd->BufferLim)
165 + rd->Result = rd->InCallback->Read(rd->InCallback, &rd->Buffer, &size);
166 + rd->BufferLim = rd->Buffer + size;
170 + rd->ExtraBytes = 1;
174 + return (*rd->Buffer++);
177 +/* #define ReadByte (*rd->Buffer++) */
178 +#define ReadByte (RangeDecoderReadByte(rd))
180 +void RangeDecoderInit(CRangeDecoder *rd,
182 + ILzmaInCallback *inCallback
184 + Byte *stream, UInt32 bufferSize
190 + rd->InCallback = inCallback;
191 + rd->Buffer = rd->BufferLim = 0;
193 + rd->Buffer = stream;
194 + rd->BufferLim = stream + bufferSize;
196 + rd->ExtraBytes = 0;
198 + rd->Range = (0xFFFFFFFF);
199 + for(i = 0; i < 5; i++)
200 + rd->Code = (rd->Code << 8) | ReadByte;
203 +#define RC_INIT_VAR UInt32 range = rd->Range; UInt32 code = rd->Code;
204 +#define RC_FLUSH_VAR rd->Range = range; rd->Code = code;
205 +#define RC_NORMALIZE if (range < kTopValue) { range <<= 8; code = (code << 8) | ReadByte; }
207 +UInt32 RangeDecoderDecodeDirectBits(CRangeDecoder *rd, int numTotalBits)
212 + for (i = numTotalBits; i > 0; i--)
224 + t = (code - range) >> 31;
226 + code -= range & (t - 1);
227 + result = (result + result) | (1 - t);
235 +int RangeDecoderBitDecode(CProb *prob, CRangeDecoder *rd)
237 + UInt32 bound = (rd->Range >> kNumBitModelTotalBits) * *prob;
238 + if (rd->Code < bound)
241 + *prob += (kBitModelTotal - *prob) >> kNumMoveBits;
242 + if (rd->Range < kTopValue)
244 + rd->Code = (rd->Code << 8) | ReadByte;
251 + rd->Range -= bound;
253 + *prob -= (*prob) >> kNumMoveBits;
254 + if (rd->Range < kTopValue)
256 + rd->Code = (rd->Code << 8) | ReadByte;
263 +#define RC_GET_BIT2(prob, mi, A0, A1) \
264 + UInt32 bound = (range >> kNumBitModelTotalBits) * *prob; \
265 + if (code < bound) \
266 + { A0; range = bound; *prob += (kBitModelTotal - *prob) >> kNumMoveBits; mi <<= 1; } \
268 + { A1; range -= bound; code -= bound; *prob -= (*prob) >> kNumMoveBits; mi = (mi + mi) + 1; } \
271 +#define RC_GET_BIT(prob, mi) RC_GET_BIT2(prob, mi, ; , ;)
273 +int RangeDecoderBitTreeDecode(CProb *probs, int numLevels, CRangeDecoder *rd)
277 + #ifdef _LZMA_LOC_OPT
280 + for(i = numLevels; i > 0; i--)
282 + #ifdef _LZMA_LOC_OPT
283 + CProb *prob = probs + mi;
284 + RC_GET_BIT(prob, mi)
286 + mi = (mi + mi) + RangeDecoderBitDecode(probs + mi, rd);
289 + #ifdef _LZMA_LOC_OPT
292 + return mi - (1 << numLevels);
295 +int RangeDecoderReverseBitTreeDecode(CProb *probs, int numLevels, CRangeDecoder *rd)
300 + #ifdef _LZMA_LOC_OPT
303 + for(i = 0; i < numLevels; i++)
305 + #ifdef _LZMA_LOC_OPT
306 + CProb *prob = probs + mi;
307 + RC_GET_BIT2(prob, mi, ; , symbol |= (1 << i))
309 + int bit = RangeDecoderBitDecode(probs + mi, rd);
310 + mi = mi + mi + bit;
311 + symbol |= (bit << i);
314 + #ifdef _LZMA_LOC_OPT
320 +Byte LzmaLiteralDecode(CProb *probs, CRangeDecoder *rd)
323 + #ifdef _LZMA_LOC_OPT
328 + #ifdef _LZMA_LOC_OPT
329 + CProb *prob = probs + symbol;
330 + RC_GET_BIT(prob, symbol)
332 + symbol = (symbol + symbol) | RangeDecoderBitDecode(probs + symbol, rd);
335 + while (symbol < 0x100);
336 + #ifdef _LZMA_LOC_OPT
342 +Byte LzmaLiteralDecodeMatch(CProb *probs, CRangeDecoder *rd, Byte matchByte)
345 + #ifdef _LZMA_LOC_OPT
351 + int matchBit = (matchByte >> 7) & 1;
353 + #ifdef _LZMA_LOC_OPT
355 + CProb *prob = probs + ((1 + matchBit) << 8) + symbol;
356 + RC_GET_BIT2(prob, symbol, bit = 0, bit = 1)
359 + bit = RangeDecoderBitDecode(probs + ((1 + matchBit) << 8) + symbol, rd);
360 + symbol = (symbol << 1) | bit;
362 + if (matchBit != bit)
364 + while (symbol < 0x100)
366 + #ifdef _LZMA_LOC_OPT
367 + CProb *prob = probs + symbol;
368 + RC_GET_BIT(prob, symbol)
370 + symbol = (symbol + symbol) | RangeDecoderBitDecode(probs + symbol, rd);
376 + while (symbol < 0x100);
377 + #ifdef _LZMA_LOC_OPT
383 +#define kNumPosBitsMax 4
384 +#define kNumPosStatesMax (1 << kNumPosBitsMax)
386 +#define kLenNumLowBits 3
387 +#define kLenNumLowSymbols (1 << kLenNumLowBits)
388 +#define kLenNumMidBits 3
389 +#define kLenNumMidSymbols (1 << kLenNumMidBits)
390 +#define kLenNumHighBits 8
391 +#define kLenNumHighSymbols (1 << kLenNumHighBits)
394 +#define LenChoice2 (LenChoice + 1)
395 +#define LenLow (LenChoice2 + 1)
396 +#define LenMid (LenLow + (kNumPosStatesMax << kLenNumLowBits))
397 +#define LenHigh (LenMid + (kNumPosStatesMax << kLenNumMidBits))
398 +#define kNumLenProbs (LenHigh + kLenNumHighSymbols)
400 +int LzmaLenDecode(CProb *p, CRangeDecoder *rd, int posState)
402 + if(RangeDecoderBitDecode(p + LenChoice, rd) == 0)
403 + return RangeDecoderBitTreeDecode(p + LenLow +
404 + (posState << kLenNumLowBits), kLenNumLowBits, rd);
405 + if(RangeDecoderBitDecode(p + LenChoice2, rd) == 0)
406 + return kLenNumLowSymbols + RangeDecoderBitTreeDecode(p + LenMid +
407 + (posState << kLenNumMidBits), kLenNumMidBits, rd);
408 + return kLenNumLowSymbols + kLenNumMidSymbols +
409 + RangeDecoderBitTreeDecode(p + LenHigh, kLenNumHighBits, rd);
412 +#define kNumStates 12
414 +#define kStartPosModelIndex 4
415 +#define kEndPosModelIndex 14
416 +#define kNumFullDistances (1 << (kEndPosModelIndex >> 1))
418 +#define kNumPosSlotBits 6
419 +#define kNumLenToPosStates 4
421 +#define kNumAlignBits 4
422 +#define kAlignTableSize (1 << kNumAlignBits)
424 +#define kMatchMinLen 2
427 +#define IsRep (IsMatch + (kNumStates << kNumPosBitsMax))
428 +#define IsRepG0 (IsRep + kNumStates)
429 +#define IsRepG1 (IsRepG0 + kNumStates)
430 +#define IsRepG2 (IsRepG1 + kNumStates)
431 +#define IsRep0Long (IsRepG2 + kNumStates)
432 +#define PosSlot (IsRep0Long + (kNumStates << kNumPosBitsMax))
433 +#define SpecPos (PosSlot + (kNumLenToPosStates << kNumPosSlotBits))
434 +#define Align (SpecPos + kNumFullDistances - kEndPosModelIndex)
435 +#define LenCoder (Align + kAlignTableSize)
436 +#define RepLenCoder (LenCoder + kNumLenProbs)
437 +#define Literal (RepLenCoder + kNumLenProbs)
439 +#if Literal != LZMA_BASE_SIZE
443 +#ifdef _LZMA_OUT_READ
445 +typedef struct _LzmaVarState
447 + CRangeDecoder RangeDecoder;
449 + UInt32 DictionarySize;
450 + UInt32 DictionaryPos;
457 + int PreviousIsMatch;
461 +int LzmaDecoderInit(
462 + unsigned char *buffer, UInt32 bufferSize,
463 + int lc, int lp, int pb,
464 + unsigned char *dictionary, UInt32 dictionarySize,
466 + ILzmaInCallback *inCallback
468 + unsigned char *inStream, UInt32 inSize
472 + LzmaVarState *vs = (LzmaVarState *)buffer;
473 + CProb *p = (CProb *)(buffer + sizeof(LzmaVarState));
474 + UInt32 numProbs = Literal + ((UInt32)LZMA_LIT_SIZE << (lc + lp));
476 + if (bufferSize < numProbs * sizeof(CProb) + sizeof(LzmaVarState))
477 + return LZMA_RESULT_NOT_ENOUGH_MEM;
478 + vs->Dictionary = dictionary;
479 + vs->DictionarySize = dictionarySize;
480 + vs->DictionaryPos = 0;
482 + vs->Reps[0] = vs->Reps[1] = vs->Reps[2] = vs->Reps[3] = 1;
487 + vs->PreviousIsMatch = 0;
489 + dictionary[dictionarySize - 1] = 0;
490 + for (i = 0; i < numProbs; i++)
491 + p[i] = kBitModelTotal >> 1;
492 + RangeDecoderInit(&vs->RangeDecoder,
499 + return LZMA_RESULT_OK;
502 +int LzmaDecode(unsigned char *buffer,
503 + unsigned char *outStream, UInt32 outSize,
504 + UInt32 *outSizeProcessed)
506 + LzmaVarState *vs = (LzmaVarState *)buffer;
507 + CProb *p = (CProb *)(buffer + sizeof(LzmaVarState));
508 + CRangeDecoder rd = vs->RangeDecoder;
509 + int state = vs->State;
510 + int previousIsMatch = vs->PreviousIsMatch;
512 + UInt32 rep0 = vs->Reps[0], rep1 = vs->Reps[1], rep2 = vs->Reps[2], rep3 = vs->Reps[3];
514 + UInt32 posStateMask = (1 << (vs->pb)) - 1;
515 + UInt32 literalPosMask = (1 << (vs->lp)) - 1;
517 + int len = vs->RemainLen;
518 + UInt32 globalPos = vs->GlobalPos;
520 + Byte *dictionary = vs->Dictionary;
521 + UInt32 dictionarySize = vs->DictionarySize;
522 + UInt32 dictionaryPos = vs->DictionaryPos;
526 + *outSizeProcessed = 0;
527 + return LZMA_RESULT_OK;
530 + while(len > 0 && nowPos < outSize)
532 + UInt32 pos = dictionaryPos - rep0;
533 + if (pos >= dictionarySize)
534 + pos += dictionarySize;
535 + outStream[nowPos++] = dictionary[dictionaryPos] = dictionary[pos];
536 + if (++dictionaryPos == dictionarySize)
540 + if (dictionaryPos == 0)
541 + previousByte = dictionary[dictionarySize - 1];
543 + previousByte = dictionary[dictionaryPos - 1];
547 + Byte *buffer, UInt32 bufferSize,
548 + int lc, int lp, int pb,
550 + ILzmaInCallback *inCallback,
552 + unsigned char *inStream, UInt32 inSize,
554 + unsigned char *outStream, UInt32 outSize,
555 + UInt32 *outSizeProcessed)
557 + UInt32 numProbs = Literal + ((UInt32)LZMA_LIT_SIZE << (lc + lp));
558 + CProb *p = (CProb *)buffer;
562 + int previousIsMatch = 0;
563 + Byte previousByte = 0;
564 + UInt32 rep0 = 1, rep1 = 1, rep2 = 1, rep3 = 1;
566 + UInt32 posStateMask = (1 << pb) - 1;
567 + UInt32 literalPosMask = (1 << lp) - 1;
569 + if (bufferSize < numProbs * sizeof(CProb))
570 + return LZMA_RESULT_NOT_ENOUGH_MEM;
571 + for (i = 0; i < numProbs; i++)
572 + p[i] = kBitModelTotal >> 1;
573 + RangeDecoderInit(&rd,
582 + *outSizeProcessed = 0;
583 + while(nowPos < outSize)
585 + int posState = (int)(
587 + #ifdef _LZMA_OUT_READ
593 + if (rd.Result != LZMA_RESULT_OK)
596 + if (rd.ExtraBytes != 0)
597 + return LZMA_RESULT_DATA_ERROR;
598 + if (RangeDecoderBitDecode(p + IsMatch + (state << kNumPosBitsMax) + posState, &rd) == 0)
600 + CProb *probs = p + Literal + (LZMA_LIT_SIZE *
603 + #ifdef _LZMA_OUT_READ
607 + & literalPosMask) << lc) + (previousByte >> (8 - lc))));
609 + if (state < 4) state = 0;
610 + else if (state < 10) state -= 3;
612 + if (previousIsMatch)
615 + #ifdef _LZMA_OUT_READ
616 + UInt32 pos = dictionaryPos - rep0;
617 + if (pos >= dictionarySize)
618 + pos += dictionarySize;
619 + matchByte = dictionary[pos];
621 + matchByte = outStream[nowPos - rep0];
623 + previousByte = LzmaLiteralDecodeMatch(probs, &rd, matchByte);
624 + previousIsMatch = 0;
627 + previousByte = LzmaLiteralDecode(probs, &rd);
628 + outStream[nowPos++] = previousByte;
629 + #ifdef _LZMA_OUT_READ
630 + dictionary[dictionaryPos] = previousByte;
631 + if (++dictionaryPos == dictionarySize)
637 + previousIsMatch = 1;
638 + if (RangeDecoderBitDecode(p + IsRep + state, &rd) == 1)
640 + if (RangeDecoderBitDecode(p + IsRepG0 + state, &rd) == 0)
642 + if (RangeDecoderBitDecode(p + IsRep0Long + (state << kNumPosBitsMax) + posState, &rd) == 0)
644 + #ifdef _LZMA_OUT_READ
649 + #ifdef _LZMA_OUT_READ
654 + return LZMA_RESULT_DATA_ERROR;
655 + state = state < 7 ? 9 : 11;
656 + #ifdef _LZMA_OUT_READ
657 + pos = dictionaryPos - rep0;
658 + if (pos >= dictionarySize)
659 + pos += dictionarySize;
660 + previousByte = dictionary[pos];
661 + dictionary[dictionaryPos] = previousByte;
662 + if (++dictionaryPos == dictionarySize)
665 + previousByte = outStream[nowPos - rep0];
667 + outStream[nowPos++] = previousByte;
674 + if(RangeDecoderBitDecode(p + IsRepG1 + state, &rd) == 0)
678 + if(RangeDecoderBitDecode(p + IsRepG2 + state, &rd) == 0)
690 + len = LzmaLenDecode(p + RepLenCoder, &rd, posState);
691 + state = state < 7 ? 8 : 11;
699 + state = state < 7 ? 7 : 10;
700 + len = LzmaLenDecode(p + LenCoder, &rd, posState);
701 + posSlot = RangeDecoderBitTreeDecode(p + PosSlot +
702 + ((len < kNumLenToPosStates ? len : kNumLenToPosStates - 1) <<
703 + kNumPosSlotBits), kNumPosSlotBits, &rd);
704 + if (posSlot >= kStartPosModelIndex)
706 + int numDirectBits = ((posSlot >> 1) - 1);
707 + rep0 = ((2 | ((UInt32)posSlot & 1)) << numDirectBits);
708 + if (posSlot < kEndPosModelIndex)
710 + rep0 += RangeDecoderReverseBitTreeDecode(
711 + p + SpecPos + rep0 - posSlot - 1, numDirectBits, &rd);
715 + rep0 += RangeDecoderDecodeDirectBits(&rd,
716 + numDirectBits - kNumAlignBits) << kNumAlignBits;
717 + rep0 += RangeDecoderReverseBitTreeDecode(p + Align, kNumAlignBits, &rd);
724 + if (rep0 == (UInt32)(0))
726 + /* it's for stream version */
731 + #ifdef _LZMA_OUT_READ
736 + return LZMA_RESULT_DATA_ERROR;
738 + len += kMatchMinLen;
741 + #ifdef _LZMA_OUT_READ
742 + UInt32 pos = dictionaryPos - rep0;
743 + if (pos >= dictionarySize)
744 + pos += dictionarySize;
745 + previousByte = dictionary[pos];
746 + dictionary[dictionaryPos] = previousByte;
747 + if (++dictionaryPos == dictionarySize)
750 + previousByte = outStream[nowPos - rep0];
752 + outStream[nowPos++] = previousByte;
755 + while(len > 0 && nowPos < outSize);
759 + #ifdef _LZMA_OUT_READ
760 + vs->RangeDecoder = rd;
761 + vs->DictionaryPos = dictionaryPos;
762 + vs->GlobalPos = globalPos + nowPos;
763 + vs->Reps[0] = rep0;
764 + vs->Reps[1] = rep1;
765 + vs->Reps[2] = rep2;
766 + vs->Reps[3] = rep3;
768 + vs->PreviousIsMatch = previousIsMatch;
769 + vs->RemainLen = len;
772 + *outSizeProcessed = nowPos;
773 + return LZMA_RESULT_OK;
775 diff -Nur linux-2.6.16/fs/squashfs/LzmaDecode.h linux-2.6.16-owrt/fs/squashfs/LzmaDecode.h
776 --- linux-2.6.16/fs/squashfs/LzmaDecode.h 1970-01-01 01:00:00.000000000 +0100
777 +++ linux-2.6.16-owrt/fs/squashfs/LzmaDecode.h 2006-03-21 10:56:57.000000000 +0100
781 + LZMA Decoder interface
783 + LZMA SDK 4.05 Copyright (c) 1999-2004 Igor Pavlov (2004-08-25)
784 + http://www.7-zip.org/
786 + LZMA SDK is licensed under two licenses:
787 + 1) GNU Lesser General Public License (GNU LGPL)
788 + 2) Common Public License (CPL)
789 + It means that you can select one of these two licenses and
790 + follow rules of that license.
793 + Igor Pavlov, as the author of this code, expressly permits you to
794 + statically or dynamically link your code (or bind by name) to the
795 + interfaces of this file without subjecting your linked code to the
796 + terms of the CPL or GNU LGPL. Any modifications or additions
797 + to this file, however, are subject to the LGPL or CPL terms.
800 +#ifndef __LZMADECODE_H
801 +#define __LZMADECODE_H
803 +/* #define _LZMA_IN_CB */
804 +/* Use callback for input data */
806 +/* #define _LZMA_OUT_READ */
807 +/* Use read function for output data */
809 +/* #define _LZMA_PROB32 */
810 +/* It can increase speed on some 32-bit CPUs,
811 + but memory usage will be doubled in that case */
813 +/* #define _LZMA_LOC_OPT */
814 +/* Enable local speed optimizations inside code */
817 +#ifdef _LZMA_UINT32_IS_ULONG
818 +#define UInt32 unsigned long
820 +#define UInt32 unsigned int
825 +#define CProb UInt32
827 +#define CProb unsigned short
830 +#define LZMA_RESULT_OK 0
831 +#define LZMA_RESULT_DATA_ERROR 1
832 +#define LZMA_RESULT_NOT_ENOUGH_MEM 2
835 +typedef struct _ILzmaInCallback
837 + int (*Read)(void *object, unsigned char **buffer, UInt32 *bufferSize);
841 +#define LZMA_BASE_SIZE 1846
842 +#define LZMA_LIT_SIZE 768
845 +bufferSize = (LZMA_BASE_SIZE + (LZMA_LIT_SIZE << (lc + lp)))* sizeof(CProb)
846 +bufferSize += 100 in case of _LZMA_OUT_READ
847 +by default CProb is unsigned short,
848 +but if specify _LZMA_PROB_32, CProb will be UInt32(unsigned int)
851 +#ifdef _LZMA_OUT_READ
852 +int LzmaDecoderInit(
853 + unsigned char *buffer, UInt32 bufferSize,
854 + int lc, int lp, int pb,
855 + unsigned char *dictionary, UInt32 dictionarySize,
857 + ILzmaInCallback *inCallback
859 + unsigned char *inStream, UInt32 inSize
865 + unsigned char *buffer,
866 + #ifndef _LZMA_OUT_READ
868 + int lc, int lp, int pb,
870 + ILzmaInCallback *inCallback,
872 + unsigned char *inStream, UInt32 inSize,
875 + unsigned char *outStream, UInt32 outSize,
876 + UInt32 *outSizeProcessed);
879 diff -Nur linux-2.6.16/fs/squashfs/Makefile linux-2.6.16-owrt/fs/squashfs/Makefile
880 --- linux-2.6.16/fs/squashfs/Makefile 2006-03-21 10:55:59.000000000 +0100
881 +++ linux-2.6.16-owrt/fs/squashfs/Makefile 2006-03-21 10:57:08.000000000 +0100
883 obj-$(CONFIG_SQUASHFS) += squashfs.o
884 squashfs-y += inode.o
885 squashfs-y += squashfs2_0.o
886 +squashfs-y += LzmaDecode.o