diff options
author | bug1 <bug1@69ca8d6d-28ef-0310-b511-8ec308f3f277> | 2001-07-11 17:32:14 +0000 |
---|---|---|
committer | bug1 <bug1@69ca8d6d-28ef-0310-b511-8ec308f3f277> | 2001-07-11 17:32:14 +0000 |
commit | 34f6c9190165c1263ed6aee5381a1123c35cf2c0 (patch) | |
tree | 06b6690e1666bbdccc2b7bb809f3c1bbd8ce2ac3 /libbb | |
parent | 0e084e45ee8af16e254f3176ae28a2552c7bcaca (diff) | |
download | busybox-w32-34f6c9190165c1263ed6aee5381a1123c35cf2c0.tar.gz busybox-w32-34f6c9190165c1263ed6aee5381a1123c35cf2c0.tar.bz2 busybox-w32-34f6c9190165c1263ed6aee5381a1123c35cf2c0.zip |
Allow unarchive to redirect stdout (tobe used by dpkg applet)
git-svn-id: svn://busybox.net/trunk/busybox@3070 69ca8d6d-28ef-0310-b511-8ec308f3f277
Diffstat (limited to 'libbb')
-rw-r--r-- | libbb/libbb.h | 2 | ||||
-rw-r--r-- | libbb/unarchive.c | 6 |
2 files changed, 4 insertions, 4 deletions
diff --git a/libbb/libbb.h b/libbb/libbb.h index 0fc704501..4a4b9191c 100644 --- a/libbb/libbb.h +++ b/libbb/libbb.h | |||
@@ -239,7 +239,7 @@ enum extract_functions_e { | |||
239 | extract_unconditional = 512, | 239 | extract_unconditional = 512, |
240 | extract_create_leading_dirs = 1024 | 240 | extract_create_leading_dirs = 1024 |
241 | }; | 241 | }; |
242 | char *unarchive(FILE *src_stream, file_header_t *(*get_header)(FILE *), | 242 | char *unarchive(FILE *src_stream, FILE *out_stream, file_header_t *(*get_header)(FILE *), |
243 | const int extract_function, const char *prefix, char **extract_names); | 243 | const int extract_function, const char *prefix, char **extract_names); |
244 | char *deb_extract(const char *package_filename, FILE *out_stream, const int extract_function, | 244 | char *deb_extract(const char *package_filename, FILE *out_stream, const int extract_function, |
245 | const char *prefix, const char *filename); | 245 | const char *prefix, const char *filename); |
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 | |||
211 | #endif | 211 | #endif |
212 | 212 | ||
213 | #ifdef L_unarchive | 213 | #ifdef L_unarchive |
214 | char *unarchive(FILE *src_stream, file_header_t *(*get_headers)(FILE *), | 214 | char *unarchive(FILE *src_stream, FILE *out_stream, file_header_t *(*get_headers)(FILE *), |
215 | const int extract_function, const char *prefix, char **extract_names) | 215 | const int extract_function, const char *prefix, char **extract_names) |
216 | { | 216 | { |
217 | file_header_t *file_entry; | 217 | file_header_t *file_entry; |
@@ -237,7 +237,7 @@ char *unarchive(FILE *src_stream, file_header_t *(*get_headers)(FILE *), | |||
237 | continue; | 237 | continue; |
238 | } | 238 | } |
239 | } | 239 | } |
240 | buffer = extract_archive(src_stream, stdout, file_entry, extract_function, prefix); | 240 | buffer = extract_archive(src_stream, out_stream, file_entry, extract_function, prefix); |
241 | } | 241 | } |
242 | return(buffer); | 242 | return(buffer); |
243 | } | 243 | } |
@@ -568,7 +568,7 @@ char *deb_extract(const char *package_filename, FILE *out_stream, | |||
568 | /* open a stream of decompressed data */ | 568 | /* open a stream of decompressed data */ |
569 | uncompressed_stream = gz_open(deb_stream, &gunzip_pid); | 569 | uncompressed_stream = gz_open(deb_stream, &gunzip_pid); |
570 | archive_offset = 0; | 570 | archive_offset = 0; |
571 | output_buffer = unarchive(uncompressed_stream, get_header_tar, extract_function, prefix, file_list); | 571 | output_buffer = unarchive(uncompressed_stream, out_stream, get_header_tar, extract_function, prefix, file_list); |
572 | } | 572 | } |
573 | seek_sub_file(deb_stream, ar_header->size); | 573 | seek_sub_file(deb_stream, ar_header->size); |
574 | } | 574 | } |