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
This commit is contained in:
@@ -814,9 +814,9 @@ int tar_main(int argc ATTRIBUTE_UNUSED, char **argv)
|
||||
|
||||
/* Initialise default values */
|
||||
tar_handle = init_handle();
|
||||
tar_handle->flags = ARCHIVE_CREATE_LEADING_DIRS
|
||||
| ARCHIVE_PRESERVE_DATE
|
||||
| ARCHIVE_EXTRACT_UNCONDITIONAL;
|
||||
tar_handle->ah_flags = ARCHIVE_CREATE_LEADING_DIRS
|
||||
| ARCHIVE_PRESERVE_DATE
|
||||
| ARCHIVE_EXTRACT_UNCONDITIONAL;
|
||||
|
||||
/* Prepend '-' to the first argument if required */
|
||||
opt_complementary = "--:" // first arg is options
|
||||
@@ -862,13 +862,13 @@ int tar_main(int argc ATTRIBUTE_UNUSED, char **argv)
|
||||
tar_handle->action_data = data_extract_to_stdout;
|
||||
|
||||
if (opt & OPT_KEEP_OLD)
|
||||
tar_handle->flags &= ~ARCHIVE_EXTRACT_UNCONDITIONAL;
|
||||
tar_handle->ah_flags &= ~ARCHIVE_EXTRACT_UNCONDITIONAL;
|
||||
|
||||
if (opt & OPT_NOPRESERVE_OWN)
|
||||
tar_handle->flags |= ARCHIVE_NOPRESERVE_OWN;
|
||||
tar_handle->ah_flags |= ARCHIVE_NOPRESERVE_OWN;
|
||||
|
||||
if (opt & OPT_NOPRESERVE_PERM)
|
||||
tar_handle->flags |= ARCHIVE_NOPRESERVE_PERM;
|
||||
tar_handle->ah_flags |= ARCHIVE_NOPRESERVE_PERM;
|
||||
|
||||
if (opt & OPT_GZIP)
|
||||
get_header_ptr = get_header_tar_gz;
|
||||
|
||||
Reference in New Issue
Block a user