1 diff -urN linux-2.6.19.old/fs/squashfs/inode.c linux-2.6.19.dev/fs/squashfs/inode.c
2 --- linux-2.6.19.old/fs/squashfs/inode.c 2006-12-14 03:13:20.000000000 +0100
3 +++ linux-2.6.19.dev/fs/squashfs/inode.c 2006-12-14 03:13:20.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 dentry *, struct kstatfs *);
41 static int squashfs_symlink_readpage(struct file *file, struct page *page);
43 const char *, void *, struct vfsmount *);
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);
79 @@ -2045,15 +2075,19 @@
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");
92 if ((err = register_filesystem(&squashfs_fs_type))) {
93 +#ifndef SQUASHFS_LZMA
94 vfree(stream.workspace);
101 static void __exit exit_squashfs_fs(void)
103 +#ifndef SQUASHFS_LZMA
104 vfree(stream.workspace);
106 unregister_filesystem(&squashfs_fs_type);
107 destroy_inodecache();
109 diff -urN linux-2.6.19.old/fs/squashfs/LzmaDecode.c linux-2.6.19.dev/fs/squashfs/LzmaDecode.c
110 --- linux-2.6.19.old/fs/squashfs/LzmaDecode.c 1970-01-01 01:00:00.000000000 +0100
111 +++ linux-2.6.19.dev/fs/squashfs/LzmaDecode.c 2006-12-14 03:13:20.000000000 +0100
117 + LZMA SDK 4.05 Copyright (c) 1999-2004 Igor Pavlov (2004-08-25)
118 + http://www.7-zip.org/
120 + LZMA SDK is licensed under two licenses:
121 + 1) GNU Lesser General Public License (GNU LGPL)
122 + 2) Common Public License (CPL)
123 + It means that you can select one of these two licenses and
124 + follow rules of that license.
127 + Igor Pavlov, as the author of this code, expressly permits you to
128 + statically or dynamically link your code (or bind by name) to the
129 + interfaces of this file without subjecting your linked code to the
130 + terms of the CPL or GNU LGPL. Any modifications or additions
131 + to this file, however, are subject to the LGPL or CPL terms.
134 +#include "LzmaDecode.h"
137 +#define Byte unsigned char
140 +#define kNumTopBits 24
141 +#define kTopValue ((UInt32)1 << kNumTopBits)
143 +#define kNumBitModelTotalBits 11
144 +#define kBitModelTotal (1 << kNumBitModelTotalBits)
145 +#define kNumMoveBits 5
147 +typedef struct _CRangeDecoder
154 + ILzmaInCallback *InCallback;
160 +Byte RangeDecoderReadByte(CRangeDecoder *rd)
162 + if (rd->Buffer == rd->BufferLim)
166 + rd->Result = rd->InCallback->Read(rd->InCallback, &rd->Buffer, &size);
167 + rd->BufferLim = rd->Buffer + size;
171 + rd->ExtraBytes = 1;
175 + return (*rd->Buffer++);
178 +/* #define ReadByte (*rd->Buffer++) */
179 +#define ReadByte (RangeDecoderReadByte(rd))
181 +void RangeDecoderInit(CRangeDecoder *rd,
183 + ILzmaInCallback *inCallback
185 + Byte *stream, UInt32 bufferSize
191 + rd->InCallback = inCallback;
192 + rd->Buffer = rd->BufferLim = 0;
194 + rd->Buffer = stream;
195 + rd->BufferLim = stream + bufferSize;
197 + rd->ExtraBytes = 0;
199 + rd->Range = (0xFFFFFFFF);
200 + for(i = 0; i < 5; i++)
201 + rd->Code = (rd->Code << 8) | ReadByte;
204 +#define RC_INIT_VAR UInt32 range = rd->Range; UInt32 code = rd->Code;
205 +#define RC_FLUSH_VAR rd->Range = range; rd->Code = code;
206 +#define RC_NORMALIZE if (range < kTopValue) { range <<= 8; code = (code << 8) | ReadByte; }
208 +UInt32 RangeDecoderDecodeDirectBits(CRangeDecoder *rd, int numTotalBits)
213 + for (i = numTotalBits; i > 0; i--)
225 + t = (code - range) >> 31;
227 + code -= range & (t - 1);
228 + result = (result + result) | (1 - t);
236 +int RangeDecoderBitDecode(CProb *prob, CRangeDecoder *rd)
238 + UInt32 bound = (rd->Range >> kNumBitModelTotalBits) * *prob;
239 + if (rd->Code < bound)
242 + *prob += (kBitModelTotal - *prob) >> kNumMoveBits;
243 + if (rd->Range < kTopValue)
245 + rd->Code = (rd->Code << 8) | ReadByte;
252 + rd->Range -= bound;
254 + *prob -= (*prob) >> kNumMoveBits;
255 + if (rd->Range < kTopValue)
257 + rd->Code = (rd->Code << 8) | ReadByte;
264 +#define RC_GET_BIT2(prob, mi, A0, A1) \
265 + UInt32 bound = (range >> kNumBitModelTotalBits) * *prob; \
266 + if (code < bound) \
267 + { A0; range = bound; *prob += (kBitModelTotal - *prob) >> kNumMoveBits; mi <<= 1; } \
269 + { A1; range -= bound; code -= bound; *prob -= (*prob) >> kNumMoveBits; mi = (mi + mi) + 1; } \
272 +#define RC_GET_BIT(prob, mi) RC_GET_BIT2(prob, mi, ; , ;)
274 +int RangeDecoderBitTreeDecode(CProb *probs, int numLevels, CRangeDecoder *rd)
278 + #ifdef _LZMA_LOC_OPT
281 + for(i = numLevels; i > 0; i--)
283 + #ifdef _LZMA_LOC_OPT
284 + CProb *prob = probs + mi;
285 + RC_GET_BIT(prob, mi)
287 + mi = (mi + mi) + RangeDecoderBitDecode(probs + mi, rd);
290 + #ifdef _LZMA_LOC_OPT
293 + return mi - (1 << numLevels);
296 +int RangeDecoderReverseBitTreeDecode(CProb *probs, int numLevels, CRangeDecoder *rd)
301 + #ifdef _LZMA_LOC_OPT
304 + for(i = 0; i < numLevels; i++)
306 + #ifdef _LZMA_LOC_OPT
307 + CProb *prob = probs + mi;
308 + RC_GET_BIT2(prob, mi, ; , symbol |= (1 << i))
310 + int bit = RangeDecoderBitDecode(probs + mi, rd);
311 + mi = mi + mi + bit;
312 + symbol |= (bit << i);
315 + #ifdef _LZMA_LOC_OPT
321 +Byte LzmaLiteralDecode(CProb *probs, CRangeDecoder *rd)
324 + #ifdef _LZMA_LOC_OPT
329 + #ifdef _LZMA_LOC_OPT
330 + CProb *prob = probs + symbol;
331 + RC_GET_BIT(prob, symbol)
333 + symbol = (symbol + symbol) | RangeDecoderBitDecode(probs + symbol, rd);
336 + while (symbol < 0x100);
337 + #ifdef _LZMA_LOC_OPT
343 +Byte LzmaLiteralDecodeMatch(CProb *probs, CRangeDecoder *rd, Byte matchByte)
346 + #ifdef _LZMA_LOC_OPT
352 + int matchBit = (matchByte >> 7) & 1;
354 + #ifdef _LZMA_LOC_OPT
356 + CProb *prob = probs + ((1 + matchBit) << 8) + symbol;
357 + RC_GET_BIT2(prob, symbol, bit = 0, bit = 1)
360 + bit = RangeDecoderBitDecode(probs + ((1 + matchBit) << 8) + symbol, rd);
361 + symbol = (symbol << 1) | bit;
363 + if (matchBit != bit)
365 + while (symbol < 0x100)
367 + #ifdef _LZMA_LOC_OPT
368 + CProb *prob = probs + symbol;
369 + RC_GET_BIT(prob, symbol)
371 + symbol = (symbol + symbol) | RangeDecoderBitDecode(probs + symbol, rd);
377 + while (symbol < 0x100);
378 + #ifdef _LZMA_LOC_OPT
384 +#define kNumPosBitsMax 4
385 +#define kNumPosStatesMax (1 << kNumPosBitsMax)
387 +#define kLenNumLowBits 3
388 +#define kLenNumLowSymbols (1 << kLenNumLowBits)
389 +#define kLenNumMidBits 3
390 +#define kLenNumMidSymbols (1 << kLenNumMidBits)
391 +#define kLenNumHighBits 8
392 +#define kLenNumHighSymbols (1 << kLenNumHighBits)
395 +#define LenChoice2 (LenChoice + 1)
396 +#define LenLow (LenChoice2 + 1)
397 +#define LenMid (LenLow + (kNumPosStatesMax << kLenNumLowBits))
398 +#define LenHigh (LenMid + (kNumPosStatesMax << kLenNumMidBits))
399 +#define kNumLenProbs (LenHigh + kLenNumHighSymbols)
401 +int LzmaLenDecode(CProb *p, CRangeDecoder *rd, int posState)
403 + if(RangeDecoderBitDecode(p + LenChoice, rd) == 0)
404 + return RangeDecoderBitTreeDecode(p + LenLow +
405 + (posState << kLenNumLowBits), kLenNumLowBits, rd);
406 + if(RangeDecoderBitDecode(p + LenChoice2, rd) == 0)
407 + return kLenNumLowSymbols + RangeDecoderBitTreeDecode(p + LenMid +
408 + (posState << kLenNumMidBits), kLenNumMidBits, rd);
409 + return kLenNumLowSymbols + kLenNumMidSymbols +
410 + RangeDecoderBitTreeDecode(p + LenHigh, kLenNumHighBits, rd);
413 +#define kNumStates 12
415 +#define kStartPosModelIndex 4
416 +#define kEndPosModelIndex 14
417 +#define kNumFullDistances (1 << (kEndPosModelIndex >> 1))
419 +#define kNumPosSlotBits 6
420 +#define kNumLenToPosStates 4
422 +#define kNumAlignBits 4
423 +#define kAlignTableSize (1 << kNumAlignBits)
425 +#define kMatchMinLen 2
428 +#define IsRep (IsMatch + (kNumStates << kNumPosBitsMax))
429 +#define IsRepG0 (IsRep + kNumStates)
430 +#define IsRepG1 (IsRepG0 + kNumStates)
431 +#define IsRepG2 (IsRepG1 + kNumStates)
432 +#define IsRep0Long (IsRepG2 + kNumStates)
433 +#define PosSlot (IsRep0Long + (kNumStates << kNumPosBitsMax))
434 +#define SpecPos (PosSlot + (kNumLenToPosStates << kNumPosSlotBits))
435 +#define Align (SpecPos + kNumFullDistances - kEndPosModelIndex)
436 +#define LenCoder (Align + kAlignTableSize)
437 +#define RepLenCoder (LenCoder + kNumLenProbs)
438 +#define Literal (RepLenCoder + kNumLenProbs)
440 +#if Literal != LZMA_BASE_SIZE
444 +#ifdef _LZMA_OUT_READ
446 +typedef struct _LzmaVarState
448 + CRangeDecoder RangeDecoder;
450 + UInt32 DictionarySize;
451 + UInt32 DictionaryPos;
458 + int PreviousIsMatch;
462 +int LzmaDecoderInit(
463 + unsigned char *buffer, UInt32 bufferSize,
464 + int lc, int lp, int pb,
465 + unsigned char *dictionary, UInt32 dictionarySize,
467 + ILzmaInCallback *inCallback
469 + unsigned char *inStream, UInt32 inSize
473 + LzmaVarState *vs = (LzmaVarState *)buffer;
474 + CProb *p = (CProb *)(buffer + sizeof(LzmaVarState));
475 + UInt32 numProbs = Literal + ((UInt32)LZMA_LIT_SIZE << (lc + lp));
477 + if (bufferSize < numProbs * sizeof(CProb) + sizeof(LzmaVarState))
478 + return LZMA_RESULT_NOT_ENOUGH_MEM;
479 + vs->Dictionary = dictionary;
480 + vs->DictionarySize = dictionarySize;
481 + vs->DictionaryPos = 0;
483 + vs->Reps[0] = vs->Reps[1] = vs->Reps[2] = vs->Reps[3] = 1;
488 + vs->PreviousIsMatch = 0;
490 + dictionary[dictionarySize - 1] = 0;
491 + for (i = 0; i < numProbs; i++)
492 + p[i] = kBitModelTotal >> 1;
493 + RangeDecoderInit(&vs->RangeDecoder,
500 + return LZMA_RESULT_OK;
503 +int LzmaDecode(unsigned char *buffer,
504 + unsigned char *outStream, UInt32 outSize,
505 + UInt32 *outSizeProcessed)
507 + LzmaVarState *vs = (LzmaVarState *)buffer;
508 + CProb *p = (CProb *)(buffer + sizeof(LzmaVarState));
509 + CRangeDecoder rd = vs->RangeDecoder;
510 + int state = vs->State;
511 + int previousIsMatch = vs->PreviousIsMatch;
513 + UInt32 rep0 = vs->Reps[0], rep1 = vs->Reps[1], rep2 = vs->Reps[2], rep3 = vs->Reps[3];
515 + UInt32 posStateMask = (1 << (vs->pb)) - 1;
516 + UInt32 literalPosMask = (1 << (vs->lp)) - 1;
518 + int len = vs->RemainLen;
519 + UInt32 globalPos = vs->GlobalPos;
521 + Byte *dictionary = vs->Dictionary;
522 + UInt32 dictionarySize = vs->DictionarySize;
523 + UInt32 dictionaryPos = vs->DictionaryPos;
527 + *outSizeProcessed = 0;
528 + return LZMA_RESULT_OK;
531 + while(len > 0 && nowPos < outSize)
533 + UInt32 pos = dictionaryPos - rep0;
534 + if (pos >= dictionarySize)
535 + pos += dictionarySize;
536 + outStream[nowPos++] = dictionary[dictionaryPos] = dictionary[pos];
537 + if (++dictionaryPos == dictionarySize)
541 + if (dictionaryPos == 0)
542 + previousByte = dictionary[dictionarySize - 1];
544 + previousByte = dictionary[dictionaryPos - 1];
548 + Byte *buffer, UInt32 bufferSize,
549 + int lc, int lp, int pb,
551 + ILzmaInCallback *inCallback,
553 + unsigned char *inStream, UInt32 inSize,
555 + unsigned char *outStream, UInt32 outSize,
556 + UInt32 *outSizeProcessed)
558 + UInt32 numProbs = Literal + ((UInt32)LZMA_LIT_SIZE << (lc + lp));
559 + CProb *p = (CProb *)buffer;
563 + int previousIsMatch = 0;
564 + Byte previousByte = 0;
565 + UInt32 rep0 = 1, rep1 = 1, rep2 = 1, rep3 = 1;
567 + UInt32 posStateMask = (1 << pb) - 1;
568 + UInt32 literalPosMask = (1 << lp) - 1;
570 + if (bufferSize < numProbs * sizeof(CProb))
571 + return LZMA_RESULT_NOT_ENOUGH_MEM;
572 + for (i = 0; i < numProbs; i++)
573 + p[i] = kBitModelTotal >> 1;
574 + RangeDecoderInit(&rd,
583 + *outSizeProcessed = 0;
584 + while(nowPos < outSize)
586 + int posState = (int)(
588 + #ifdef _LZMA_OUT_READ
594 + if (rd.Result != LZMA_RESULT_OK)
597 + if (rd.ExtraBytes != 0)
598 + return LZMA_RESULT_DATA_ERROR;
599 + if (RangeDecoderBitDecode(p + IsMatch + (state << kNumPosBitsMax) + posState, &rd) == 0)
601 + CProb *probs = p + Literal + (LZMA_LIT_SIZE *
604 + #ifdef _LZMA_OUT_READ
608 + & literalPosMask) << lc) + (previousByte >> (8 - lc))));
610 + if (state < 4) state = 0;
611 + else if (state < 10) state -= 3;
613 + if (previousIsMatch)
616 + #ifdef _LZMA_OUT_READ
617 + UInt32 pos = dictionaryPos - rep0;
618 + if (pos >= dictionarySize)
619 + pos += dictionarySize;
620 + matchByte = dictionary[pos];
622 + matchByte = outStream[nowPos - rep0];
624 + previousByte = LzmaLiteralDecodeMatch(probs, &rd, matchByte);
625 + previousIsMatch = 0;
628 + previousByte = LzmaLiteralDecode(probs, &rd);
629 + outStream[nowPos++] = previousByte;
630 + #ifdef _LZMA_OUT_READ
631 + dictionary[dictionaryPos] = previousByte;
632 + if (++dictionaryPos == dictionarySize)
638 + previousIsMatch = 1;
639 + if (RangeDecoderBitDecode(p + IsRep + state, &rd) == 1)
641 + if (RangeDecoderBitDecode(p + IsRepG0 + state, &rd) == 0)
643 + if (RangeDecoderBitDecode(p + IsRep0Long + (state << kNumPosBitsMax) + posState, &rd) == 0)
645 + #ifdef _LZMA_OUT_READ
650 + #ifdef _LZMA_OUT_READ
655 + return LZMA_RESULT_DATA_ERROR;
656 + state = state < 7 ? 9 : 11;
657 + #ifdef _LZMA_OUT_READ
658 + pos = dictionaryPos - rep0;
659 + if (pos >= dictionarySize)
660 + pos += dictionarySize;
661 + previousByte = dictionary[pos];
662 + dictionary[dictionaryPos] = previousByte;
663 + if (++dictionaryPos == dictionarySize)
666 + previousByte = outStream[nowPos - rep0];
668 + outStream[nowPos++] = previousByte;
675 + if(RangeDecoderBitDecode(p + IsRepG1 + state, &rd) == 0)
679 + if(RangeDecoderBitDecode(p + IsRepG2 + state, &rd) == 0)
691 + len = LzmaLenDecode(p + RepLenCoder, &rd, posState);
692 + state = state < 7 ? 8 : 11;
700 + state = state < 7 ? 7 : 10;
701 + len = LzmaLenDecode(p + LenCoder, &rd, posState);
702 + posSlot = RangeDecoderBitTreeDecode(p + PosSlot +
703 + ((len < kNumLenToPosStates ? len : kNumLenToPosStates - 1) <<
704 + kNumPosSlotBits), kNumPosSlotBits, &rd);
705 + if (posSlot >= kStartPosModelIndex)
707 + int numDirectBits = ((posSlot >> 1) - 1);
708 + rep0 = ((2 | ((UInt32)posSlot & 1)) << numDirectBits);
709 + if (posSlot < kEndPosModelIndex)
711 + rep0 += RangeDecoderReverseBitTreeDecode(
712 + p + SpecPos + rep0 - posSlot - 1, numDirectBits, &rd);
716 + rep0 += RangeDecoderDecodeDirectBits(&rd,
717 + numDirectBits - kNumAlignBits) << kNumAlignBits;
718 + rep0 += RangeDecoderReverseBitTreeDecode(p + Align, kNumAlignBits, &rd);
725 + if (rep0 == (UInt32)(0))
727 + /* it's for stream version */
732 + #ifdef _LZMA_OUT_READ
737 + return LZMA_RESULT_DATA_ERROR;
739 + len += kMatchMinLen;
742 + #ifdef _LZMA_OUT_READ
743 + UInt32 pos = dictionaryPos - rep0;
744 + if (pos >= dictionarySize)
745 + pos += dictionarySize;
746 + previousByte = dictionary[pos];
747 + dictionary[dictionaryPos] = previousByte;
748 + if (++dictionaryPos == dictionarySize)
751 + previousByte = outStream[nowPos - rep0];
753 + outStream[nowPos++] = previousByte;
756 + while(len > 0 && nowPos < outSize);
760 + #ifdef _LZMA_OUT_READ
761 + vs->RangeDecoder = rd;
762 + vs->DictionaryPos = dictionaryPos;
763 + vs->GlobalPos = globalPos + nowPos;
764 + vs->Reps[0] = rep0;
765 + vs->Reps[1] = rep1;
766 + vs->Reps[2] = rep2;
767 + vs->Reps[3] = rep3;
769 + vs->PreviousIsMatch = previousIsMatch;
770 + vs->RemainLen = len;
773 + *outSizeProcessed = nowPos;
774 + return LZMA_RESULT_OK;
776 diff -urN linux-2.6.19.old/fs/squashfs/LzmaDecode.h linux-2.6.19.dev/fs/squashfs/LzmaDecode.h
777 --- linux-2.6.19.old/fs/squashfs/LzmaDecode.h 1970-01-01 01:00:00.000000000 +0100
778 +++ linux-2.6.19.dev/fs/squashfs/LzmaDecode.h 2006-12-14 03:13:20.000000000 +0100
782 + LZMA Decoder interface
784 + LZMA SDK 4.05 Copyright (c) 1999-2004 Igor Pavlov (2004-08-25)
785 + http://www.7-zip.org/
787 + LZMA SDK is licensed under two licenses:
788 + 1) GNU Lesser General Public License (GNU LGPL)
789 + 2) Common Public License (CPL)
790 + It means that you can select one of these two licenses and
791 + follow rules of that license.
794 + Igor Pavlov, as the author of this code, expressly permits you to
795 + statically or dynamically link your code (or bind by name) to the
796 + interfaces of this file without subjecting your linked code to the
797 + terms of the CPL or GNU LGPL. Any modifications or additions
798 + to this file, however, are subject to the LGPL or CPL terms.
801 +#ifndef __LZMADECODE_H
802 +#define __LZMADECODE_H
804 +/* #define _LZMA_IN_CB */
805 +/* Use callback for input data */
807 +/* #define _LZMA_OUT_READ */
808 +/* Use read function for output data */
810 +/* #define _LZMA_PROB32 */
811 +/* It can increase speed on some 32-bit CPUs,
812 + but memory usage will be doubled in that case */
814 +/* #define _LZMA_LOC_OPT */
815 +/* Enable local speed optimizations inside code */
818 +#ifdef _LZMA_UINT32_IS_ULONG
819 +#define UInt32 unsigned long
821 +#define UInt32 unsigned int
826 +#define CProb UInt32
828 +#define CProb unsigned short
831 +#define LZMA_RESULT_OK 0
832 +#define LZMA_RESULT_DATA_ERROR 1
833 +#define LZMA_RESULT_NOT_ENOUGH_MEM 2
836 +typedef struct _ILzmaInCallback
838 + int (*Read)(void *object, unsigned char **buffer, UInt32 *bufferSize);
842 +#define LZMA_BASE_SIZE 1846
843 +#define LZMA_LIT_SIZE 768
846 +bufferSize = (LZMA_BASE_SIZE + (LZMA_LIT_SIZE << (lc + lp)))* sizeof(CProb)
847 +bufferSize += 100 in case of _LZMA_OUT_READ
848 +by default CProb is unsigned short,
849 +but if specify _LZMA_PROB_32, CProb will be UInt32(unsigned int)
852 +#ifdef _LZMA_OUT_READ
853 +int LzmaDecoderInit(
854 + unsigned char *buffer, UInt32 bufferSize,
855 + int lc, int lp, int pb,
856 + unsigned char *dictionary, UInt32 dictionarySize,
858 + ILzmaInCallback *inCallback
860 + unsigned char *inStream, UInt32 inSize
866 + unsigned char *buffer,
867 + #ifndef _LZMA_OUT_READ
869 + int lc, int lp, int pb,
871 + ILzmaInCallback *inCallback,
873 + unsigned char *inStream, UInt32 inSize,
876 + unsigned char *outStream, UInt32 outSize,
877 + UInt32 *outSizeProcessed);
880 diff -urN linux-2.6.19.old/fs/squashfs/Makefile linux-2.6.19.dev/fs/squashfs/Makefile
881 --- linux-2.6.19.old/fs/squashfs/Makefile 2006-12-14 03:13:20.000000000 +0100
882 +++ linux-2.6.19.dev/fs/squashfs/Makefile 2006-12-14 03:13:20.000000000 +0100
884 obj-$(CONFIG_SQUASHFS) += squashfs.o
885 squashfs-y += inode.o
886 squashfs-y += squashfs2_0.o
887 +squashfs-y += LzmaDecode.o