Commit Graph

1085 Commits

Author SHA1 Message Date
Denys Vlasenko
8376bfae58 decompress_unxz: allocate permanent crc32 table _fisrt_
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-06-01 23:26:54 +02:00
Denys Vlasenko
b9542cb2ce deinline two big functions
function                                             old     new   delta
xz_dec_lzma2_run                                       -    1483   +1483
decode_one_format                                      -     715    +715
decode_format_string                                 840      98    -742
unpack_xz_stream                                    4014    2377   -1637
------------------------------------------------------------------------------
(add/remove: 2/0 grow/shrink: 0/2 up/down: 2198/-2379)       Total: -181 bytes

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-06-01 23:16:46 +02:00
Denys Vlasenko
716f3f612e decompress_unxz: newer version, one which can unpack SHA-256 protected files
function                                             old     new   delta
check_sizes                                            -      16     +16
crc32_table                                            -       4      +4
index_update                                          47      40      -7
crc32_validate                                       110      93     -17
dec_vli                                              197     165     -32
unpack_xz_stream                                    4284    4014    -270
------------------------------------------------------------------------------
(add/remove: 2/0 grow/shrink: 0/4 up/down: 20/-326)          Total: -306 bytes

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-06-01 14:41:39 +02:00
Denys Vlasenko
39a04f71ca archival/*: shrink by reusing sufficiently similar functions
function                                             old     new   delta
append_ext                                             -      16     +16
unxz_main                                             77      83      +6
unlzma_main                                           77      83      +6
uncompress_main                                       42      48      +6
gzip_main                                            184     190      +6
bzip2_main                                           114     120      +6
bunzip2_main                                          61      67      +6
bbunpack                                             469     475      +6
send_tree                                            355     360      +5
lzop_main                                             89      92      +3
gunzip_main                                           61      64      +3
make_new_name_lzop                                    84      82      -2
make_new_name_gunzip                                 114     112      -2
make_new_name_unxz                                    14       -     -14
make_new_name_unlzma                                  14       -     -14
make_new_name_uncompress                              14       -     -14
make_new_name_bunzip2                                 14       -     -14
make_new_name_gzip                                    17       -     -17
make_new_name_bzip2                                   17       -     -17
------------------------------------------------------------------------------
(add/remove: 1/6 grow/shrink: 10/2 up/down: 69/-94)           Total: -25 bytes

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-05-31 14:18:57 +02:00
Denys Vlasenko
c88c1a0190 rpm2cpio: teach it to understand xz format
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-05-30 05:10:16 +02:00
Denys Vlasenko
acaaca839a unxz: remove debugging. no code changes
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-05-30 04:50:21 +02:00
Denys Vlasenko
6948f210ed *: teach tar et. al. to understand .xz by heart
function                                             old     new   delta
unpack_xz_stream                                       -    4126   +4126
setup_unzip_on_fd                                     80     150     +70
open_zipped                                          113     131     +18
unpack_unxz                                            5      12      +7
send_tree                                            360     353      -7
unpack_xz_stream_stdin                              3953       -   -3953
------------------------------------------------------------------------------
(add/remove: 1/1 grow/shrink: 3/1 up/down: 4221/-3960)        Total: 261 bytes

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-05-30 04:18:13 +02:00
Denys Vlasenko
fb6c76cb6e forgotten "git add"...
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-05-30 03:47:40 +02:00
Denys Vlasenko
d93f19e443 reorder parts of bbunzip.c, no code changes
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-05-30 03:46:54 +02:00
Denys Vlasenko
602ce69afb unxz: new applet, complete with xzcat and xz -d aliases
function                                             old     new   delta
unpack_xz_stream_stdin                                 -    3953   +3953
lzma_main                                              -    2601   +2601
lzma_len                                               -     516    +516
dec_vli                                                -     165    +165
dict_repeat                                            -     103    +103
lzma_reset                                             -      98     +98
fill_temp                                              -      98     +98
crc32_validate                                         -      93     +93
xz_dec_reset                                           -      77     +77
unxz_main                                              -      77     +77
index_update                                           -      47     +47
xz_crc32                                               -      40     +40
packed_usage                                       27044   27060     +16
make_new_name_unxz                                     -      14     +14
applet_names                                        2240    2254     +14
applet_main                                         1312    1324     +12
applet_nameofs                                       656     662      +6
unpack_unxz                                            -       5      +5
send_tree                                            355     360      +5
applet_install_loc                                   164     166      +2
------------------------------------------------------------------------------
(add/remove: 15/0 grow/shrink: 6/0 up/down: 7942/0)          Total: 7942 bytes
   text    data     bss     dec     hex filename
 844032     453    6812  851297   cfd61 busybox_old
 852063     453    6812  859328   d1cc0 busybox_unstripped

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-05-30 03:35:18 +02:00
Denys Vlasenko
e04c867a21 rename FEATURE_LZMA_ALIAS to just LZMA
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-05-30 03:33:50 +02:00
Denys Vlasenko
8bcaa6a4e9 lzop: fix indentation
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-05-30 01:57:52 +02:00
Bernhard Reutner-Fischer
7bdfb7cbf0 bbunzip: silence warning about unused variable
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2010-05-27 15:39:01 +02:00
Denys Vlasenko
ccb88a689e unlzma: add "lzma -d" alias, add -t support, rename lzmacat->lzcat
Also coalesce some common strings

   text    data     bss     dec     hex filename
 844110     453    6812  851375   cfdaf busybox_old
 844061     453    6812  851326   cfd7e busybox_unstripped

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-05-27 02:22:54 +02:00
Denys Vlasenko
fc2bb8f04f unzip: another small code shrink
function                                             old     new   delta
find_cdf_offset                                      173     160     -13

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-05-24 13:07:55 +02:00
Denys Vlasenko
e98884b9be unzip: tiny code shrink -2 bytes
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-05-24 04:46:18 +02:00
Denys Vlasenko
4e8ff73e20 unzip: restore unix file mode if possible. closes bug 1045
function                                             old     new   delta
unzip_main                                          2197    2188      -9
------------------------------------------------------------------------------
(add/remove: 1/1 grow/shrink: 0/1 up/down: 173/-182)           Total: -9 bytes

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-05-24 04:33:02 +02:00
Denys Vlasenko
ff0e875e02 work on adding testsuite runs to randomconfig test builds
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-05-10 04:16:43 +02:00
Denys Vlasenko
7b48eb4372 tar: support GNU 256-bit encoding in all numeric fields
function                                             old     new   delta
getOctal                                              63     125     +62
get_header_tar                                      1572    1496     -76
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 1/1 up/down: 62/-76)            Total: -14 bytes

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-05-06 20:08:14 +02:00
Denys Vlasenko
5dfd9c4dbc rpm: make rpm -i SRPM.rpm install it to surrent dir; better help text
function                                             old     new   delta
rpm_main                                            1355    1358      +3
packed_usage                                       26732   26728      -4
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 1/1 up/down: 3/-4)               Total: -1 bytes

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-05-06 16:56:38 +02:00
Denys Vlasenko
27653adc8b rpm: code shrink. Now uses open_zipped's logic (factored out into setup_unzip_on_fd())
function                                             old     new   delta
setup_unzip_on_fd                                      -      80     +80
open_zipped                                          176     113     -63
rpm_main                                            1672    1355    -317
------------------------------------------------------------------------------
(add/remove: 1/0 grow/shrink: 0/2 up/down: 80/-380)          Total: -300 bytes

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-05-06 14:19:19 +00:00
Matheus Izvekov
4640ccc399 cpio: "NNN blocks" should go to stderr
Signed-off-by: Matheus Izvekov <mizvekov@gmail.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-04-26 13:53:57 +02:00
Nguyễn Thái Ngọc Duy
36dcf4e516 ar: fix a regression: "ar t arch.a" stopped shoting files
Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-04-15 16:55:04 -07:00
Denys Vlasenko
e69ad87802 tar: fix "hardlinks to symlinks chown" bug 1519.
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-04-09 14:11:45 +02:00
Denys Vlasenko
02365a6ef7 tar: fix mishandling of repeated hardlink in tarball; expand tests
function                                             old     new   delta
data_extract_all                                     727     767     +40
get_header_tar                                      1576    1572      -4

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-04-09 10:52:52 +02:00
Denys Vlasenko
84f6def072 dpkg: remove redundant check
function                                             old     new   delta
dpkg_main                                           4008    3991     -17

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-03-30 16:20:34 +02:00
Denys Vlasenko
eab75f6049 dpkg: better check for validity of options
function                                             old     new   delta
dpkg_main                                           3980    4008     +28

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-03-30 15:03:26 +02:00
Kim B. Heino
3d43aed10c dpkg: support config file overwrite options
function                                             old     new   delta
filter_rename_config                                   -     244    +244
static.dpkg_longopts                                   -     112    +112
dpkg_main                                           3901    3980     +79
unpack_package                                       515     587     +72
append_control_file_to_llist                           -      72     +72
data_extract_all_prefix                               88     116     +28
------------------------------------------------------------------------------
(add/remove: 3/0 grow/shrink: 3/0 up/down: 607/0)             Total: 607 bytes

Signed-off-by: Kim B. Heino <Kim.Heino@bluegiga.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-03-29 14:18:27 +02:00
J. Tang
77a2c51e79 tar: optional support for restoring selinux context
function                                             old     new   delta
get_header_tar                                      1690    1976    +286
data_extract_all                                     821     881     +60
.rodata                                           151446  151503     +57
get_header_cpio                                     1044    1077     +33
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 4/0 up/down: 436/0)             Total: 436 bytes

Signed-off-by: J. Tang <tang@jtang.org>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-03-19 14:48:51 +01:00
Kim B. Heino
820874ed38 tar compability modes for dpkg
I've found couple of deb files which require old tar compability modes
to be unpacked. This patch allows me to enable them for dpkg without
enabling tar.

Signed-off-by: Kim B. Heino <Kim.Heino@bluegiga.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-03-15 23:55:26 +01:00
Alexander Shishkin
535584c750 ar: add archive creation support
function                                             old     new   delta
ar_main                                              184     542    +358
output_ar_header                                       -     166    +166
copy_data                                              -      54     +54
filter_replaceable                                     -      19     +19
get_header_ar                                        409     414      +5
header_verbose_list_ar                                85      88      +3
static.msg_unsupported_err                            28       -     -28
------------------------------------------------------------------------------
(add/remove: 3/1 grow/shrink: 3/0 up/down: 605/-28)           Total: 577 bytes

Signed-off-by: Alexander Shishkin <virtuoso@slind.org>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-03-15 15:38:09 +01:00
Joakim Tjernlund
0866b36900 gunzip: inflate_codes(): add fix from upstream gzip to prevent false CRC error
Signed-off-by: Joakim Tjernlund <Joakim.Tjernlund@transmode.se>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-02-11 23:56:48 +01:00
Denys Vlasenko
98a4c7cf3d *: suppress ~60% of "aliased warnings" on gcc-4.4.1
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-02-04 15:00:15 +01:00
Denys Vlasenko
083e172641 style fixes, no code changes
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-01-28 12:30:24 +01:00
Denys Vlasenko
6b9f163353 *: style fixes. no code changes (verified with objdump)
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-01-28 02:24:24 +01:00
Denys Vlasenko
6b01b71e83 randomconfig fixes
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-01-24 22:52:21 +01:00
Denys Vlasenko
94ca6943bc *: small code shrinks and compile fix for unicode
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-01-20 02:51:09 +01:00
Mikhail Gusarov
0d478334b3 tar: handle -m (--touch) switch, enabled by FEATURE_TAR_NOPRESERVE_TIME
function                                             old     new   delta
.rodata                                             2731    2779     +48
usage_messages                                       432     471     +39
tar_main                                             603     614     +11
tar_longopts                                         211     219      +8
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 4/0 up/down: 106/0)             Total: 106 bytes

Signed-off-by: Mikhail Gusarov <dottedmag@dottedmag.net>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-01-20 02:47:37 +01:00
Denys Vlasenko
02dd96f688 cpio: fix -o-less cpio -F FILE
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-01-09 20:25:42 +01:00
Denys Vlasenko
607f65d171 cpio: improve help text more; fix -p and -F interaction
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-01-09 20:23:03 +01:00
Denys Vlasenko
93ac7d8468 cpio: improve help text; document two TODOs
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-01-09 19:56:15 +01:00
Denys Vlasenko
dc698bb038 *: make it easier to distinquish "struct tm", pointer to one, etc
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-01-09 19:10:49 +01:00
Denys Vlasenko
6fd42b3d00 dpkg: fix handling of names with leading dots. Closes bug 783
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-01-08 18:07:33 +01:00
Denys Vlasenko
aa4977d8e5 libunarchive: clean up dirty hacks. code shrank as a result
function                                             old     new   delta
cpio_main                                            526     539     +13
init_handle                                           57      58      +1
init_archive_deb_ar                                   34      35      +1
get_header_ar                                        408     409      +1
dpkg_main                                           3900    3901      +1
unpack_package                                       516     515      -1
rpm_main                                            1673    1672      -1
tar_main                                             774     767      -7
get_header_cpio                                      990     972     -18
data_extract_all                                     750     727     -23
get_header_tar                                      1631    1576     -55
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 5/6 up/down: 17/-105)           Total: -88 bytes

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-01-06 10:53:17 +01:00
Denys Vlasenko
bde70230e8 libunarchive: trivial code shrink
function                                             old     new   delta
header_verbose_list                                  257     237     -20

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-01-06 09:43:11 +01:00
Matheus Izvekov
839fd71077 gzip: add optional support for --long-opts
Signed-off-by: Matheus Izvekov <mizvekov@gmail.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-01-06 08:54:49 +01:00
Denys Vlasenko
af1c8e8be0 cpio: fix unpacking of names with leading slashes
function                                             old     new   delta
get_header_cpio                                      968     990     +22
cpio_main                                            533     526      -7

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-01-05 04:43:21 +01:00
Denys Vlasenko
4928f3b90b ar: heh, there *was* "-1" already...
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-01-04 14:32:31 +01:00
Denys Vlasenko
40e5a30b66 ar: fix two bugs, one added by prev comment and other we SEGV with no params
cpio: use optind less

function                                             old     new   delta
ar_main                                              189     184      -5
cpio_main                                            549     533     -16
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 0/2 up/down: 0/-21)             Total: -21 bytes

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-01-04 14:30:37 +01:00
Denys Vlasenko
2ec91aead5 *: remove some uses of argc
function                                             old     new   delta
whoami_main                                           34      37      +3
logname_main                                          60      63      +3
hostid_main                                           35      38      +3
ttysize_main                                         136     135      -1
nmeter_main                                          673     672      -1
logger_main                                          387     386      -1
uuencode_main                                        330     328      -2
ifupdown_main                                       2125    2123      -2
mesg_main                                            158     155      -3
free_main                                            333     330      -3
cal_main                                             902     899      -3
acpid_main                                           443     440      -3
ar_main                                              196     189      -7
find_main                                            476     467      -9
ifconfig_main                                       1235    1221     -14
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 3/12 up/down: 9/-49)            Total: -40 bytes

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-01-04 14:15:38 +01:00