[BusyBox-cvs] busybox/archival gunzip.c, 1.76, 1.77 rpm.c, 1.3, 1.4 rpm2cpio.c, 1.9, 1.10 unzip.c, 1.5, 1.6
Glenn McGrath
bug1 at busybox.net
Sat Nov 15 23:19:04 UTC 2003
- Previous message: [BusyBox-cvs] busybox/archival/libunarchive get_header_tar.c, 1.25, 1.26
- Next message: [BusyBox-cvs] busybox/archival/libunarchive open_transformer.c, NONE, 1.1 Makefile.in, 1.17, 1.18 archive_xread.c, 1.3, 1.4 data_align.c, 1.2, 1.3 decompress_bunzip2.c, 1.10, 1.11 filter_accept_list_reassign.c, 1.3, 1.4 get_header_tar_bz2.c, 1.5, 1.6 get_header_tar_gz.c, 1.7, 1.8 init_handle.c, 1.3, 1.4 unzip.c, 1.31, 1.32
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Update of /var/cvs/busybox/archival
In directory winder:/tmp/cvs-serv4579/archival
Modified Files:
gunzip.c rpm.c rpm2cpio.c unzip.c
Log Message:
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.
Index: unzip.c
===================================================================
RCS file: /var/cvs/busybox/archival/unzip.c,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -d -r1.5 -r1.6
--- unzip.c 19 Mar 2003 09:11:22 -0000 1.5
+++ unzip.c 15 Nov 2003 23:18:59 -0000 1.6
@@ -199,7 +199,8 @@
archive_handle->action_data(archive_handle);
} else {
dst_fd = bb_xopen(archive_handle->file_header->name, O_WRONLY | O_CREAT);
- inflate(archive_handle->src_fd, dst_fd);
+ inflate_init(zip_header.formated.cmpsize);
+ inflate_unzip(archive_handle->src_fd, dst_fd);
close(dst_fd);
chmod(archive_handle->file_header->name, archive_handle->file_header->mode);
@@ -227,10 +228,8 @@
/* Data descriptor section */
if (zip_header.formated.flags & 4) {
/* skip over duplicate crc, compressed size and uncompressed size */
- unsigned short i;
- for (i = 0; i != 12; i++) {
- archive_xread_char(archive_handle);
- }
+ unsigned char data_description[12];
+ archive_xread_all(archive_handle, data_description, 12);
archive_handle->offset += 12;
}
}
Index: rpm2cpio.c
===================================================================
RCS file: /var/cvs/busybox/archival/rpm2cpio.c,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -d -r1.9 -r1.10
--- rpm2cpio.c 19 Mar 2003 09:11:22 -0000 1.9
+++ rpm2cpio.c 15 Nov 2003 23:18:59 -0000 1.10
@@ -96,10 +96,9 @@
}
check_header_gzip(rpm_fd);
- if (inflate(rpm_fd, fileno(stdout)) != 0) {
+ if (inflate_gunzip(rpm_fd, fileno(stdout)) != 0) {
bb_error_msg("Error inflating");
}
- check_trailer_gzip(rpm_fd);
close(rpm_fd);
Index: gunzip.c
===================================================================
RCS file: /var/cvs/busybox/archival/gunzip.c,v
retrieving revision 1.76
retrieving revision 1.77
diff -u -d -r1.76 -r1.77
--- gunzip.c 14 Jul 2003 21:20:39 -0000 1.76
+++ gunzip.c 15 Nov 2003 23:18:59 -0000 1.77
@@ -179,11 +179,10 @@
#endif
if (magic2 == 0x8b) {
check_header_gzip(src_fd);
- status = inflate(src_fd, dst_fd);
+ status = inflate_gunzip(src_fd, dst_fd);
if (status != 0) {
bb_error_msg_and_die("Error inflating");
}
- check_trailer_gzip(src_fd);
} else {
bb_error_msg_and_die("Invalid magic");
}
Index: rpm.c
===================================================================
RCS file: /var/cvs/busybox/archival/rpm.c,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- rpm.c 19 Mar 2003 09:11:22 -0000 1.3
+++ rpm.c 15 Nov 2003 23:18:59 -0000 1.4
@@ -197,7 +197,6 @@
/* 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 @@
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);
}
- Previous message: [BusyBox-cvs] busybox/archival/libunarchive get_header_tar.c, 1.25, 1.26
- Next message: [BusyBox-cvs] busybox/archival/libunarchive open_transformer.c, NONE, 1.1 Makefile.in, 1.17, 1.18 archive_xread.c, 1.3, 1.4 data_align.c, 1.2, 1.3 decompress_bunzip2.c, 1.10, 1.11 filter_accept_list_reassign.c, 1.3, 1.4 get_header_tar_bz2.c, 1.5, 1.6 get_header_tar_gz.c, 1.7, 1.8 init_handle.c, 1.3, 1.4 unzip.c, 1.31, 1.32
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the busybox-cvs
mailing list