From c1270088401f1e3f4f8a6bfa2ff5b7228c4a8da0 Mon Sep 17 00:00:00 2001 From: Glenn L McGrath Date: Wed, 11 Jul 2001 17:32:14 +0000 Subject: Allow unarchive to redirect stdout (tobe used by dpkg applet) --- libbb/unarchive.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'libbb/unarchive.c') diff --git a/libbb/unarchive.c b/libbb/unarchive.c index 067e78b84..d95f2cfc7 100644 --- a/libbb/unarchive.c +++ b/libbb/unarchive.c @@ -211,7 +211,7 @@ char *extract_archive(FILE *src_stream, FILE *out_stream, const file_header_t *f #endif #ifdef L_unarchive -char *unarchive(FILE *src_stream, file_header_t *(*get_headers)(FILE *), +char *unarchive(FILE *src_stream, FILE *out_stream, file_header_t *(*get_headers)(FILE *), const int extract_function, const char *prefix, char **extract_names) { file_header_t *file_entry; @@ -237,7 +237,7 @@ char *unarchive(FILE *src_stream, file_header_t *(*get_headers)(FILE *), continue; } } - buffer = extract_archive(src_stream, stdout, file_entry, extract_function, prefix); + buffer = extract_archive(src_stream, out_stream, file_entry, extract_function, prefix); } return(buffer); } @@ -568,7 +568,7 @@ char *deb_extract(const char *package_filename, FILE *out_stream, /* open a stream of decompressed data */ uncompressed_stream = gz_open(deb_stream, &gunzip_pid); archive_offset = 0; - output_buffer = unarchive(uncompressed_stream, get_header_tar, extract_function, prefix, file_list); + output_buffer = unarchive(uncompressed_stream, out_stream, get_header_tar, extract_function, prefix, file_list); } seek_sub_file(deb_stream, ar_header->size); } -- cgit v1.2.3