Commit Graph

10537 Commits

Author SHA1 Message Date
Denys Vlasenko
0800e3af75 ash: do not let EXIT trap to fire in trap
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-09-24 03:09:26 +02:00
Denys Vlasenko
7188540257 hush: small speed optimization. +10 bytes.
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-09-24 01:44:13 +02:00
Denys Vlasenko
2f7894b1bb ash,hush: fix trap reporting: s/SIGEXIT/EXIT/
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-09-24 01:43:21 +02:00
Denys Vlasenko
ecb179b6d7 ifenslave: fix for 2.4 kernels compile
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-09-23 23:47:52 +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
1f27ab0d4b *: optimize code size in strtoul calls
function                                             old     new   delta
bb_parse_mode                                        433     431      -2
rtnl_rtntype_a2n                                     202     198      -4
ParseField                                           511     498     -13
bb_init_module_24                                   4730    4675     -55
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 0/4 up/down: 0/-74)             Total: -74 bytes

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-09-23 17:17:53 +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
844f990926 ash: fix trap
function                                             old     new   delta
forkshell                                            738     810     +72
popstring                                            134     140      +6
parse_command                                       1460    1463      +3
evalvar                                             1373    1371      -2
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 3/1 up/down: 81/-2)              Total: 79 bytes

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-09-23 03:25:52 +02:00
Denys Vlasenko
91836baf85 hush: fix trap
function                                             old     new   delta
expand_variables                                    2217    2280     +63
static.argv                                            -       8      +8

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-09-23 01:46:19 +02:00
Denys Vlasenko
af3fd14e4d hdparm,fdisk: reinstate BLKGETSIZE64 #defines. No code changes
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-09-22 23:16:39 +02:00
Denys Vlasenko
ed4ff0e8cb pidof/killall: fix bug 625 (kernel threads get stale "binary name")
function                                             old     new   delta
procps_scan                                         1622    1642     +20

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-09-22 23:06:07 +02:00
Denys Vlasenko
200d522fb8 df: unicode-aware column formatting. By Tomas Heinrich (theinric AT redhat.com)
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-09-22 15:34:28 +02:00
Denys Vlasenko
4ff1ce0639 ps: fix compile breakage
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-09-22 11:21:48 +02:00
Denys Vlasenko
11c8238d1b sed: fix bug 623 (SEGV on some sed commands)
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-09-22 03:02:21 +02:00
Denys Vlasenko
d75295c80b ps: conditionally enable -T on non-DESKTOP build too
function                                             old     new   delta
ps_main                                              253     274     +21

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-09-21 23:58:43 +02:00
Denys Vlasenko
69b1cef921 hush: better wording in comments. no code changes
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-09-21 10:21:44 +02:00
Denys Vlasenko
bc3e9479c2 awk: fix typo in prev commit
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-09-21 04:16:00 +02:00
Leonid Lisovskiy
46a0be5304 awk: implement mktime
function                                             old     new   delta
exec_builtin                                           -    1466   +1466
do_mktime                                              -     116    +116
tokenlist                                            441     448      +7
tokeninfo                                            396     400      +4
evaluate                                            5395    3755   -1640
------------------------------------------------------------------------------
(add/remove: 2/0 grow/shrink: 2/1 up/down: 1593/-1640)        Total: -47 bytes

Signed-off-by: Leonid Lisovskiy <lly.dev@gmail.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-09-21 04:08:08 +02:00
Denys Vlasenko
d8dd25a2a7 diff: debug macros; one trivial size optimization
function                                             old     new   delta
diffreg                                             1781    1815     +34
isqrt                                                 64       -     -64
------------------------------------------------------------------------------
(add/remove: 0/1 grow/shrink: 1/0 up/down: 34/-64)            Total: -30 bytes

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-09-21 01:23:19 +02:00
Denys Vlasenko
3e02050314 diff: fix bug 613 (diff -ub segfaults)
function                                             old     new   delta
dump_unified_vec                                     435     457     +22
diff_main                                            855     860      +5
diffreg                                             1786    1781      -5
do_diff                                              428     416     -12
change                                               325     283     -42
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 2/3 up/down: 27/-59)            Total: -32 bytes

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-09-21 01:22:18 +02:00
Denys Vlasenko
532609e36e ps: document -T option
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-09-20 20:29:25 +02:00
Natanael Copa
9aff29997e swaponoff: add uuid/label support. By Natanael Copa
function                                             old     new   delta
swap_enable_disable                                  130     150     +20
resolve_mount_spec                                    76      96     +20
mount_main                                          1152    1154      +2
findfs_main                                          125      80     -45
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 3/1 up/down: 42/-45)             Total: -3 bytes

Signed-off-by: Natanael Copa <natanael.copa@gmail.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-09-20 04:28:22 +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
b410d4ada7 ps,top: add an option to show threads. +260 bytes of code
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-09-19 22:29:42 +02:00
Denys Vlasenko
f00cfdfae5 dd: fix conv=noerror w/o sync to not write out zeroed blocks
function                                             old     new   delta
dd_main                                             1480    1463     -17

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-09-18 20:49:36 +02:00
Bernhard Reutner-Fischer
ae0045e31a we could need ssd -d (fancy)
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2009-09-17 18:57:59 +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
1166d7b136 ash: fix bug 585 (>"$VAR_WITH_UNICODE_CHARS" problem)
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-09-16 16:20:31 +02:00
Denys Vlasenko
b0d63383dd ash: preparatory cleanup. The only real changes are (unsigned char) casts
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-09-16 16:18:32 +02:00
Denys Vlasenko
795633463a add a testcase for reopened bug 585 (not fixed yet)
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-09-16 14:04:07 +02:00
Denys Vlasenko
ddf7850f2b fdisk: add a warning and truncate disks with >= 2^32 sectors
As a result, for sectors we can use uint32_t instead of long long,
and on 32 bits it has drastic effects:

function                                             old     new   delta
get_geometry                                         619     646     +27
set_sun_partition                                    148     150      +2
get_partition                                        134     135      +1
xbsd_write_bootstrap                                 382     381      -1
xbsd_readlabel                                       247     246      -1
bsd_select                                          1674    1672      -2
sun_other_endian                                       4       1      -3
scsi_disk                                              4       1      -3
floppy                                                 4       1      -3
fdisk_main                                          3735    3732      -3
read_maybe_empty                                      43      37      -6
create_doslabel                                      111     104      -7
read_line                                             97      88      -9
add_logical                                          117     107     -10
write_table                                          599     588     -11
new_partition                                       1684    1670     -14
list_disk_geometry                                   229     215     -14
wrong_p_order                                        130     110     -20
xselect                                             3142    3114     -28
seek_sector                                           71      40     -31
get_boot                                            1576    1533     -43
fill_bounds                                          174     128     -46
delete_partition                                     603     551     -52
list_table                                          1401    1232    -169
set_partition                                        459     286    -173
verify                                              1840    1495    -345
add_partition                                       2486    1270   -1216
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 3/24 up/down: 30/-2210)       Total: -2180 bytes
   text    data     bss     dec     hex filename
 848812     460    7116  856388   d1144 busybox_old
 846620     460    7108  854188   d08ac busybox_unstripped

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-09-16 03:03:13 +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
ba98603264 mount: do not execute "mount.(null)" :)
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-09-15 23:00:09 +02:00
Denys Vlasenko
772c2db971 httpd_ssi.c: make it a bit less broken
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-09-13 17:38:15 +02:00
Denys Vlasenko
aa7da73880 add USE_PORTABLE_CODE option and use it in find applet
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-09-13 14:57:24 +02:00
Denys Vlasenko
7649bd024c fsck: more clever (->smaller) handling of parameters
function                                             old     new   delta
fsck_device                                          213     449    +236
new_args                                               -      46     +46
fsck_main                                           1870    1815     -55
execute                                              289       -    -289
------------------------------------------------------------------------------
(add/remove: 1/1 grow/shrink: 1/1 up/down: 282/-344)          Total: -62 bytes

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-09-13 05:52:46 +02:00
Denys Vlasenko
6683745bf7 fsck: remove a few statics
function                                             old     new   delta
kill_all_if_got_signal                                 -      60     +60
notitle                                                1       -      -1
doall                                                  1       -      -1
cancel_requested                                       1       -      -1
num_devices                                            4       -      -4
devices                                                4       -      -4
signal_cancel                                          8       -      -8
fsck_main                                           1893    1870     -23
kill_all_if_cancel_requested                          60       -     -60
------------------------------------------------------------------------------
(add/remove: 1/7 grow/shrink: 0/1 up/down: 60/-102)           Total: -42 bytes
   text    data     bss     dec     hex filename
 824205     458    6956  831619   cb083 busybox_old
 824174     458    6948  831580   cb05c busybox_unstripped

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-09-13 05:52:03 +02:00
Denys Vlasenko
c541a8955d test: use index_in_strings
function                                             old     new   delta
ops_texts                                              -     124    +124
ops_table                                              -      80     +80
display_process_list                                1447    1448      +1
binop                                                525     523      -2
static.no_op                                           6       2      -4
check_operator                                        71      63      -8
ops                                                  240       -    -240
------------------------------------------------------------------------------
(add/remove: 2/1 grow/shrink: 1/3 up/down: 205/-254)          Total: -49 bytes

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-09-12 22:41:57 +02:00
Denys Vlasenko
fe73798135 top: remove GCCisms
function                                             old     new   delta
display_process_list                                1447    1448      +1

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-09-12 15:11:50 +02:00
Denys Vlasenko
27726cb6aa hush: make memleak debugging more robust
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-09-12 14:48:33 +02:00
Denys Vlasenko
873273da94 hush: code shrink by Dan Fandrich (dan AT coneharvesters.com)
function                                             old     new   delta
find_function_slot                                     -      47     +47
run_list                                            2508    2491     -17
find_function                                         40       8     -32
builtin_unset                                        227     165     -62

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-09-12 14:47:41 +02:00
Denys Vlasenko
3a0f6f2328 fix read_cmdline API and a small buglet where "[comm]" may be too narrow
function                                             old     new   delta
func_args                                             25      26      +1
read_cmdline                                         119     114      -5
display_process_list                                1462    1447     -15
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 1/2 up/down: 1/-20)             Total: -19 bytes

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-09-12 00:15:34 +02:00
Denys Vlasenko
ae357bd713 top, ps: do not output trailing spaces
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-09-11 23:29:45 +02:00
Denys Vlasenko
0052882200 top: add -m ("memory") option
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-09-11 23:26:42 +02:00
Denys Vlasenko
56573cb4f7 networking/httpd_ssi.c: expand comments
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-09-10 21:27:39 +02:00
Denys Vlasenko
db4a67628d networking/httpd_ssi.c: new example CGI handler
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-09-10 21:24:45 +02:00
Denys Vlasenko
33d8d08f78 httpd: shrink mime type matching code (suggested by Bernhard)
function                                             old     new   delta
static.suffixTable                                   100     231    +131
send_file_and_exit                                   625     658     +33
handle_incoming_and_exit                            2749    2745      -4
send_cgi_and_exit                                    936     901     -35
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 2/2 up/down: 164/-39)           Total: 125 bytes
   text    data     bss     dec     hex filename
 824631     458    6956  832045   cb22d busybox_old
 824550     458    6956  831964   cb1dc busybox_unstripped

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-09-10 01:46:02 +02:00
Denys Vlasenko
d069e5398d a few more GCC-isms removed
text    data     bss     dec     hex filename
 824641     458    6956  832055   cb237 busybox_old
 824631     458    6956  832045   cb22d busybox_unstripped

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-09-09 23:12:10 +02:00