Commit Graph

1124 Commits

Author SHA1 Message Date
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
Denys Vlasenko
d6459685c1 tar: fix problem handling tarballs with chksums prepended by spaces
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-01-03 23:41:11 +01:00
Denys Vlasenko
c066472b0c *: do not assign to stdout/stderr, it's not portable.
Based on patch by Aaron Carroll <xaaronc@gmail.com>

function                                             old     new   delta
time_main                                           1062    1052     -10
cpio_main                                            563     549     -14

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-01-02 18:49:22 +01:00
Denys Vlasenko
4b6abf6655 tar: fix recently added SEGV on "tar" w/o args
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-12-18 12:36:07 +01:00
Denys Vlasenko
8a936cfab7 tar: add support for --overwrite. +70 bytes.
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-12-16 23:18:59 +01:00
Denys Vlasenko
425ad9c93b libunarchive: move dpkg-specific things into dpkg.c. 0 byte size differences
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-12-16 22:46:01 +01:00
Denys Vlasenko
a3aa3e3095 wget: check for close success; fix chunked; do not bother to send QUIT to ftp
Also, random fixes to use %u for unsigned quantities. -14 bytes in wget.

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-12-11 12:36:10 +01:00
Denys Vlasenko
dcbfaba264 fix improper utimes usage
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-11-29 19:40:36 +01:00
Denys Vlasenko
d43d628f8b tar: revert part of last change. -39 bytes
It looks like GNU "tar cf file file" _does_ save file as if
it is a hardlink, when it meets it for the second time.

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-11-29 16:28:33 +01:00
Denys Vlasenko
f94c9bf288 tar: fix bug 673 (misdetection of repeated dir as hardlink). +92 bytes
While at it, remove many superfluous ops on unpack:
mkdir("."), lots of umask() calls. Can remove more
by caching username->uid.

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-11-29 07:45:33 +01:00
Denys Vlasenko
6ccaa23f2b libunarchive: fix reversed test for older/newer
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-11-24 01:16:12 +01:00
Denys Vlasenko
389cca4b9e some non-gnu compilers can't have non-const struct initializers
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-11-15 02:28:56 +01:00
Bernhard Reutner-Fischer
a307af1af6 use utimes() rather than obsolescent utime()
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2009-11-15 00:12:53 +01:00
Bernhard Reutner-Fischer
cc8b6871a7 use utimes() rather than obsolescent utime()
utime is obsolescent in POSIX.1-2008, use utimes() for now.
Untested.

Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2009-11-14 23:35:00 +01:00
Denys Vlasenko
6331cf059c *: use "can't" instead of "cannot"
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-11-13 09:08:27 +01:00
Denys Vlasenko
8131eea3dc *: introduce and use ffulsh_all()
function                                             old     new   delta
buffer_fill_and_print                                179     196     +17
fflush_all                                             -       9      +9
spawn                                                 87      92      +5
rtcwake_main                                         455     453      -2
...
alarm_intr                                            93      84      -9
readcmd                                             1072    1062     -10
bb_ask                                               345     333     -12
more_main                                            845     832     -13
flush_stdout_stderr                                   42      23     -19
xfflush_stdout                                        27       -     -27
flush_stderr                                          30       -     -30
------------------------------------------------------------------------------
(add/remove: 1/2 grow/shrink: 2/50 up/down: 31/-397)         Total: -366 bytes

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-11-02 14:19:51 +01:00
Bernhard Reutner-Fischer
30f3c1d5fd tar: add support for -o as synonym to --no-same-owner. +5 bytes
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-10-25 02:13:32 +02:00
Denys Vlasenko
f645037ffb tar: handle "tar fx TARFILE" etc
function                                             old     new   delta
tar_main                                             702     751     +49

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-10-25 01:32:45 +02:00
Denys Vlasenko
f2cbb03a37 *: optimize most of isXXXXX() macros
text    data     bss     dec     hex filename
 824164     453    6812  831429   cafc5 busybox_old
 823730     453    6812  830995   cae13 busybox_unstripped

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-10-23 03:16:08 +02:00
Denys Vlasenko
ef5bc2c39c *: three more NOINLINEs
function                                             old     new   delta
lzo_decompress                                         -     525    +525
lzo_compress                                           -     470    +470
showmode                                               -     330    +330
fbset_main                                          1698    1273    -425
do_lzo_compress                                      799     323    -476
do_lzo_decompress                                   1167     526    -641
------------------------------------------------------------------------------
(add/remove: 3/0 grow/shrink: 0/3 up/down: 1325/-1542)       Total: -217 bytes

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-10-08 14:54:18 +02:00
Denys Vlasenko
adf922ec28 *: a few more NOINLINEs
function                                             old     new   delta
print_linkinfo                                         -     815    +815
do_msg                                                 -     783    +783
INET_setroute                                          -     757    +757
varvalue                                               -     746    +746
do_sem                                                 -     637    +637
inflate_codes                                          -     617    +617
INET6_setroute                                         -     491    +491
edir                                                   -     370    +370
sync_cursor                                            -     298    +298
update_utmp                                            -     246    +246
searchLines                                            -     165    +165
setup_alarm                                            -     144    +144
may_wakeup                                             -     101    +101
getNum                                               566     371    -195
refresh                                             1166     848    -318
rtcwake_main                                         809     479    -330
getty_main                                          2396    1921    -475
chpst_main                                          1373     746    -627
inflate_unzip_internal                              1335     567    -768
evalvar                                             1384     612    -772
ipaddr_list_or_flush                                2160    1246    -914
route_main                                          1585     245   -1340
ipcs_main                                           2523    1049   -1474
------------------------------------------------------------------------------
(add/remove: 13/0 grow/shrink: 0/10 up/down: 6170/-7213)    Total: -1043 bytes

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-10-08 14:35:37 +02:00
Denys Vlasenko
a7bb3c1396 *: code shrink via NOINLINE
function                                             old     new   delta
expand_vars_to_list                                    -    2118   +2118
lzo1x_optimize                                         -    1429   +1429
run_pipe                                             358    1775   +1417
arith_apply                                            -    1335   +1335
mainQSort3                                             -    1198   +1198
logdir_open                                            -    1163   +1163
rewrite                                                -    1039   +1039
dump_identity                                          -     987    +987
do_shm                                                 -     884    +884
cpio_o                                                 -     863    +863
cpio_main                                           1450     560    -890
ipcs_main                                           3442    2523    -919
bb_dump_dump                                        2611    1488   -1123
process_dev                                         4572    3405   -1167
logdirs_reopen                                      1308      86   -1222
arith                                               2084     707   -1377
mainSort                                            2622    1202   -1420
do_lzo_compress                                     2276     799   -1477
run_list                                            2491     943   -1548
expand_variables                                    2280     135   -2145
------------------------------------------------------------------------------
(add/remove: 9/0 grow/shrink: 1/10 up/down: 12433/-13288)    Total: -855 bytes

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-10-08 12:28:08 +02:00
Denys Vlasenko
dcd27abcc4 unpackers: check errors from close() too
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-10-05 03:03:07 +02:00
Denys Vlasenko
606291beab *: more portability fixes by Dan Fandrich
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-09-23 23:15:43 +02:00
Denys Vlasenko
8d338173a4 tar: accept spaces at the end of header fields (compat)
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-09-23 17:16:37 +02:00
Denys Vlasenko
2bf6634ef4 ar: fix long filenames handling (bug 611)
function                                             old     new   delta
get_header_ar                                        493     528     +35
read_num                                               -      25     +25

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-09-20 01:28:27 +02:00
Denys Vlasenko
885583ebe3 tar: do chown, not lchown to restore mode (compat)
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-09-17 03:02:57 +02:00
Denys Vlasenko
d57d62686d tar: fix --numeric-owner, --no-same-owner, --no-same-permissions bits
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-09-17 02:43:14 +02:00
Denys Vlasenko
8dc0e1929e use PACKED macro insted of open-coding GCC-ism
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-09-16 00:58:11 +02:00
Denys Vlasenko
f2c184be83 unlzma: fixed speedup/shrink by Pascal Bellard (pascal.bellard AT ads-lu.com)
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-09-15 23:40:08 +02:00
Denys Vlasenko
40c221334f Merge branch 'master' of git+ssh://vda@busybox.net/var/lib/git/busybox 2009-09-07 12:44:56 +02:00
Denys Vlasenko
386bc9fda3 unzip: more compat if DESKTOP=y
function                                             old     new   delta
DESKTOP off:
unzip_main                                          1648    1629     -19
DESKTOP=y:
unzip_main                                          1939    2197    +258

Without this, midnight commander can't display .zip files

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-09-06 16:52:50 +02:00
Denys Vlasenko
3de3f57c6d Revert "unlzma: speedup, by Pascal Bellard (pascal.bellard AT ads-lu.com)"
https://bugs.busybox.net/show_bug.cgi?id=599

This reverts commit 9ac3dc764a.
2009-09-06 15:06:25 +02:00
Denys Vlasenko
5370bfb123 documentation and typo fixes. By Dan Fandrich (dan AT coneharvesters.com)
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-09-06 02:58:59 +02:00
Denys Vlasenko
90a9904e9e remove some GNUisms. by Dan Fandrich (dan AT coneharvesters.com)
function                                             old     new   delta
logdirs_reopen                                      1310    1308      -2
read_line_input                                     4757    4753      -4
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 0/2 up/down: 0/-6)               Total: -6 bytes

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-09-06 02:36:23 +02:00
Denys Vlasenko
b9762922d1 libunarchive: fix a bug where mode and time is no longer restored
Introduced by me in 1.15.x. Found by Rob Landley.

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-08-30 01:18:34 +02:00
Denys Vlasenko
e6c483ec30 rpm2cpio: code shrink
function                                             old     new   delta
skip_header                                           94      92      -2
rpm2cpio_main                                        177     174      -3
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 0/2 up/down: 0/-5)               Total: -5 bytes

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-08-28 21:15:24 +02:00
Denys Vlasenko
0a130d510d rpm2cpio: handle unseekable input correctly
function                                             old     new   delta
data_skip                                             14      20      +6
seek_by_jump                                          67      72      +5
data_align                                            81      84      +3
seek_by_read                                          20      19      -1
skip_header                                           99      94      -5
rpm2cpio_main                                        183     177      -6
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 3/3 up/down: 14/-12)              Total: 2 bytes

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-08-28 21:09:51 +02:00
Pascal Bellard
7f2149489f rpm2cpio: handle bz2 too; code shrink
function                                             old     new   delta
skip_header                                          142      99     -43
rpm2cpio_main                                        321     183    -138
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 0/2 up/down: 0/-181)           Total: -181 bytes

Signed-off-by: Pascal Bellard <pascal.bellard@ads-lu.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-08-28 06:20:33 +02:00
Denys Vlasenko
d1090c91cc dpkg: delete postrm script after it's run, not before. closes bug 449
function                                             old     new   delta
purge_package                                        220     252     +32

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-07-25 11:52:32 +02:00
Stefani Seibold
f3b56b428f unzip: try lseek before resorting to reading
function                                             old     new   delta
unzip_skip                                            16      43     +27

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-07-25 02:02:22 +02:00
Denys Vlasenko
9038d6f8f5 remove trailing whitespace
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-07-15 20:02:19 +02:00
Denys Vlasenko
b773f715d6 tar: handle 256-base encoding in mtime
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-07-08 18:58:09 +02:00
Denys Vlasenko
09e63bb81f df: fix "df /"
also, clean up mount checks in mkfs/fsck.

function                                             old     new   delta
find_mount_point                                     243     261     +18
sha1_process_block64                                 497     510     +13
find_main                                            436     444      +8
display_speed                                         85      90      +5
df_main                                              795     793      -2
parse_command                                       1463    1460      -3
static.ignored_mounts                                  8       -      -8
mkfs_minix_main                                     2962    2937     -25
fsck_minix_main                                     3065    2970     -95
------------------------------------------------------------------------------
(add/remove: 0/1 grow/shrink: 4/4 up/down: 44/-133)           Total: -89 bytes

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-07-05 04:50:36 +02:00
Denys Vlasenko
d30b89c7ee updates for supporting Linux kernel build and initrd utilities
cpio: --verbose, --quiet, --to-stdout
test: make 64-bit math enable-able for hush too
dnsdomainname: alias to hostname -d
hostname: support --fqdn, --domain, --file

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-06-26 01:55:45 +02:00
Denys Vlasenko
f3b92d3856 getopt: FEATURE_GETOPT_LONG for -l; rename GETOPT_LONG to LONG_OPTS
Signed-off-by: Colin Watson <cjwatson@ubuntu.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-06-19 12:10:38 +02:00
Denys Vlasenko
bcbd37df24 tweak Config texts and some broken English elsewhere
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-06-18 13:23:58 +02:00
Denys Vlasenko
2634bf366b randomconfig fixes
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-06-09 18:40:07 +02:00
Mike Frysinger
b9f2bb36ea only build common libarchive objs when needed
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2009-05-28 00:47:14 -04:00
Denys Vlasenko
167cd709df gzip: fix gzip with many files corrupting some files after first
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-05-18 13:08:57 +02:00
Mike Frysinger
4f239b1bb4 libunarchive: fix build failure with !FEATURE_TAR_UNAME_GNAME
We can't use C if(...) with ENABLE_FEATURE_TAR_UNAME_GNAME because it
relies on conditional members in the file_header_t structure:

archival/libunarchive/data_extract_all.c: In function ‘data_extract_all’:
archival/libunarchive/data_extract_all.c:123: error: ‘file_header_t’ has no member named ‘uname’
archival/libunarchive/data_extract_all.c:124: error: ‘file_header_t’ has no member named ‘uname’
archival/libunarchive/data_extract_all.c:127: error: ‘file_header_t’ has no member named ‘gname’
archival/libunarchive/data_extract_all.c:128: error: ‘file_header_t’ has no member named ‘gname’
make[1]: *** [archival/libunarchive/data_extract_all.o] Error 1

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2009-05-05 07:00:27 -04:00
Denis Vlasenko
052ad9a568 lzop: new applet. Busyboxed by Alain Knaff. +7700 bytes. 2009-04-29 12:01:51 +00:00
Denis Vlasenko
9ac3dc764a unlzma: speedup, by Pascal Bellard (pascal.bellard AT ads-lu.com)
LZMA_FAST off: 10% faster and:
function                                             old     new   delta
rc_is_bit_1                                            -      92     +92
rc_do_normalize                                       45      81     +36
rc_update_bit_1                                       25       -     -25
rc_update_bit_0                                       30       -     -30
rc_is_bit_0_helper                                    38       -     -38
rc_get_bit                                            60      17     -43
rc_read                                               48       -     -48
unpack_lzma_stream                                  1768    1517    -251
------------------------------------------------------------------------------
(add/remove: 1/4 grow/shrink: 1/2 up/down: 128/-435)         Total: -307 bytes

LZMA_FAST on: 14% faster and:
unpack_lzma_stream                                  2301    2737    +436
rc_get_bit                                           106       -    -106
2009-04-25 12:19:35 +00:00
Denis Vlasenko
f9d4fc3cf8 switch_root: improve behavior on error; improve help text
*: make "can't execute '%s'" message uniform
2009-04-21 20:40:51 +00:00
Denis Vlasenko
5e34ff29bc *: mass renaming of USE_XXXX to IF_XXXX
and SKIP_XXXX to IF_NOT_XXXX - the second one was especially
badly named. It was not skipping anything!
2009-04-21 11:09:40 +00:00
Denis Vlasenko
8b814b4a34 tar: support for tar --numeric-owner. By Natanael Copa.
function                                             old     new   delta
tar_longopts                                         221     237     +16
data_extract_all                                     692     705     +13
tar_main                                             690     702     +12
2009-04-21 00:52:21 +00:00
Denis Vlasenko
3266aa9ec2 trailing whitespace removal 2009-04-01 11:24:04 +00:00
Denis Vlasenko
05af832097 cpio: more compat: -0 and -L options
function                                             old     new   delta
cpio_main                                           1417    1473     +56
2009-03-20 23:01:48 +00:00
Denis Vlasenko
83518d18a3 Compatibility fixes:
grep: support -z
find: support --mindepth
  together +45 bytes
cpio: support -p (configurable, +230 bytes)
libbb: tweaks for cpio
2009-03-20 22:17:13 +00:00
Denis Vlasenko
1f0b95f147 tar: make FEATURE_TAR_AUTODETECT work with DESKTOP off too. 2009-03-13 14:26:44 +00:00
Denis Vlasenko
9aa5c652e9 unzip: fix thinko with le/be conv and size (closes bug 129)
awk: make "struct global" hack more robust wrt alignment (closes bug 131)
2009-02-26 11:21:04 +00:00
Denis Vlasenko
498436586e tar: stop changing net tarfile's mode, GNU tar doesn't do it 2009-01-20 02:52:57 +00:00