1 Index: linux-2.4.35.4/fs/squashfs/inode.c
2 ===================================================================
3 --- linux-2.4.35.4.orig/fs/squashfs/inode.c
4 +++ linux-2.4.35.4/fs/squashfs/inode.c
6 * Copyright (c) 2002, 2003, 2004, 2005, 2006
7 * Phillip Lougher <phillip@lougher.org.uk>
9 + * LZMA decompressor support added by Oleg I. Vdovikin
10 + * Copyright (c) 2005 Oleg I.Vdovikin <oleg@cs.msu.su>
12 * This program is free software; you can redistribute it and/or
13 * modify it under the terms of the GNU General Public License
14 * as published by the Free Software Foundation; either version 2,
19 +#define SQUASHFS_LZMA
20 #include <linux/types.h>
21 #include <linux/squashfs_fs.h>
22 #include <linux/module.h>
28 +#include "LzmaDecode.h"
30 +/* default LZMA settings, should be in sync with mksquashfs */
35 +#define LZMA_WORKSPACE_SIZE ((LZMA_BASE_SIZE + \
36 + (LZMA_LIT_SIZE << (LZMA_LC + LZMA_LP))) * sizeof(CProb))
41 static struct super_block *squashfs_read_super(struct super_block *, void *, int);
42 static void squashfs_put_super(struct super_block *);
43 static int squashfs_statfs(struct super_block *, struct statfs *);
44 @@ -53,7 +71,11 @@ static long long read_blocklist(struct i
45 int readahead_blks, char *block_list,
46 unsigned short **block_p, unsigned int *bsize);
49 +static unsigned char lzma_workspace[LZMA_WORKSPACE_SIZE];
51 static z_stream stream;
54 static DECLARE_FSTYPE_DEV(squashfs_fs_type, "squashfs", squashfs_read_super);
56 @@ -229,6 +251,15 @@ SQSH_EXTERN unsigned int squashfs_read_d
61 + if ((zlib_err = LzmaDecode(lzma_workspace,
62 + LZMA_WORKSPACE_SIZE, LZMA_LC, LZMA_LP, LZMA_PB,
63 + c_buffer, c_byte, buffer, msblk->read_size, &bytes)) != LZMA_RESULT_OK)
65 + ERROR("lzma returned unexpected result 0x%x\n", zlib_err);
69 stream.next_in = c_buffer;
70 stream.avail_in = c_byte;
71 stream.next_out = buffer;
72 @@ -243,6 +274,7 @@ SQSH_EXTERN unsigned int squashfs_read_d
75 bytes = stream.total_out;
78 up(&msblk->read_data_mutex);
80 @@ -2004,17 +2036,21 @@ static int __init init_squashfs_fs(void)
81 printk(KERN_INFO "squashfs: version 3.0 (2006/03/15) "
84 +#ifndef SQUASHFS_LZMA
85 if (!(stream.workspace = vmalloc(zlib_inflate_workspacesize()))) {
86 ERROR("Failed to allocate zlib workspace\n");
90 return register_filesystem(&squashfs_fs_type);
94 static void __exit exit_squashfs_fs(void)
96 +#ifndef SQUASHFS_LZMA
97 vfree(stream.workspace);
99 unregister_filesystem(&squashfs_fs_type);
102 Index: linux-2.4.35.4/fs/squashfs/LzmaDecode.c
103 ===================================================================
105 +++ linux-2.4.35.4/fs/squashfs/LzmaDecode.c
111 + LZMA SDK 4.05 Copyright (c) 1999-2004 Igor Pavlov (2004-08-25)
112 + http://www.7-zip.org/
114 + LZMA SDK is licensed under two licenses:
115 + 1) GNU Lesser General Public License (GNU LGPL)
116 + 2) Common Public License (CPL)
117 + It means that you can select one of these two licenses and
118 + follow rules of that license.
121 + Igor Pavlov, as the author of this code, expressly permits you to
122 + statically or dynamically link your code (or bind by name) to the
123 + interfaces of this file without subjecting your linked code to the
124 + terms of the CPL or GNU LGPL. Any modifications or additions
125 + to this file, however, are subject to the LGPL or CPL terms.
128 +#include "LzmaDecode.h"
131 +#define Byte unsigned char
134 +#define kNumTopBits 24
135 +#define kTopValue ((UInt32)1 << kNumTopBits)
137 +#define kNumBitModelTotalBits 11
138 +#define kBitModelTotal (1 << kNumBitModelTotalBits)
139 +#define kNumMoveBits 5
141 +typedef struct _CRangeDecoder
148 + ILzmaInCallback *InCallback;
154 +Byte RangeDecoderReadByte(CRangeDecoder *rd)
156 + if (rd->Buffer == rd->BufferLim)
160 + rd->Result = rd->InCallback->Read(rd->InCallback, &rd->Buffer, &size);
161 + rd->BufferLim = rd->Buffer + size;
165 + rd->ExtraBytes = 1;
169 + return (*rd->Buffer++);
172 +/* #define ReadByte (*rd->Buffer++) */
173 +#define ReadByte (RangeDecoderReadByte(rd))
175 +void RangeDecoderInit(CRangeDecoder *rd,
177 + ILzmaInCallback *inCallback
179 + Byte *stream, UInt32 bufferSize
185 + rd->InCallback = inCallback;
186 + rd->Buffer = rd->BufferLim = 0;
188 + rd->Buffer = stream;
189 + rd->BufferLim = stream + bufferSize;
191 + rd->ExtraBytes = 0;
193 + rd->Range = (0xFFFFFFFF);
194 + for(i = 0; i < 5; i++)
195 + rd->Code = (rd->Code << 8) | ReadByte;
198 +#define RC_INIT_VAR UInt32 range = rd->Range; UInt32 code = rd->Code;
199 +#define RC_FLUSH_VAR rd->Range = range; rd->Code = code;
200 +#define RC_NORMALIZE if (range < kTopValue) { range <<= 8; code = (code << 8) | ReadByte; }
202 +UInt32 RangeDecoderDecodeDirectBits(CRangeDecoder *rd, int numTotalBits)
207 + for (i = numTotalBits; i > 0; i--)
219 + t = (code - range) >> 31;
221 + code -= range & (t - 1);
222 + result = (result + result) | (1 - t);
230 +int RangeDecoderBitDecode(CProb *prob, CRangeDecoder *rd)
232 + UInt32 bound = (rd->Range >> kNumBitModelTotalBits) * *prob;
233 + if (rd->Code < bound)
236 + *prob += (kBitModelTotal - *prob) >> kNumMoveBits;
237 + if (rd->Range < kTopValue)
239 + rd->Code = (rd->Code << 8) | ReadByte;
246 + rd->Range -= bound;
248 + *prob -= (*prob) >> kNumMoveBits;
249 + if (rd->Range < kTopValue)
251 + rd->Code = (rd->Code << 8) | ReadByte;
258 +#define RC_GET_BIT2(prob, mi, A0, A1) \
259 + UInt32 bound = (range >> kNumBitModelTotalBits) * *prob; \
260 + if (code < bound) \
261 + { A0; range = bound; *prob += (kBitModelTotal - *prob) >> kNumMoveBits; mi <<= 1; } \
263 + { A1; range -= bound; code -= bound; *prob -= (*prob) >> kNumMoveBits; mi = (mi + mi) + 1; } \
266 +#define RC_GET_BIT(prob, mi) RC_GET_BIT2(prob, mi, ; , ;)
268 +int RangeDecoderBitTreeDecode(CProb *probs, int numLevels, CRangeDecoder *rd)
272 + #ifdef _LZMA_LOC_OPT
275 + for(i = numLevels; i > 0; i--)
277 + #ifdef _LZMA_LOC_OPT
278 + CProb *prob = probs + mi;
279 + RC_GET_BIT(prob, mi)
281 + mi = (mi + mi) + RangeDecoderBitDecode(probs + mi, rd);
284 + #ifdef _LZMA_LOC_OPT
287 + return mi - (1 << numLevels);
290 +int RangeDecoderReverseBitTreeDecode(CProb *probs, int numLevels, CRangeDecoder *rd)
295 + #ifdef _LZMA_LOC_OPT
298 + for(i = 0; i < numLevels; i++)
300 + #ifdef _LZMA_LOC_OPT
301 + CProb *prob = probs + mi;
302 + RC_GET_BIT2(prob, mi, ; , symbol |= (1 << i))
304 + int bit = RangeDecoderBitDecode(probs + mi, rd);
305 + mi = mi + mi + bit;
306 + symbol |= (bit << i);
309 + #ifdef _LZMA_LOC_OPT
315 +Byte LzmaLiteralDecode(CProb *probs, CRangeDecoder *rd)
318 + #ifdef _LZMA_LOC_OPT
323 + #ifdef _LZMA_LOC_OPT
324 + CProb *prob = probs + symbol;
325 + RC_GET_BIT(prob, symbol)
327 + symbol = (symbol + symbol) | RangeDecoderBitDecode(probs + symbol, rd);
330 + while (symbol < 0x100);
331 + #ifdef _LZMA_LOC_OPT
337 +Byte LzmaLiteralDecodeMatch(CProb *probs, CRangeDecoder *rd, Byte matchByte)
340 + #ifdef _LZMA_LOC_OPT
346 + int matchBit = (matchByte >> 7) & 1;
348 + #ifdef _LZMA_LOC_OPT
350 + CProb *prob = probs + ((1 + matchBit) << 8) + symbol;
351 + RC_GET_BIT2(prob, symbol, bit = 0, bit = 1)
354 + bit = RangeDecoderBitDecode(probs + ((1 + matchBit) << 8) + symbol, rd);
355 + symbol = (symbol << 1) | bit;
357 + if (matchBit != bit)
359 + while (symbol < 0x100)
361 + #ifdef _LZMA_LOC_OPT
362 + CProb *prob = probs + symbol;
363 + RC_GET_BIT(prob, symbol)
365 + symbol = (symbol + symbol) | RangeDecoderBitDecode(probs + symbol, rd);
371 + while (symbol < 0x100);
372 + #ifdef _LZMA_LOC_OPT
378 +#define kNumPosBitsMax 4
379 +#define kNumPosStatesMax (1 << kNumPosBitsMax)
381 +#define kLenNumLowBits 3
382 +#define kLenNumLowSymbols (1 << kLenNumLowBits)
383 +#define kLenNumMidBits 3
384 +#define kLenNumMidSymbols (1 << kLenNumMidBits)
385 +#define kLenNumHighBits 8
386 +#define kLenNumHighSymbols (1 << kLenNumHighBits)
389 +#define LenChoice2 (LenChoice + 1)
390 +#define LenLow (LenChoice2 + 1)
391 +#define LenMid (LenLow + (kNumPosStatesMax << kLenNumLowBits))
392 +#define LenHigh (LenMid + (kNumPosStatesMax << kLenNumMidBits))
393 +#define kNumLenProbs (LenHigh + kLenNumHighSymbols)
395 +int LzmaLenDecode(CProb *p, CRangeDecoder *rd, int posState)
397 + if(RangeDecoderBitDecode(p + LenChoice, rd) == 0)
398 + return RangeDecoderBitTreeDecode(p + LenLow +
399 + (posState << kLenNumLowBits), kLenNumLowBits, rd);
400 + if(RangeDecoderBitDecode(p + LenChoice2, rd) == 0)
401 + return kLenNumLowSymbols + RangeDecoderBitTreeDecode(p + LenMid +
402 + (posState << kLenNumMidBits), kLenNumMidBits, rd);
403 + return kLenNumLowSymbols + kLenNumMidSymbols +
404 + RangeDecoderBitTreeDecode(p + LenHigh, kLenNumHighBits, rd);
407 +#define kNumStates 12
409 +#define kStartPosModelIndex 4
410 +#define kEndPosModelIndex 14
411 +#define kNumFullDistances (1 << (kEndPosModelIndex >> 1))
413 +#define kNumPosSlotBits 6
414 +#define kNumLenToPosStates 4
416 +#define kNumAlignBits 4
417 +#define kAlignTableSize (1 << kNumAlignBits)
419 +#define kMatchMinLen 2
422 +#define IsRep (IsMatch + (kNumStates << kNumPosBitsMax))
423 +#define IsRepG0 (IsRep + kNumStates)
424 +#define IsRepG1 (IsRepG0 + kNumStates)
425 +#define IsRepG2 (IsRepG1 + kNumStates)
426 +#define IsRep0Long (IsRepG2 + kNumStates)
427 +#define PosSlot (IsRep0Long + (kNumStates << kNumPosBitsMax))
428 +#define SpecPos (PosSlot + (kNumLenToPosStates << kNumPosSlotBits))
429 +#define Align (SpecPos + kNumFullDistances - kEndPosModelIndex)
430 +#define LenCoder (Align + kAlignTableSize)
431 +#define RepLenCoder (LenCoder + kNumLenProbs)
432 +#define Literal (RepLenCoder + kNumLenProbs)
434 +#if Literal != LZMA_BASE_SIZE
438 +#ifdef _LZMA_OUT_READ
440 +typedef struct _LzmaVarState
442 + CRangeDecoder RangeDecoder;
444 + UInt32 DictionarySize;
445 + UInt32 DictionaryPos;
452 + int PreviousIsMatch;
456 +int LzmaDecoderInit(
457 + unsigned char *buffer, UInt32 bufferSize,
458 + int lc, int lp, int pb,
459 + unsigned char *dictionary, UInt32 dictionarySize,
461 + ILzmaInCallback *inCallback
463 + unsigned char *inStream, UInt32 inSize
467 + LzmaVarState *vs = (LzmaVarState *)buffer;
468 + CProb *p = (CProb *)(buffer + sizeof(LzmaVarState));
469 + UInt32 numProbs = Literal + ((UInt32)LZMA_LIT_SIZE << (lc + lp));
471 + if (bufferSize < numProbs * sizeof(CProb) + sizeof(LzmaVarState))
472 + return LZMA_RESULT_NOT_ENOUGH_MEM;
473 + vs->Dictionary = dictionary;
474 + vs->DictionarySize = dictionarySize;
475 + vs->DictionaryPos = 0;
477 + vs->Reps[0] = vs->Reps[1] = vs->Reps[2] = vs->Reps[3] = 1;
482 + vs->PreviousIsMatch = 0;
484 + dictionary[dictionarySize - 1] = 0;
485 + for (i = 0; i < numProbs; i++)
486 + p[i] = kBitModelTotal >> 1;
487 + RangeDecoderInit(&vs->RangeDecoder,
494 + return LZMA_RESULT_OK;
497 +int LzmaDecode(unsigned char *buffer,
498 + unsigned char *outStream, UInt32 outSize,
499 + UInt32 *outSizeProcessed)
501 + LzmaVarState *vs = (LzmaVarState *)buffer;
502 + CProb *p = (CProb *)(buffer + sizeof(LzmaVarState));
503 + CRangeDecoder rd = vs->RangeDecoder;
504 + int state = vs->State;
505 + int previousIsMatch = vs->PreviousIsMatch;
507 + UInt32 rep0 = vs->Reps[0], rep1 = vs->Reps[1], rep2 = vs->Reps[2], rep3 = vs->Reps[3];
509 + UInt32 posStateMask = (1 << (vs->pb)) - 1;
510 + UInt32 literalPosMask = (1 << (vs->lp)) - 1;
512 + int len = vs->RemainLen;
513 + UInt32 globalPos = vs->GlobalPos;
515 + Byte *dictionary = vs->Dictionary;
516 + UInt32 dictionarySize = vs->DictionarySize;
517 + UInt32 dictionaryPos = vs->DictionaryPos;
521 + *outSizeProcessed = 0;
522 + return LZMA_RESULT_OK;
525 + while(len > 0 && nowPos < outSize)
527 + UInt32 pos = dictionaryPos - rep0;
528 + if (pos >= dictionarySize)
529 + pos += dictionarySize;
530 + outStream[nowPos++] = dictionary[dictionaryPos] = dictionary[pos];
531 + if (++dictionaryPos == dictionarySize)
535 + if (dictionaryPos == 0)
536 + previousByte = dictionary[dictionarySize - 1];
538 + previousByte = dictionary[dictionaryPos - 1];
542 + Byte *buffer, UInt32 bufferSize,
543 + int lc, int lp, int pb,
545 + ILzmaInCallback *inCallback,
547 + unsigned char *inStream, UInt32 inSize,
549 + unsigned char *outStream, UInt32 outSize,
550 + UInt32 *outSizeProcessed)
552 + UInt32 numProbs = Literal + ((UInt32)LZMA_LIT_SIZE << (lc + lp));
553 + CProb *p = (CProb *)buffer;
557 + int previousIsMatch = 0;
558 + Byte previousByte = 0;
559 + UInt32 rep0 = 1, rep1 = 1, rep2 = 1, rep3 = 1;
561 + UInt32 posStateMask = (1 << pb) - 1;
562 + UInt32 literalPosMask = (1 << lp) - 1;
564 + if (bufferSize < numProbs * sizeof(CProb))
565 + return LZMA_RESULT_NOT_ENOUGH_MEM;
566 + for (i = 0; i < numProbs; i++)
567 + p[i] = kBitModelTotal >> 1;
568 + RangeDecoderInit(&rd,
577 + *outSizeProcessed = 0;
578 + while(nowPos < outSize)
580 + int posState = (int)(
582 + #ifdef _LZMA_OUT_READ
588 + if (rd.Result != LZMA_RESULT_OK)
591 + if (rd.ExtraBytes != 0)
592 + return LZMA_RESULT_DATA_ERROR;
593 + if (RangeDecoderBitDecode(p + IsMatch + (state << kNumPosBitsMax) + posState, &rd) == 0)
595 + CProb *probs = p + Literal + (LZMA_LIT_SIZE *
598 + #ifdef _LZMA_OUT_READ
602 + & literalPosMask) << lc) + (previousByte >> (8 - lc))));
604 + if (state < 4) state = 0;
605 + else if (state < 10) state -= 3;
607 + if (previousIsMatch)
610 + #ifdef _LZMA_OUT_READ
611 + UInt32 pos = dictionaryPos - rep0;
612 + if (pos >= dictionarySize)
613 + pos += dictionarySize;
614 + matchByte = dictionary[pos];
616 + matchByte = outStream[nowPos - rep0];
618 + previousByte = LzmaLiteralDecodeMatch(probs, &rd, matchByte);
619 + previousIsMatch = 0;
622 + previousByte = LzmaLiteralDecode(probs, &rd);
623 + outStream[nowPos++] = previousByte;
624 + #ifdef _LZMA_OUT_READ
625 + dictionary[dictionaryPos] = previousByte;
626 + if (++dictionaryPos == dictionarySize)
632 + previousIsMatch = 1;
633 + if (RangeDecoderBitDecode(p + IsRep + state, &rd) == 1)
635 + if (RangeDecoderBitDecode(p + IsRepG0 + state, &rd) == 0)
637 + if (RangeDecoderBitDecode(p + IsRep0Long + (state << kNumPosBitsMax) + posState, &rd) == 0)
639 + #ifdef _LZMA_OUT_READ
644 + #ifdef _LZMA_OUT_READ
649 + return LZMA_RESULT_DATA_ERROR;
650 + state = state < 7 ? 9 : 11;
651 + #ifdef _LZMA_OUT_READ
652 + pos = dictionaryPos - rep0;
653 + if (pos >= dictionarySize)
654 + pos += dictionarySize;
655 + previousByte = dictionary[pos];
656 + dictionary[dictionaryPos] = previousByte;
657 + if (++dictionaryPos == dictionarySize)
660 + previousByte = outStream[nowPos - rep0];
662 + outStream[nowPos++] = previousByte;
669 + if(RangeDecoderBitDecode(p + IsRepG1 + state, &rd) == 0)
673 + if(RangeDecoderBitDecode(p + IsRepG2 + state, &rd) == 0)
685 + len = LzmaLenDecode(p + RepLenCoder, &rd, posState);
686 + state = state < 7 ? 8 : 11;
694 + state = state < 7 ? 7 : 10;
695 + len = LzmaLenDecode(p + LenCoder, &rd, posState);
696 + posSlot = RangeDecoderBitTreeDecode(p + PosSlot +
697 + ((len < kNumLenToPosStates ? len : kNumLenToPosStates - 1) <<
698 + kNumPosSlotBits), kNumPosSlotBits, &rd);
699 + if (posSlot >= kStartPosModelIndex)
701 + int numDirectBits = ((posSlot >> 1) - 1);
702 + rep0 = ((2 | ((UInt32)posSlot & 1)) << numDirectBits);
703 + if (posSlot < kEndPosModelIndex)
705 + rep0 += RangeDecoderReverseBitTreeDecode(
706 + p + SpecPos + rep0 - posSlot - 1, numDirectBits, &rd);
710 + rep0 += RangeDecoderDecodeDirectBits(&rd,
711 + numDirectBits - kNumAlignBits) << kNumAlignBits;
712 + rep0 += RangeDecoderReverseBitTreeDecode(p + Align, kNumAlignBits, &rd);
719 + if (rep0 == (UInt32)(0))
721 + /* it's for stream version */
726 + #ifdef _LZMA_OUT_READ
731 + return LZMA_RESULT_DATA_ERROR;
733 + len += kMatchMinLen;
736 + #ifdef _LZMA_OUT_READ
737 + UInt32 pos = dictionaryPos - rep0;
738 + if (pos >= dictionarySize)
739 + pos += dictionarySize;
740 + previousByte = dictionary[pos];
741 + dictionary[dictionaryPos] = previousByte;
742 + if (++dictionaryPos == dictionarySize)
745 + previousByte = outStream[nowPos - rep0];
747 + outStream[nowPos++] = previousByte;
750 + while(len > 0 && nowPos < outSize);
754 + #ifdef _LZMA_OUT_READ
755 + vs->RangeDecoder = rd;
756 + vs->DictionaryPos = dictionaryPos;
757 + vs->GlobalPos = globalPos + nowPos;
758 + vs->Reps[0] = rep0;
759 + vs->Reps[1] = rep1;
760 + vs->Reps[2] = rep2;
761 + vs->Reps[3] = rep3;
763 + vs->PreviousIsMatch = previousIsMatch;
764 + vs->RemainLen = len;
767 + *outSizeProcessed = nowPos;
768 + return LZMA_RESULT_OK;
770 Index: linux-2.4.35.4/fs/squashfs/LzmaDecode.h
771 ===================================================================
773 +++ linux-2.4.35.4/fs/squashfs/LzmaDecode.h
777 + LZMA Decoder interface
779 + LZMA SDK 4.05 Copyright (c) 1999-2004 Igor Pavlov (2004-08-25)
780 + http://www.7-zip.org/
782 + LZMA SDK is licensed under two licenses:
783 + 1) GNU Lesser General Public License (GNU LGPL)
784 + 2) Common Public License (CPL)
785 + It means that you can select one of these two licenses and
786 + follow rules of that license.
789 + Igor Pavlov, as the author of this code, expressly permits you to
790 + statically or dynamically link your code (or bind by name) to the
791 + interfaces of this file without subjecting your linked code to the
792 + terms of the CPL or GNU LGPL. Any modifications or additions
793 + to this file, however, are subject to the LGPL or CPL terms.
796 +#ifndef __LZMADECODE_H
797 +#define __LZMADECODE_H
799 +/* #define _LZMA_IN_CB */
800 +/* Use callback for input data */
802 +/* #define _LZMA_OUT_READ */
803 +/* Use read function for output data */
805 +/* #define _LZMA_PROB32 */
806 +/* It can increase speed on some 32-bit CPUs,
807 + but memory usage will be doubled in that case */
809 +/* #define _LZMA_LOC_OPT */
810 +/* Enable local speed optimizations inside code */
813 +#ifdef _LZMA_UINT32_IS_ULONG
814 +#define UInt32 unsigned long
816 +#define UInt32 unsigned int
821 +#define CProb UInt32
823 +#define CProb unsigned short
826 +#define LZMA_RESULT_OK 0
827 +#define LZMA_RESULT_DATA_ERROR 1
828 +#define LZMA_RESULT_NOT_ENOUGH_MEM 2
831 +typedef struct _ILzmaInCallback
833 + int (*Read)(void *object, unsigned char **buffer, UInt32 *bufferSize);
837 +#define LZMA_BASE_SIZE 1846
838 +#define LZMA_LIT_SIZE 768
841 +bufferSize = (LZMA_BASE_SIZE + (LZMA_LIT_SIZE << (lc + lp)))* sizeof(CProb)
842 +bufferSize += 100 in case of _LZMA_OUT_READ
843 +by default CProb is unsigned short,
844 +but if specify _LZMA_PROB_32, CProb will be UInt32(unsigned int)
847 +#ifdef _LZMA_OUT_READ
848 +int LzmaDecoderInit(
849 + unsigned char *buffer, UInt32 bufferSize,
850 + int lc, int lp, int pb,
851 + unsigned char *dictionary, UInt32 dictionarySize,
853 + ILzmaInCallback *inCallback
855 + unsigned char *inStream, UInt32 inSize
861 + unsigned char *buffer,
862 + #ifndef _LZMA_OUT_READ
864 + int lc, int lp, int pb,
866 + ILzmaInCallback *inCallback,
868 + unsigned char *inStream, UInt32 inSize,
871 + unsigned char *outStream, UInt32 outSize,
872 + UInt32 *outSizeProcessed);
875 Index: linux-2.4.35.4/fs/squashfs/Makefile
876 ===================================================================
877 --- linux-2.4.35.4.orig/fs/squashfs/Makefile
878 +++ linux-2.4.35.4/fs/squashfs/Makefile
881 O_TARGET := squashfs.o
883 -obj-y := inode.o squashfs2_0.o
884 +obj-y := inode.o squashfs2_0.o LzmaDecode.o