Commit Graph

10564 Commits

Author SHA1 Message Date
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
Denys Vlasenko
e66ccfaa2c remove some garbage from http POST upload example
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-09-09 22:33:30 +02:00
Denys Vlasenko
108b8c5367 httpd: fix bug 601 "I:index.php does not run interpreter on DIR/ url"
function                                             old     new   delta
parse_conf                                          1462    1485     +23
index_html                                             -      11     +11
handle_incoming_and_exit                            2762    2749     -13
------------------------------------------------------------------------------
(add/remove: 1/0 grow/shrink: 1/1 up/down: 34/-13)             Total: 21 bytes

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-09-08 21:17:49 +02:00
Bernhard Reutner-Fischer
db57fc22a6 Add ENABLE_FEATURE_MDEV_RENAME_REGEXP examples to mdev documentation
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2009-09-08 14:16:00 +02:00
Denys Vlasenko
62298ab13d TODO: add unicode list
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-09-07 13:19:17 +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
0c6914e50c modprobe-small: make string buffer code robust; fix help text
together with previous one-liner:

function                                             old     new   delta
append                                                70      99     +29
parse_module                                         295     311     +16
copy_stringbuf                                        35      36      +1
packed_usage                                       26545   26540      -5
appendc                                               27       -     -27
------------------------------------------------------------------------------
(add/remove: 0/1 grow/shrink: 3/1 up/down: 46/-32)             Total: 14 bytes

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-09-07 02:38:26 +02:00
Denys Vlasenko
f9c814b0ee modprobe-small: hopefully fix bug 591 (incorrect detection of alias with '-')
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-09-07 02:37:19 +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
043b1e5d99 more C standard compat fixes from Dan Fandrich
function                                             old     new   delta
docolon                                              207     204      -3

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-09-06 12:47:55 +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
1f7c167b23 experimentally add mallopt tweaks for reduced memory consumption
function                                             old     new   delta
mallopt                                                -     126    +126
main                                                  91     117     +26
------------------------------------------------------------------------------
(add/remove: 1/0 grow/shrink: 1/0 up/down: 152/0)             Total: 152 bytes

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-09-06 02:12:28 +02:00
Denys Vlasenko
6db4784d27 hush: export PWD
function                                             old     new   delta
set_pwd_var                                            -      36     +36
hush_main                                            941     951     +10
evalvar                                             1365    1363      -2
ash_main                                            1364    1362      -2
builtin_cd                                            75      72      -3
------------------------------------------------------------------------------
(add/remove: 1/0 grow/shrink: 1/3 up/down: 46/-7)              Total: 39 bytes

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-09-05 20:15:17 +02:00
Denys Vlasenko
2cc709139e inetd: comment tweak. no code changes
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-09-04 03:48:40 +02:00
Denys Vlasenko
ed1667e8ee telnetd: add -w ("inetd wait") option. Can be configured off.
gcc fils to fully optimize it out when it's off:

function                                             old     new   delta
telnetd_main                                        1527    1548     +21
packed_usage                                       26596   26587      -9

but nevertheless it's a useful (and so far single) example
how to write "inetd wait" tcp service.

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-09-04 02:21:13 +02:00
Denys Vlasenko
cfc216345e inetd: be more careful with syslog socket; other small fixes
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-09-04 02:19:46 +02:00
Denys Vlasenko
4b624d0770 small commit tweak in parse_datestr, no code changes
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-09-02 11:49:25 +02:00
Denys Vlasenko
44f174e61b uniq: shave off whole 10 bytes off, oh my
text    data     bss     dec     hex filename
 823673     458    6956  831087   cae6f busybox_old
 823663     458    6956  831077   cae65 busybox_unstripped

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-08-31 05:15:21 +02:00
Denys Vlasenko
a00329ca8e ash: better comment. no code changes
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-08-30 20:05:10 +02:00
Denys Vlasenko
630dde1cef code shrink in help text code
text    data     bss     dec     hex filename
 823690     458    6956  831104   cae80 busybox_old
 823673     458    6956  831087   cae6f busybox_unstripped

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-08-30 19:57:49 +02:00
Denys Vlasenko
1249dbb2c7 uniq: code shrink
function                                             old     new   delta
xgetoptfile_uniq_s                                    44      51      +7
uniq_main                                            389     368     -21
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 1/1 up/down: 7/-21)             Total: -14 bytes

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-08-30 19:35:06 +02:00
Denys Vlasenko
a9c9bf5055 uniq: plug memory leak (patch from OpenWRT project)
function                                             old     new   delta
uniq_main                                            371     389     +18

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-08-30 19:34:09 +02:00