diff options
author | Glenn L McGrath | 2003-11-15 23:19:05 +0000 |
---|---|---|
committer | Glenn L McGrath | 2003-11-15 23:19:05 +0000 |
commit | 5699b8525e855a0e851725980964e8755e365f5b (patch) | |
tree | fe3d7ead1f80f5b56e44e52a651f368adf92c91d /archival/rpm.c | |
parent | 54ac057c0016ac23b7367342f4834e33cf7d47d7 (diff) | |
download | busybox-5699b8525e855a0e851725980964e8755e365f5b.zip busybox-5699b8525e855a0e851725980964e8755e365f5b.tar.gz |
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.c | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/archival/rpm.c b/archival/rpm.c index 5bde532..e3f20ca 100644 --- a/archival/rpm.c +++ b/archival/rpm.c @@ -197,7 +197,6 @@ void extract_cpio_gz(int fd) { /* Initialise */ archive_handle = init_handle(); - archive_handle->read = read_gz; archive_handle->seek = seek_by_char; //archive_handle->action_header = header_list; archive_handle->action_data = data_extract_all; @@ -213,11 +212,9 @@ void extract_cpio_gz(int fd) { check_header_gzip(archive_handle->src_fd); chdir("/"); // Install RPM's to root - GZ_gzReadOpen(archive_handle->src_fd, 0, 0); + archive_handle->src_fd = open_transformer(archive_handle->src_fd, inflate_gunzip); + archive_handle->offset = 0; while (get_header_cpio(archive_handle) == EXIT_SUCCESS); - GZ_gzReadClose(); - - check_trailer_gzip(archive_handle->src_fd); } |