diff options
author | David Gibson <david@gibson.dropbear.id.au> | 2007-03-14 01:32:17 -0400 |
---|---|---|
committer | Paul Mackerras <paulus@samba.org> | 2007-03-16 01:38:19 -0400 |
commit | 7850ad5c39a40ae14ab37e030357e2ae8252af2b (patch) | |
tree | c384344139d0153ed54de2e051a7023437b856b2 /arch/powerpc/boot/gunzip_util.h | |
parent | 0e0293c898c424c52e5d4e7f6923a203d06b9c4b (diff) |
[POWERPC] Add documentation for the zImage's gunzip convenience functions
This patch adds documenting comments to the gunzip convenience
functions added in commit ad9d2716cfc1cda5a7e0d7bc0db45e3af8a4adbb.
It also removes a stray newline, and an unused global variable.
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
Signed-off-by: Paul Mackerras <paulus@samba.org>
Diffstat (limited to 'arch/powerpc/boot/gunzip_util.h')
-rw-r--r-- | arch/powerpc/boot/gunzip_util.h | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/arch/powerpc/boot/gunzip_util.h b/arch/powerpc/boot/gunzip_util.h index 950f62fe0a6d..b3dfa6e87b3a 100644 --- a/arch/powerpc/boot/gunzip_util.h +++ b/arch/powerpc/boot/gunzip_util.h | |||
@@ -12,6 +12,22 @@ | |||
12 | 12 | ||
13 | #include "zlib.h" | 13 | #include "zlib.h" |
14 | 14 | ||
15 | /* | ||
16 | * These functions are designed to make life easy for decompressing | ||
17 | * kernel images, initrd images or any other gzip compressed image, | ||
18 | * particularly if its useful to decompress part of the image (e.g. to | ||
19 | * examine headers) before decompressing the remainder. | ||
20 | * | ||
21 | * To use: | ||
22 | * - declare a gunzip_state structure | ||
23 | * - use gunzip_start() to initialize the state, associating it | ||
24 | * with a stream of compressed data | ||
25 | * - use gunzip_partial(), gunzip_exactly() and gunzip_discard() | ||
26 | * in any combination to extract pieces of data from the stream | ||
27 | * - Finally use gunzip_finish() to extract the tail of the | ||
28 | * compressed stream and wind up zlib | ||
29 | */ | ||
30 | |||
15 | /* scratch space for gunzip; 46912 is from zlib_inflate_workspacesize() */ | 31 | /* scratch space for gunzip; 46912 is from zlib_inflate_workspacesize() */ |
16 | #define GUNZIP_SCRATCH_SIZE 46912 | 32 | #define GUNZIP_SCRATCH_SIZE 46912 |
17 | 33 | ||
@@ -27,4 +43,3 @@ void gunzip_discard(struct gunzip_state *state, int len); | |||
27 | int gunzip_finish(struct gunzip_state *state, void *dst, int len); | 43 | int gunzip_finish(struct gunzip_state *state, void *dst, int len); |
28 | 44 | ||
29 | #endif /* _PPC_BOOT_GUNZIP_UTIL_H_ */ | 45 | #endif /* _PPC_BOOT_GUNZIP_UTIL_H_ */ |
30 | |||