diff options
author | Phillip Lougher <phillip@lougher.demon.co.uk> | 2009-08-06 18:09:30 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2009-08-07 13:39:56 -0400 |
commit | daeb6b6fbe27049f465c48a7d0ee5555c3b84064 (patch) | |
tree | 3a53744300e0083f3cbf8f769780d971234e3f8a /lib | |
parent | 9c8a8228d0827e0d91d28527209988f672f97d28 (diff) |
bzip2/lzma/gzip: fix comments describing decompressor API
Fix and improve comments in decompress/generic.h that describe the
decompressor API. Also remove an unused definition, and rename INBUF_LEN
in lib/decompress_inflate.c to conform to bzip2/lzma naming.
Signed-off-by: Phillip Lougher <phillip@lougher.demon.co.uk>
Cc: "H. Peter Anvin" <hpa@zytor.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'lib')
-rw-r--r-- | lib/decompress_inflate.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/decompress_inflate.c b/lib/decompress_inflate.c index e36b296fc9f8..bfe605ac534f 100644 --- a/lib/decompress_inflate.c +++ b/lib/decompress_inflate.c | |||
@@ -25,7 +25,7 @@ | |||
25 | #include <linux/decompress/mm.h> | 25 | #include <linux/decompress/mm.h> |
26 | #include <linux/slab.h> | 26 | #include <linux/slab.h> |
27 | 27 | ||
28 | #define INBUF_LEN (16*1024) | 28 | #define GZIP_IOBUF_SIZE (16*1024) |
29 | 29 | ||
30 | /* Included from initramfs et al code */ | 30 | /* Included from initramfs et al code */ |
31 | STATIC int INIT gunzip(unsigned char *buf, int len, | 31 | STATIC int INIT gunzip(unsigned char *buf, int len, |
@@ -55,7 +55,7 @@ STATIC int INIT gunzip(unsigned char *buf, int len, | |||
55 | if (buf) | 55 | if (buf) |
56 | zbuf = buf; | 56 | zbuf = buf; |
57 | else { | 57 | else { |
58 | zbuf = malloc(INBUF_LEN); | 58 | zbuf = malloc(GZIP_IOBUF_SIZE); |
59 | len = 0; | 59 | len = 0; |
60 | } | 60 | } |
61 | if (!zbuf) { | 61 | if (!zbuf) { |
@@ -77,7 +77,7 @@ STATIC int INIT gunzip(unsigned char *buf, int len, | |||
77 | } | 77 | } |
78 | 78 | ||
79 | if (len == 0) | 79 | if (len == 0) |
80 | len = fill(zbuf, INBUF_LEN); | 80 | len = fill(zbuf, GZIP_IOBUF_SIZE); |
81 | 81 | ||
82 | /* verify the gzip header */ | 82 | /* verify the gzip header */ |
83 | if (len < 10 || | 83 | if (len < 10 || |
@@ -113,7 +113,7 @@ STATIC int INIT gunzip(unsigned char *buf, int len, | |||
113 | while (rc == Z_OK) { | 113 | while (rc == Z_OK) { |
114 | if (strm->avail_in == 0) { | 114 | if (strm->avail_in == 0) { |
115 | /* TODO: handle case where both pos and fill are set */ | 115 | /* TODO: handle case where both pos and fill are set */ |
116 | len = fill(zbuf, INBUF_LEN); | 116 | len = fill(zbuf, GZIP_IOBUF_SIZE); |
117 | if (len < 0) { | 117 | if (len < 0) { |
118 | rc = -1; | 118 | rc = -1; |
119 | error("read error"); | 119 | error("read error"); |