aboutsummaryrefslogtreecommitdiff
path: root/archival/rpm.c
diff options
context:
space:
mode:
authorGlenn L McGrath <bug1@ihug.co.nz>2003-11-15 23:19:05 +0000
committerGlenn L McGrath <bug1@ihug.co.nz>2003-11-15 23:19:05 +0000
commit5699b8525e855a0e851725980964e8755e365f5b (patch)
treefe3d7ead1f80f5b56e44e52a651f368adf92c91d /archival/rpm.c
parent54ac057c0016ac23b7367342f4834e33cf7d47d7 (diff)
downloadbusybox-w32-5699b8525e855a0e851725980964e8755e365f5b.tar.gz
busybox-w32-5699b8525e855a0e851725980964e8755e365f5b.tar.bz2
busybox-w32-5699b8525e855a0e851725980964e8755e365f5b.zip
Move from read_gz to the pipe()+fork() method.
open_transformer(), common code for pipe+fork. Function pointer for read() no longer needed. Allow inflate to be initialised with a specified buffer size to avoid over-reading. Reset static variables in inflate_get_next_window to fix a bug where only the first file in a .zip would be be extracted.
Diffstat (limited to 'archival/rpm.c')
-rw-r--r--archival/rpm.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/archival/rpm.c b/archival/rpm.c
index 5bde53285..e3f20ca35 100644
--- a/archival/rpm.c
+++ b/archival/rpm.c
@@ -197,7 +197,6 @@ void extract_cpio_gz(int fd) {
197 197
198 /* Initialise */ 198 /* Initialise */
199 archive_handle = init_handle(); 199 archive_handle = init_handle();
200 archive_handle->read = read_gz;
201 archive_handle->seek = seek_by_char; 200 archive_handle->seek = seek_by_char;
202 //archive_handle->action_header = header_list; 201 //archive_handle->action_header = header_list;
203 archive_handle->action_data = data_extract_all; 202 archive_handle->action_data = data_extract_all;
@@ -213,11 +212,9 @@ void extract_cpio_gz(int fd) {
213 check_header_gzip(archive_handle->src_fd); 212 check_header_gzip(archive_handle->src_fd);
214 chdir("/"); // Install RPM's to root 213 chdir("/"); // Install RPM's to root
215 214
216 GZ_gzReadOpen(archive_handle->src_fd, 0, 0); 215 archive_handle->src_fd = open_transformer(archive_handle->src_fd, inflate_gunzip);
216 archive_handle->offset = 0;
217 while (get_header_cpio(archive_handle) == EXIT_SUCCESS); 217 while (get_header_cpio(archive_handle) == EXIT_SUCCESS);
218 GZ_gzReadClose();
219
220 check_trailer_gzip(archive_handle->src_fd);
221} 218}
222 219
223 220