diff options
Diffstat (limited to 'fs/jffs2/compr_zlib.c')
-rw-r--r-- | fs/jffs2/compr_zlib.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/fs/jffs2/compr_zlib.c b/fs/jffs2/compr_zlib.c index 83f7e0788fd0..4db8be8e90cc 100644 --- a/fs/jffs2/compr_zlib.c +++ b/fs/jffs2/compr_zlib.c | |||
@@ -7,7 +7,7 @@ | |||
7 | * | 7 | * |
8 | * For licensing information, see the file 'LICENCE' in this directory. | 8 | * For licensing information, see the file 'LICENCE' in this directory. |
9 | * | 9 | * |
10 | * $Id: compr_zlib.c,v 1.31 2005/05/20 19:30:06 gleixner Exp $ | 10 | * $Id: compr_zlib.c,v 1.32 2005/11/07 11:14:38 gleixner Exp $ |
11 | * | 11 | * |
12 | */ | 12 | */ |
13 | 13 | ||
@@ -24,11 +24,11 @@ | |||
24 | #include "nodelist.h" | 24 | #include "nodelist.h" |
25 | #include "compr.h" | 25 | #include "compr.h" |
26 | 26 | ||
27 | /* Plan: call deflate() with avail_in == *sourcelen, | 27 | /* Plan: call deflate() with avail_in == *sourcelen, |
28 | avail_out = *dstlen - 12 and flush == Z_FINISH. | 28 | avail_out = *dstlen - 12 and flush == Z_FINISH. |
29 | If it doesn't manage to finish, call it again with | 29 | If it doesn't manage to finish, call it again with |
30 | avail_in == 0 and avail_out set to the remaining 12 | 30 | avail_in == 0 and avail_out set to the remaining 12 |
31 | bytes for it to clean up. | 31 | bytes for it to clean up. |
32 | Q: Is 12 bytes sufficient? | 32 | Q: Is 12 bytes sufficient? |
33 | */ | 33 | */ |
34 | #define STREAM_END_SPACE 12 | 34 | #define STREAM_END_SPACE 12 |
@@ -89,7 +89,7 @@ static int jffs2_zlib_compress(unsigned char *data_in, | |||
89 | 89 | ||
90 | def_strm.next_in = data_in; | 90 | def_strm.next_in = data_in; |
91 | def_strm.total_in = 0; | 91 | def_strm.total_in = 0; |
92 | 92 | ||
93 | def_strm.next_out = cpage_out; | 93 | def_strm.next_out = cpage_out; |
94 | def_strm.total_out = 0; | 94 | def_strm.total_out = 0; |
95 | 95 | ||
@@ -99,7 +99,7 @@ static int jffs2_zlib_compress(unsigned char *data_in, | |||
99 | D1(printk(KERN_DEBUG "calling deflate with avail_in %d, avail_out %d\n", | 99 | D1(printk(KERN_DEBUG "calling deflate with avail_in %d, avail_out %d\n", |
100 | def_strm.avail_in, def_strm.avail_out)); | 100 | def_strm.avail_in, def_strm.avail_out)); |
101 | ret = zlib_deflate(&def_strm, Z_PARTIAL_FLUSH); | 101 | ret = zlib_deflate(&def_strm, Z_PARTIAL_FLUSH); |
102 | D1(printk(KERN_DEBUG "deflate returned with avail_in %d, avail_out %d, total_in %ld, total_out %ld\n", | 102 | D1(printk(KERN_DEBUG "deflate returned with avail_in %d, avail_out %d, total_in %ld, total_out %ld\n", |
103 | def_strm.avail_in, def_strm.avail_out, def_strm.total_in, def_strm.total_out)); | 103 | def_strm.avail_in, def_strm.avail_out, def_strm.total_in, def_strm.total_out)); |
104 | if (ret != Z_OK) { | 104 | if (ret != Z_OK) { |
105 | D1(printk(KERN_DEBUG "deflate in loop returned %d\n", ret)); | 105 | D1(printk(KERN_DEBUG "deflate in loop returned %d\n", ret)); |
@@ -150,7 +150,7 @@ static int jffs2_zlib_decompress(unsigned char *data_in, | |||
150 | inf_strm.next_in = data_in; | 150 | inf_strm.next_in = data_in; |
151 | inf_strm.avail_in = srclen; | 151 | inf_strm.avail_in = srclen; |
152 | inf_strm.total_in = 0; | 152 | inf_strm.total_in = 0; |
153 | 153 | ||
154 | inf_strm.next_out = cpage_out; | 154 | inf_strm.next_out = cpage_out; |
155 | inf_strm.avail_out = destlen; | 155 | inf_strm.avail_out = destlen; |
156 | inf_strm.total_out = 0; | 156 | inf_strm.total_out = 0; |