diff options
author | Sascha Hauer <s.hauer@pengutronix.de> | 2011-11-30 15:12:47 +0100 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2011-12-15 10:20:09 +0100 |
commit | 90d036d62cc8e2fb274d02c8d6b331d61bd5ba55 (patch) | |
tree | 5e7396cdbea68303b8d44c46d2d095f9bc6c9610 /lib | |
parent | 9c11a31ce2d30ff2c8bb004cd3da794b5be56625 (diff) | |
download | barebox-90d036d62cc8e2fb274d02c8d6b331d61bd5ba55.tar.gz barebox-90d036d62cc8e2fb274d02c8d6b331d61bd5ba55.tar.xz |
uncompress: implement uncompress_fd_to_buf
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'lib')
-rw-r--r-- | lib/uncompress.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/lib/uncompress.c b/lib/uncompress.c index beb96d167a..cdfebe9173 100644 --- a/lib/uncompress.c +++ b/lib/uncompress.c @@ -158,3 +158,11 @@ int uncompress_fd_to_fd(int infd, int outfd, NULL, error_fn); } + +int uncompress_fd_to_buf(int infd, void *output, + void(*error_fn)(char *x)) +{ + uncompress_infd = infd; + + return uncompress(NULL, 0, fill_fd, NULL, output, NULL, error_fn); +} |