1 diff -Nur linux-2.4.32/fs/squashfs/inode.c linux-2.4.32-owrt/fs/squashfs/inode.c
2 --- linux-2.4.32/fs/squashfs/inode.c 2006-03-21 13:06:10.000000000 +0100
3 +++ linux-2.4.32-owrt/fs/squashfs/inode.c 2006-03-21 13:12:07.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))
40 static struct super_block *squashfs_read_super(struct super_block *, void *, int);
41 static void squashfs_put_super(struct super_block *);
42 static int squashfs_statfs(struct super_block *, struct statfs *);
44 int readahead_blks, char *block_list,
45 unsigned short **block_p, unsigned int *bsize);
48 +static unsigned char lzma_workspace[LZMA_WORKSPACE_SIZE];
50 static z_stream stream;
53 static DECLARE_FSTYPE_DEV(squashfs_fs_type, "squashfs", squashfs_read_super);
60 + if ((zlib_err = LzmaDecode(lzma_workspace,
61 + LZMA_WORKSPACE_SIZE, LZMA_LC, LZMA_LP, LZMA_PB,
62 + c_buffer, c_byte, buffer, msblk->read_size, &bytes)) != LZMA_RESULT_OK)
64 + ERROR("lzma returned unexpected result 0x%x\n", zlib_err);
68 stream.next_in = c_buffer;
69 stream.avail_in = c_byte;
70 stream.next_out = buffer;
74 bytes = stream.total_out;
77 up(&msblk->read_data_mutex);
79 @@ -2004,17 +2036,21 @@
80 printk(KERN_INFO "squashfs: version 3.0 (2006/03/15) "
83 +#ifndef SQUASHFS_LZMA
84 if (!(stream.workspace = vmalloc(zlib_inflate_workspacesize()))) {
85 ERROR("Failed to allocate zlib workspace\n");
89 return register_filesystem(&squashfs_fs_type);
93 static void __exit exit_squashfs_fs(void)
95 +#ifndef SQUASHFS_LZMA
96 vfree(stream.workspace);
98 unregister_filesystem(&squashfs_fs_type);
101 diff -Nur linux-2.4.32/fs/squashfs/LzmaDecode.c linux-2.4.32-owrt/fs/squashfs/LzmaDecode.c
102 --- linux-2.4.32/fs/squashfs/LzmaDecode.c 1970-01-01 01:00:00.000000000 +0100
103 +++ linux-2.4.32-owrt/fs/squashfs/LzmaDecode.c 2006-03-21 13:06:33.000000000 +0100
109 + LZMA SDK 4.05 Copyright (c) 1999-2004 Igor Pavlov (2004-08-25)
110 + http://www.7-zip.org/
112 + LZMA SDK is licensed under two licenses:
113 + 1) GNU Lesser General Public License (GNU LGPL)
114 + 2) Common Public License (CPL)
115 + It means that you can select one of these two licenses and
116 + follow rules of that license.
119 + Igor Pavlov, as the author of this code, expressly permits you to
120 + statically or dynamically link your code (or bind by name) to the
121 + interfaces of this file without subjecting your linked code to the
122 + terms of the CPL or GNU LGPL. Any modifications or additions
123 + to this file, however, are subject to the LGPL or CPL terms.
126 +#include "LzmaDecode.h"
129 +#define Byte unsigned char
132 +#define kNumTopBits 24
133 +#define kTopValue ((UInt32)1 << kNumTopBits)
135 +#define kNumBitModelTotalBits 11
136 +#define kBitModelTotal (1 << kNumBitModelTotalBits)
137 +#define kNumMoveBits 5
139 +typedef struct _CRangeDecoder
146 + ILzmaInCallback *InCallback;
152 +Byte RangeDecoderReadByte(CRangeDecoder *rd)
154 + if (rd->Buffer == rd->BufferLim)
158 + rd->Result = rd->InCallback->Read(rd->InCallback, &rd->Buffer, &size);
159 + rd->BufferLim = rd->Buffer + size;
163 + rd->ExtraBytes = 1;
167 + return (*rd->Buffer++);
170 +/* #define ReadByte (*rd->Buffer++) */
171 +#define ReadByte (RangeDecoderReadByte(rd))
173 +void RangeDecoderInit(CRangeDecoder *rd,
175 + ILzmaInCallback *inCallback
177 + Byte *stream, UInt32 bufferSize
183 + rd->InCallback = inCallback;
184 + rd->Buffer = rd->BufferLim = 0;
186 + rd->Buffer = stream;
187 + rd->BufferLim = stream + bufferSize;
189 + rd->ExtraBytes = 0;
191 + rd->Range = (0xFFFFFFFF);
192 + for(i = 0; i < 5; i++)
193 + rd->Code = (rd->Code << 8) | ReadByte;
196 +#define RC_INIT_VAR UInt32 range = rd->Range; UInt32 code = rd->Code;
197 +#define RC_FLUSH_VAR rd->Range = range; rd->Code = code;
198 +#define RC_NORMALIZE if (range < kTopValue) { range <<= 8; code = (code << 8) | ReadByte; }
200 +UInt32 RangeDecoderDecodeDirectBits(CRangeDecoder *rd, int numTotalBits)
205 + for (i = numTotalBits; i > 0; i--)
217 + t = (code - range) >> 31;
219 + code -= range & (t - 1);
220 + result = (result + result) | (1 - t);
228 +int RangeDecoderBitDecode(CProb *prob, CRangeDecoder *rd)
230 + UInt32 bound = (rd->Range >> kNumBitModelTotalBits) * *prob;
231 + if (rd->Code < bound)
234 + *prob += (kBitModelTotal - *prob) >> kNumMoveBits;
235 + if (rd->Range < kTopValue)
237 + rd->Code = (rd->Code << 8) | ReadByte;
244 + rd->Range -= bound;
246 + *prob -= (*prob) >> kNumMoveBits;
247 + if (rd->Range < kTopValue)
249 + rd->Code = (rd->Code << 8) | ReadByte;
256 +#define RC_GET_BIT2(prob, mi, A0, A1) \
257 + UInt32 bound = (range >> kNumBitModelTotalBits) * *prob; \
258 + if (code < bound) \
259 + { A0; range = bound; *prob += (kBitModelTotal - *prob) >> kNumMoveBits; mi <<= 1; } \
261 + { A1; range -= bound; code -= bound; *prob -= (*prob) >> kNumMoveBits; mi = (mi + mi) + 1; } \
264 +#define RC_GET_BIT(prob, mi) RC_GET_BIT2(prob, mi, ; , ;)
266 +int RangeDecoderBitTreeDecode(CProb *probs, int numLevels, CRangeDecoder *rd)
270 + #ifdef _LZMA_LOC_OPT
273 + for(i = numLevels; i > 0; i--)
275 + #ifdef _LZMA_LOC_OPT
276 + CProb *prob = probs + mi;
277 + RC_GET_BIT(prob, mi)
279 + mi = (mi + mi) + RangeDecoderBitDecode(probs + mi, rd);
282 + #ifdef _LZMA_LOC_OPT
285 + return mi - (1 << numLevels);
288 +int RangeDecoderReverseBitTreeDecode(CProb *probs, int numLevels, CRangeDecoder *rd)
293 + #ifdef _LZMA_LOC_OPT
296 + for(i = 0; i < numLevels; i++)
298 + #ifdef _LZMA_LOC_OPT
299 + CProb *prob = probs + mi;
300 + RC_GET_BIT2(prob, mi, ; , symbol |= (1 << i))
302 + int bit = RangeDecoderBitDecode(probs + mi, rd);
303 + mi = mi + mi + bit;
304 + symbol |= (bit << i);
307 + #ifdef _LZMA_LOC_OPT
313 +Byte LzmaLiteralDecode(CProb *probs, CRangeDecoder *rd)
316 + #ifdef _LZMA_LOC_OPT
321 + #ifdef _LZMA_LOC_OPT
322 + CProb *prob = probs + symbol;
323 + RC_GET_BIT(prob, symbol)
325 + symbol = (symbol + symbol) | RangeDecoderBitDecode(probs + symbol, rd);
328 + while (symbol < 0x100);
329 + #ifdef _LZMA_LOC_OPT
335 +Byte LzmaLiteralDecodeMatch(CProb *probs, CRangeDecoder *rd, Byte matchByte)
338 + #ifdef _LZMA_LOC_OPT
344 + int matchBit = (matchByte >> 7) & 1;
346 + #ifdef _LZMA_LOC_OPT
348 + CProb *prob = probs + ((1 + matchBit) << 8) + symbol;
349 + RC_GET_BIT2(prob, symbol, bit = 0, bit = 1)
352 + bit = RangeDecoderBitDecode(probs + ((1 + matchBit) << 8) + symbol, rd);
353 + symbol = (symbol << 1) | bit;
355 + if (matchBit != bit)
357 + while (symbol < 0x100)
359 + #ifdef _LZMA_LOC_OPT
360 + CProb *prob = probs + symbol;
361 + RC_GET_BIT(prob, symbol)
363 + symbol = (symbol + symbol) | RangeDecoderBitDecode(probs + symbol, rd);
369 + while (symbol < 0x100);
370 + #ifdef _LZMA_LOC_OPT
376 +#define kNumPosBitsMax 4
377 +#define kNumPosStatesMax (1 << kNumPosBitsMax)
379 +#define kLenNumLowBits 3
380 +#define kLenNumLowSymbols (1 << kLenNumLowBits)
381 +#define kLenNumMidBits 3
382 +#define kLenNumMidSymbols (1 << kLenNumMidBits)
383 +#define kLenNumHighBits 8
384 +#define kLenNumHighSymbols (1 << kLenNumHighBits)
387 +#define LenChoice2 (LenChoice + 1)
388 +#define LenLow (LenChoice2 + 1)
389 +#define LenMid (LenLow + (kNumPosStatesMax << kLenNumLowBits))
390 +#define LenHigh (LenMid + (kNumPosStatesMax << kLenNumMidBits))
391 +#define kNumLenProbs (LenHigh + kLenNumHighSymbols)
393 +int LzmaLenDecode(CProb *p, CRangeDecoder *rd, int posState)
395 + if(RangeDecoderBitDecode(p + LenChoice, rd) == 0)
396 + return RangeDecoderBitTreeDecode(p + LenLow +
397 + (posState << kLenNumLowBits), kLenNumLowBits, rd);
398 + if(RangeDecoderBitDecode(p + LenChoice2, rd) == 0)
399 + return kLenNumLowSymbols + RangeDecoderBitTreeDecode(p + LenMid +
400 + (posState << kLenNumMidBits), kLenNumMidBits, rd);
401 + return kLenNumLowSymbols + kLenNumMidSymbols +
402 + RangeDecoderBitTreeDecode(p + LenHigh, kLenNumHighBits, rd);
405 +#define kNumStates 12
407 +#define kStartPosModelIndex 4
408 +#define kEndPosModelIndex 14
409 +#define kNumFullDistances (1 << (kEndPosModelIndex >> 1))
411 +#define kNumPosSlotBits 6
412 +#define kNumLenToPosStates 4
414 +#define kNumAlignBits 4
415 +#define kAlignTableSize (1 << kNumAlignBits)
417 +#define kMatchMinLen 2
420 +#define IsRep (IsMatch + (kNumStates << kNumPosBitsMax))
421 +#define IsRepG0 (IsRep + kNumStates)
422 +#define IsRepG1 (IsRepG0 + kNumStates)
423 +#define IsRepG2 (IsRepG1 + kNumStates)
424 +#define IsRep0Long (IsRepG2 + kNumStates)
425 +#define PosSlot (IsRep0Long + (kNumStates << kNumPosBitsMax))
426 +#define SpecPos (PosSlot + (kNumLenToPosStates << kNumPosSlotBits))
427 +#define Align (SpecPos + kNumFullDistances - kEndPosModelIndex)
428 +#define LenCoder (Align + kAlignTableSize)
429 +#define RepLenCoder (LenCoder + kNumLenProbs)
430 +#define Literal (RepLenCoder + kNumLenProbs)
432 +#if Literal != LZMA_BASE_SIZE
436 +#ifdef _LZMA_OUT_READ
438 +typedef struct _LzmaVarState
440 + CRangeDecoder RangeDecoder;
442 + UInt32 DictionarySize;
443 + UInt32 DictionaryPos;
450 + int PreviousIsMatch;
454 +int LzmaDecoderInit(
455 + unsigned char *buffer, UInt32 bufferSize,
456 + int lc, int lp, int pb,
457 + unsigned char *dictionary, UInt32 dictionarySize,
459 + ILzmaInCallback *inCallback
461 + unsigned char *inStream, UInt32 inSize
465 + LzmaVarState *vs = (LzmaVarState *)buffer;
466 + CProb *p = (CProb *)(buffer + sizeof(LzmaVarState));
467 + UInt32 numProbs = Literal + ((UInt32)LZMA_LIT_SIZE << (lc + lp));
469 + if (bufferSize < numProbs * sizeof(CProb) + sizeof(LzmaVarState))
470 + return LZMA_RESULT_NOT_ENOUGH_MEM;
471 + vs->Dictionary = dictionary;
472 + vs->DictionarySize = dictionarySize;
473 + vs->DictionaryPos = 0;
475 + vs->Reps[0] = vs->Reps[1] = vs->Reps[2] = vs->Reps[3] = 1;
480 + vs->PreviousIsMatch = 0;
482 + dictionary[dictionarySize - 1] = 0;
483 + for (i = 0; i < numProbs; i++)
484 + p[i] = kBitModelTotal >> 1;
485 + RangeDecoderInit(&vs->RangeDecoder,
492 + return LZMA_RESULT_OK;
495 +int LzmaDecode(unsigned char *buffer,
496 + unsigned char *outStream, UInt32 outSize,
497 + UInt32 *outSizeProcessed)
499 + LzmaVarState *vs = (LzmaVarState *)buffer;
500 + CProb *p = (CProb *)(buffer + sizeof(LzmaVarState));
501 + CRangeDecoder rd = vs->RangeDecoder;
502 + int state = vs->State;
503 + int previousIsMatch = vs->PreviousIsMatch;
505 + UInt32 rep0 = vs->Reps[0], rep1 = vs->Reps[1], rep2 = vs->Reps[2], rep3 = vs->Reps[3];
507 + UInt32 posStateMask = (1 << (vs->pb)) - 1;
508 + UInt32 literalPosMask = (1 << (vs->lp)) - 1;
510 + int len = vs->RemainLen;
511 + UInt32 globalPos = vs->GlobalPos;
513 + Byte *dictionary = vs->Dictionary;
514 + UInt32 dictionarySize = vs->DictionarySize;
515 + UInt32 dictionaryPos = vs->DictionaryPos;
519 + *outSizeProcessed = 0;
520 + return LZMA_RESULT_OK;
523 + while(len > 0 && nowPos < outSize)
525 + UInt32 pos = dictionaryPos - rep0;
526 + if (pos >= dictionarySize)
527 + pos += dictionarySize;
528 + outStream[nowPos++] = dictionary[dictionaryPos] = dictionary[pos];
529 + if (++dictionaryPos == dictionarySize)
533 + if (dictionaryPos == 0)
534 + previousByte = dictionary[dictionarySize - 1];
536 + previousByte = dictionary[dictionaryPos - 1];
540 + Byte *buffer, UInt32 bufferSize,
541 + int lc, int lp, int pb,
543 + ILzmaInCallback *inCallback,
545 + unsigned char *inStream, UInt32 inSize,
547 + unsigned char *outStream, UInt32 outSize,
548 + UInt32 *outSizeProcessed)
550 + UInt32 numProbs = Literal + ((UInt32)LZMA_LIT_SIZE << (lc + lp));
551 + CProb *p = (CProb *)buffer;
555 + int previousIsMatch = 0;
556 + Byte previousByte = 0;
557 + UInt32 rep0 = 1, rep1 = 1, rep2 = 1, rep3 = 1;
559 + UInt32 posStateMask = (1 << pb) - 1;
560 + UInt32 literalPosMask = (1 << lp) - 1;
562 + if (bufferSize < numProbs * sizeof(CProb))
563 + return LZMA_RESULT_NOT_ENOUGH_MEM;
564 + for (i = 0; i < numProbs; i++)
565 + p[i] = kBitModelTotal >> 1;
566 + RangeDecoderInit(&rd,
575 + *outSizeProcessed = 0;
576 + while(nowPos < outSize)
578 + int posState = (int)(
580 + #ifdef _LZMA_OUT_READ
586 + if (rd.Result != LZMA_RESULT_OK)
589 + if (rd.ExtraBytes != 0)
590 + return LZMA_RESULT_DATA_ERROR;
591 + if (RangeDecoderBitDecode(p + IsMatch + (state << kNumPosBitsMax) + posState, &rd) == 0)
593 + CProb *probs = p + Literal + (LZMA_LIT_SIZE *
596 + #ifdef _LZMA_OUT_READ
600 + & literalPosMask) << lc) + (previousByte >> (8 - lc))));
602 + if (state < 4) state = 0;
603 + else if (state < 10) state -= 3;
605 + if (previousIsMatch)
608 + #ifdef _LZMA_OUT_READ
609 + UInt32 pos = dictionaryPos - rep0;
610 + if (pos >= dictionarySize)
611 + pos += dictionarySize;
612 + matchByte = dictionary[pos];
614 + matchByte = outStream[nowPos - rep0];
616 + previousByte = LzmaLiteralDecodeMatch(probs, &rd, matchByte);
617 + previousIsMatch = 0;
620 + previousByte = LzmaLiteralDecode(probs, &rd);
621 + outStream[nowPos++] = previousByte;
622 + #ifdef _LZMA_OUT_READ
623 + dictionary[dictionaryPos] = previousByte;
624 + if (++dictionaryPos == dictionarySize)
630 + previousIsMatch = 1;
631 + if (RangeDecoderBitDecode(p + IsRep + state, &rd) == 1)
633 + if (RangeDecoderBitDecode(p + IsRepG0 + state, &rd) == 0)
635 + if (RangeDecoderBitDecode(p + IsRep0Long + (state << kNumPosBitsMax) + posState, &rd) == 0)
637 + #ifdef _LZMA_OUT_READ
642 + #ifdef _LZMA_OUT_READ
647 + return LZMA_RESULT_DATA_ERROR;
648 + state = state < 7 ? 9 : 11;
649 + #ifdef _LZMA_OUT_READ
650 + pos = dictionaryPos - rep0;
651 + if (pos >= dictionarySize)
652 + pos += dictionarySize;
653 + previousByte = dictionary[pos];
654 + dictionary[dictionaryPos] = previousByte;
655 + if (++dictionaryPos == dictionarySize)
658 + previousByte = outStream[nowPos - rep0];
660 + outStream[nowPos++] = previousByte;
667 + if(RangeDecoderBitDecode(p + IsRepG1 + state, &rd) == 0)
671 + if(RangeDecoderBitDecode(p + IsRepG2 + state, &rd) == 0)
683 + len = LzmaLenDecode(p + RepLenCoder, &rd, posState);
684 + state = state < 7 ? 8 : 11;
692 + state = state < 7 ? 7 : 10;
693 + len = LzmaLenDecode(p + LenCoder, &rd, posState);
694 + posSlot = RangeDecoderBitTreeDecode(p + PosSlot +
695 + ((len < kNumLenToPosStates ? len : kNumLenToPosStates - 1) <<
696 + kNumPosSlotBits), kNumPosSlotBits, &rd);
697 + if (posSlot >= kStartPosModelIndex)
699 + int numDirectBits = ((posSlot >> 1) - 1);
700 + rep0 = ((2 | ((UInt32)posSlot & 1)) << numDirectBits);
701 + if (posSlot < kEndPosModelIndex)
703 + rep0 += RangeDecoderReverseBitTreeDecode(
704 + p + SpecPos + rep0 - posSlot - 1, numDirectBits, &rd);
708 + rep0 += RangeDecoderDecodeDirectBits(&rd,
709 + numDirectBits - kNumAlignBits) << kNumAlignBits;
710 + rep0 += RangeDecoderReverseBitTreeDecode(p + Align, kNumAlignBits, &rd);
717 + if (rep0 == (UInt32)(0))
719 + /* it's for stream version */
724 + #ifdef _LZMA_OUT_READ
729 + return LZMA_RESULT_DATA_ERROR;
731 + len += kMatchMinLen;
734 + #ifdef _LZMA_OUT_READ
735 + UInt32 pos = dictionaryPos - rep0;
736 + if (pos >= dictionarySize)
737 + pos += dictionarySize;
738 + previousByte = dictionary[pos];
739 + dictionary[dictionaryPos] = previousByte;
740 + if (++dictionaryPos == dictionarySize)
743 + previousByte = outStream[nowPos - rep0];
745 + outStream[nowPos++] = previousByte;
748 + while(len > 0 && nowPos < outSize);
752 + #ifdef _LZMA_OUT_READ
753 + vs->RangeDecoder = rd;
754 + vs->DictionaryPos = dictionaryPos;
755 + vs->GlobalPos = globalPos + nowPos;
756 + vs->Reps[0] = rep0;
757 + vs->Reps[1] = rep1;
758 + vs->Reps[2] = rep2;
759 + vs->Reps[3] = rep3;
761 + vs->PreviousIsMatch = previousIsMatch;
762 + vs->RemainLen = len;
765 + *outSizeProcessed = nowPos;
766 + return LZMA_RESULT_OK;
768 diff -Nur linux-2.4.32/fs/squashfs/LzmaDecode.h linux-2.4.32-owrt/fs/squashfs/LzmaDecode.h
769 --- linux-2.4.32/fs/squashfs/LzmaDecode.h 1970-01-01 01:00:00.000000000 +0100
770 +++ linux-2.4.32-owrt/fs/squashfs/LzmaDecode.h 2006-03-21 13:06:33.000000000 +0100
774 + LZMA Decoder interface
776 + LZMA SDK 4.05 Copyright (c) 1999-2004 Igor Pavlov (2004-08-25)
777 + http://www.7-zip.org/
779 + LZMA SDK is licensed under two licenses:
780 + 1) GNU Lesser General Public License (GNU LGPL)
781 + 2) Common Public License (CPL)
782 + It means that you can select one of these two licenses and
783 + follow rules of that license.
786 + Igor Pavlov, as the author of this code, expressly permits you to
787 + statically or dynamically link your code (or bind by name) to the
788 + interfaces of this file without subjecting your linked code to the
789 + terms of the CPL or GNU LGPL. Any modifications or additions
790 + to this file, however, are subject to the LGPL or CPL terms.
793 +#ifndef __LZMADECODE_H
794 +#define __LZMADECODE_H
796 +/* #define _LZMA_IN_CB */
797 +/* Use callback for input data */
799 +/* #define _LZMA_OUT_READ */
800 +/* Use read function for output data */
802 +/* #define _LZMA_PROB32 */
803 +/* It can increase speed on some 32-bit CPUs,
804 + but memory usage will be doubled in that case */
806 +/* #define _LZMA_LOC_OPT */
807 +/* Enable local speed optimizations inside code */
810 +#ifdef _LZMA_UINT32_IS_ULONG
811 +#define UInt32 unsigned long
813 +#define UInt32 unsigned int
818 +#define CProb UInt32
820 +#define CProb unsigned short
823 +#define LZMA_RESULT_OK 0
824 +#define LZMA_RESULT_DATA_ERROR 1
825 +#define LZMA_RESULT_NOT_ENOUGH_MEM 2
828 +typedef struct _ILzmaInCallback
830 + int (*Read)(void *object, unsigned char **buffer, UInt32 *bufferSize);
834 +#define LZMA_BASE_SIZE 1846
835 +#define LZMA_LIT_SIZE 768
838 +bufferSize = (LZMA_BASE_SIZE + (LZMA_LIT_SIZE << (lc + lp)))* sizeof(CProb)
839 +bufferSize += 100 in case of _LZMA_OUT_READ
840 +by default CProb is unsigned short,
841 +but if specify _LZMA_PROB_32, CProb will be UInt32(unsigned int)
844 +#ifdef _LZMA_OUT_READ
845 +int LzmaDecoderInit(
846 + unsigned char *buffer, UInt32 bufferSize,
847 + int lc, int lp, int pb,
848 + unsigned char *dictionary, UInt32 dictionarySize,
850 + ILzmaInCallback *inCallback
852 + unsigned char *inStream, UInt32 inSize
858 + unsigned char *buffer,
859 + #ifndef _LZMA_OUT_READ
861 + int lc, int lp, int pb,
863 + ILzmaInCallback *inCallback,
865 + unsigned char *inStream, UInt32 inSize,
868 + unsigned char *outStream, UInt32 outSize,
869 + UInt32 *outSizeProcessed);
872 diff -Nur linux-2.4.32/fs/squashfs/Makefile linux-2.4.32-owrt/fs/squashfs/Makefile
873 --- linux-2.4.32/fs/squashfs/Makefile 2006-03-21 13:06:10.000000000 +0100
874 +++ linux-2.4.32-owrt/fs/squashfs/Makefile 2006-03-21 13:12:39.000000000 +0100
877 O_TARGET := squashfs.o
879 -obj-y := inode.o squashfs2_0.o
880 +obj-y := inode.o squashfs2_0.o LzmaDecode.o