[PATCH 03/12] uncompress: implement uncompress_fd_to_buf
Sascha Hauer
s.hauer at pengutronix.de
Thu Dec 15 05:30:25 EST 2011
Signed-off-by: Sascha Hauer <s.hauer at pengutronix.de>
---
lib/uncompress.c | 8 ++++++++
1 files changed, 8 insertions(+), 0 deletions(-)
diff --git a/lib/uncompress.c b/lib/uncompress.c
index beb96d1..cdfebe9 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);
+}
--
1.7.7.3
More information about the barebox
mailing list