platform.c (7de8fe2fa8f94985a83120f04d41a93425ea66ba) | platform.c (b61edf8e7cf9d8d450b65588b2ff40dfb8c2fd9b) |
---|---|
1/* 2 * Persistent Storage - platform driver interface parts. 3 * 4 * Copyright (C) 2007-2008 Google, Inc. 5 * Copyright (C) 2010 Intel Corporation <tony.luck@intel.com> 6 * 7 * This program is free software; you can redistribute it and/or modify 8 * it under the terms of the GNU General Public License version 2 as --- 154 unchanged lines hidden (view full) --- 163} 164 165/* Derived from logfs_uncompress */ 166static int pstore_decompress(void *in, void *out, size_t inlen, size_t outlen) 167{ 168 int err, ret; 169 170 ret = -EIO; | 1/* 2 * Persistent Storage - platform driver interface parts. 3 * 4 * Copyright (C) 2007-2008 Google, Inc. 5 * Copyright (C) 2010 Intel Corporation <tony.luck@intel.com> 6 * 7 * This program is free software; you can redistribute it and/or modify 8 * it under the terms of the GNU General Public License version 2 as --- 154 unchanged lines hidden (view full) --- 163} 164 165/* Derived from logfs_uncompress */ 166static int pstore_decompress(void *in, void *out, size_t inlen, size_t outlen) 167{ 168 int err, ret; 169 170 ret = -EIO; |
171 err = zlib_inflateInit(&stream); | 171 err = zlib_inflateInit2(&stream, WINDOW_BITS); |
172 if (err != Z_OK) 173 goto error; 174 175 stream.next_in = in; 176 stream.avail_in = inlen; 177 stream.total_in = 0; 178 stream.next_out = out; 179 stream.avail_out = outlen; --- 368 unchanged lines hidden --- | 172 if (err != Z_OK) 173 goto error; 174 175 stream.next_in = in; 176 stream.avail_in = inlen; 177 stream.total_in = 0; 178 stream.next_out = out; 179 stream.avail_out = outlen; --- 368 unchanged lines hidden --- |