xz_wrapper.c (e5451c8f8330e03ad3cfa16048b4daf961af434f) | xz_wrapper.c (09cbfeaf1a5a67bfb3201e0c83c810cecb2efa5a) |
---|---|
1/* 2 * Squashfs - a compressed read only filesystem for Linux 3 * 4 * Copyright (c) 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 5 * Phillip Lougher <phillip@squashfs.org.uk> 6 * 7 * This program is free software; you can redistribute it and/or 8 * modify it under the terms of the GNU General Public License --- 127 unchanged lines hidden (view full) --- 136 enum xz_ret xz_err; 137 int avail, total = 0, k = 0; 138 struct squashfs_xz *stream = strm; 139 140 xz_dec_reset(stream->state); 141 stream->buf.in_pos = 0; 142 stream->buf.in_size = 0; 143 stream->buf.out_pos = 0; | 1/* 2 * Squashfs - a compressed read only filesystem for Linux 3 * 4 * Copyright (c) 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 5 * Phillip Lougher <phillip@squashfs.org.uk> 6 * 7 * This program is free software; you can redistribute it and/or 8 * modify it under the terms of the GNU General Public License --- 127 unchanged lines hidden (view full) --- 136 enum xz_ret xz_err; 137 int avail, total = 0, k = 0; 138 struct squashfs_xz *stream = strm; 139 140 xz_dec_reset(stream->state); 141 stream->buf.in_pos = 0; 142 stream->buf.in_size = 0; 143 stream->buf.out_pos = 0; |
144 stream->buf.out_size = PAGE_CACHE_SIZE; | 144 stream->buf.out_size = PAGE_SIZE; |
145 stream->buf.out = squashfs_first_page(output); 146 147 do { 148 if (stream->buf.in_pos == stream->buf.in_size && k < b) { 149 avail = min(length, msblk->devblksize - offset); 150 length -= avail; 151 stream->buf.in = bh[k]->b_data + offset; 152 stream->buf.in_size = avail; 153 stream->buf.in_pos = 0; 154 offset = 0; 155 } 156 157 if (stream->buf.out_pos == stream->buf.out_size) { 158 stream->buf.out = squashfs_next_page(output); 159 if (stream->buf.out != NULL) { 160 stream->buf.out_pos = 0; | 145 stream->buf.out = squashfs_first_page(output); 146 147 do { 148 if (stream->buf.in_pos == stream->buf.in_size && k < b) { 149 avail = min(length, msblk->devblksize - offset); 150 length -= avail; 151 stream->buf.in = bh[k]->b_data + offset; 152 stream->buf.in_size = avail; 153 stream->buf.in_pos = 0; 154 offset = 0; 155 } 156 157 if (stream->buf.out_pos == stream->buf.out_size) { 158 stream->buf.out = squashfs_next_page(output); 159 if (stream->buf.out != NULL) { 160 stream->buf.out_pos = 0; |
161 total += PAGE_CACHE_SIZE; | 161 total += PAGE_SIZE; |
162 } 163 } 164 165 xz_err = xz_dec_run(stream->state, &stream->buf); 166 167 if (stream->buf.in_pos == stream->buf.in_size && k < b) 168 put_bh(bh[k++]); 169 } while (xz_err == XZ_OK); --- 24 unchanged lines hidden --- | 162 } 163 } 164 165 xz_err = xz_dec_run(stream->state, &stream->buf); 166 167 if (stream->buf.in_pos == stream->buf.in_size && k < b) 168 put_bh(bh[k++]); 169 } while (xz_err == XZ_OK); --- 24 unchanged lines hidden --- |