diff options
author | Marian Balakowicz <m8@semihalf.com> | 2008-01-08 18:11:43 +0100 |
---|---|---|
committer | Wolfgang Denk <wd@denx.de> | 2008-02-07 01:12:55 +0100 |
commit | 321359f20823e0b8c5ad38b64d007a6c48cda16e (patch) | |
tree | 0b319db82d613da865cbd907d01a585f0e3fa88e /fs/cramfs | |
parent | d45d5a18b6b36688f2365623f9d550566c664b5b (diff) |
[new uImage] Move gunzip() common code to common/gunzip.c
Move gunzip(), zalloc() and zfree() to a separate file.
Share zalloc() and zfree() with cramfs uncompress routine.
Signed-off-by: Marian Balakowicz <m8@semihalf.com>
Diffstat (limited to 'fs/cramfs')
-rw-r--r-- | fs/cramfs/uncompress.c | 20 |
1 files changed, 2 insertions, 18 deletions
diff --git a/fs/cramfs/uncompress.c b/fs/cramfs/uncompress.c index 2e906eb4cfa..e4189e51dd1 100644 --- a/fs/cramfs/uncompress.c +++ b/fs/cramfs/uncompress.c @@ -29,24 +29,8 @@ static z_stream stream; -#define ZALLOC_ALIGNMENT 16 - -static void *zalloc (void *x, unsigned items, unsigned size) -{ - void *p; - - size *= items; - size = (size + ZALLOC_ALIGNMENT - 1) & ~(ZALLOC_ALIGNMENT - 1); - - p = malloc (size); - - return (p); -} - -static void zfree (void *x, void *addr, unsigned nb) -{ - free (addr); -} +void *zalloc(void *, unsigned, unsigned); +void zfree(void *, void *, unsigned); /* Returns length of decompressed data. */ int cramfs_uncompress_block (void *dst, void *src, int srclen) |