From a60936da062fc569328cd643c460dcf215ed9966 Mon Sep 17 00:00:00 2001 From: Denis Vlasenko Date: Sat, 28 Jun 2008 05:04:09 +0000 Subject: libunarchive: stop using static data in archivers - archive_handle_t can trivially provide space for that. rpm: code shrink tar: simplify autodetection of bz2/.gz function old new delta static.not_first 1 - -1 static.end 1 - -1 bb_makedev 51 49 -2 static.saved_hardlinks_created 4 - -4 static.saved_hardlinks 4 - -4 longname 4 - -4 linkname 4 - -4 hash_file 251 247 -4 get_header_tar 1528 1521 -7 rpm_main 1711 1697 -14 get_header_cpio 965 944 -21 ------------------------------------------------------------------------------ (add/remove: 0/6 grow/shrink: 0/5 up/down: 0/-66) Total: -66 bytes text data bss dec hex filename 804926 611 6868 812405 c6575 busybox_old 804878 611 6852 812341 c6535 busybox_unstripped --- archival/rpm.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'archival/rpm.c') diff --git a/archival/rpm.c b/archival/rpm.c index 3d03dbcce..c4bcd605d 100644 --- a/archival/rpm.c +++ b/archival/rpm.c @@ -202,10 +202,9 @@ static void extract_cpio_gz(int fd) archive_handle->seek = seek_by_read; //archive_handle->action_header = header_list; archive_handle->action_data = data_extract_all; - archive_handle->flags |= ARCHIVE_PRESERVE_DATE; - archive_handle->flags |= ARCHIVE_CREATE_LEADING_DIRS; + archive_handle->ah_flags = ARCHIVE_PRESERVE_DATE | ARCHIVE_CREATE_LEADING_DIRS; archive_handle->src_fd = fd; - archive_handle->offset = 0; + /*archive_handle->offset = 0; - init_handle() did it */ xread(archive_handle->src_fd, &magic, 2); #if BB_MMU -- cgit v1.2.3