Commit Graph

1181 Commits

Author SHA1 Message Date
Denis Vlasenko
52feee9b1f rmdir: optional long options support for Debian users. +68 bytes.
By Roberto Gordo Saez <roberto.gordo AT gmail.com>
2008-02-24 14:56:10 +00:00
Denis Vlasenko
400d8bb45e less,klogd,syslogd,nc,tcpudp: exit on signal by killing itself, not exit(1)
*: minor shrink
2008-02-24 13:36:01 +00:00
Denis Vlasenko
e8419c90f1 tail: fix "tail -c 20 /dev/huge_disk" (was taking ages)
tail: a few variables renamed
wc: tiny optimization.
2008-02-19 00:38:10 +00:00
Denis Vlasenko
542963685c dos2unix: shrink
bloatcheck for last four commits:
function                                             old     new   delta
xrename                                                -      38     +38
md5_hash_block                                       437     458     +21
sv_main                                             1237    1254     +17
update_status                                        569     580     +11
decode_format_string                                 795     805     +10
doset                                                317     326      +9
passwd_main                                         1070    1074      +4
sha1_compile                                         447     446      -1
rename_or_warn                                        49      47      -2
fill_bounds                                          174     172      -2
buffer_fill_and_print                                 76      73      -3
bb_perror_nomsg                                        9       -      -9
get_next_block                                      1810    1795     -15
patch_main                                          1107    1085     -22
write_status_file                                   1123    1077     -46
remove                                                52       -     -52
__GI_remove                                           52       -     -52
open_as_user                                         171     111     -60
microcom_main                                        811     747     -64
dos2unix_main                                        452     383     -69
------------------------------------------------------------------------------
(add/remove: 1/3 grow/shrink: 6/10 up/down: 110/-397)        Total: -287 bytes
2008-02-17 14:31:50 +00:00
Denis Vlasenko
25591c322c libbb: introduce bb_signals and bb_signals_recursive,
which sets same handler for many signals. sig_catch is nuked
(bb_signals_recursive is more descriptive name).
*: use them as appropriate. 

function                                             old     new   delta
bb_signals_recursive                                   -      95     +95
bb_signals                                             -      52     +52
run_command                                          258     273     +15
svlogd_main                                         1368    1377      +9
runsv_main                                          1746    1752      +6
runsvdir_main                                       1643    1646      +3
UNSPEC_print                                          64      66      +2
time_main                                           1128    1127      -1
...
resize_main                                          246     210     -36
sig_catch                                             63       -     -63
set_fatal_sighandler                                  85      14     -71
------------------------------------------------------------------------------
(add/remove: 2/1 grow/shrink: 5/24 up/down: 182/-548)        Total: -366 bytes
2008-02-16 22:58:56 +00:00
Denis Vlasenko
284d0faed6 random s/short/int/
add_cmd                                             1189    1190      +1
xconnect_ftpdata                                     118     117      -1
data_align                                            86      84      -2
process_files                                       2101    2096      -5
forkexec                                            1345    1334     -11
2008-02-16 13:18:17 +00:00
Denis Vlasenko
d5fe880a57 cp: add ENABLE_FEATURE_VERBOSE_CP_MESSAGE. Closes bug 1470 2008-02-13 16:52:00 +00:00
Denis Vlasenko
3b92eaac53 sort: -z outputs NUL terminated lines. Closes bug 1591. 2008-02-13 14:30:33 +00:00
Bernhard Reutner-Fischer
a985d306a1 - spelling fixes 2008-02-11 11:44:38 +00:00
Denis Vlasenko
1e2a7e4ed1 test: fix mishandling of 'test ! arg1 op arg2 more args'; add testsuite 2008-02-09 05:48:42 +00:00
Denis Vlasenko
97bd0e05cc README: doccument the need of CONFIG_DESKTOP
od: fix help text to include -t
od: handle /proc files (which have filesize 0) correctly
od: fix comments to not lie about return value
od: "%u" is 1 byte less than "%zu"
cat: fix English
2008-02-08 15:41:01 +00:00
Denis Vlasenko
f8157cafcb nohup: compat patch by Christoph Gysin <mailinglist.cache at gmail.com> 2008-02-04 00:30:06 +00:00
Denis Vlasenko
847fa779af *: tidy up usage of char **environ 2008-01-28 22:45:43 +00:00
Denis Vlasenko
da42bd5bbe stty: fix mishandling of 'control' keywords (Ralf Friedl <Ralf.Friedl@online.de>) 2008-01-27 23:24:31 +00:00
Denis Vlasenko
de24bd960f tac: handle NULs properly. +145 bytes 2008-01-09 23:00:00 +00:00
Denis Vlasenko
474d1c57c8 whitespace fixes 2008-01-07 19:06:47 +00:00
Denis Vlasenko
482f2b31e7 tac: *really* add tac.c now 2008-01-07 16:14:14 +00:00
Denis Vlasenko
bcd5fc12ec tac: new applet. ~240 bytes.
Copyright (C) 2003  Yang Xiaopeng  <yxp at hanwang.com.cn>
Copyright (C) 2007  Natanael Copa  <natanael.copa@gmail.com>
Copyright (C) 2007  Tito Ragusa    <farmatito@tiscali.it>
2008-01-06 06:27:17 +00:00
Denis Vlasenko
f7be20e70c nameif: extended matching (Nico Erfurth <masta@perlgolf.de>)
*: whitespace fixes

function                                             old     new   delta
prepend_new_eth_table                                  -     304    +304
nameif_main                                          620     684     +64
cc_macaddr                                            51       -     -51
------------------------------------------------------------------------------
(add/remove: 1/1 grow/shrink: 1/0 up/down: 368/-51)           Total: 317 bytes
2007-12-24 14:09:19 +00:00
Denis Vlasenko
e4bc603f0b od: reduce data/bss usage (code size went down too) 2007-12-24 12:14:24 +00:00
Denis Vlasenko
e2532ab5f2 dd: fix a bug where we don't report write errors
testsuite: small cleanup

full_write_or_warn                                    38      40      +2
write_and_stats                                       66      67      +1
dd_main                                             1358    1335     -23
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 2/1 up/down: 3/-23)             Total: -20 bytes
2007-12-02 01:44:42 +00:00
Denis Vlasenko
6672c8e480 test: stop using lots of bss.
function                                             old     new   delta
test_main                                            425     456     +31
t_lex                                                 69      73      +4
syntax                                               100     104      +4
ptr_to_statics                                         8      12      +4
t_wp_op                                                4       -      -4
t_wp                                                   4       -      -4
ngroups                                                4       -      -4
group_array                                            4       -      -4
binop                                                590     585      -5
oexpr                                                104      97      -7
aexpr                                                101      94      -7
nexpr                                                831     820     -11
leaving                                              156       -    -156
------------------------------------------------------------------------------
(add/remove: 0/5 grow/shrink: 4/4 up/down: 43/-202)          Total: -159 bytes
   text    data     bss     dec     hex filename
 775098     929    9084  785111   bfad7 busybox_old
 775107     933    8908  784948   bfa34 busybox_unstripped
2007-11-30 07:29:05 +00:00
Denis Vlasenko
c253778de9 touch: accept and ignore -f 2007-11-28 19:25:32 +00:00
Denis Vlasenko
dd8bbfd084 stty: reorganize data tables - save 0.5k
function                                             old     new   delta
mode_name                                              -     496    +496
control_name                                           -      91     +91
stty_main                                           1235    1255     +20
find_mode                                             45      63     +18
find_control                                          45      63     +18
do_display                                           482     493     +11
wrapf                                                165     166      +1
set_mode                                             761     759      -2
max_col                                                4       -      -4
device_name                                            4       -      -4
control_info                                         153      34    -119
mode_info                                           1700     680   -1020
------------------------------------------------------------------------------
(add/remove: 2/2 grow/shrink: 5/3 up/down: 655/-1149)        Total: -494 bytes
   text    data     bss     dec     hex filename
 777037     937    9100  787074   c0282 busybox_old
 776551     929    9100  786580   c0094 busybox_unstripped
2007-11-24 04:32:49 +00:00
Denis Vlasenko
fe5e23bf75 remove echo_main -> bb_echo indirection 2007-11-24 02:23:51 +00:00
Denis Vlasenko
3831c91c95 cut: add proper stdout error handling, fix "-" handling;
modest code shrink
2007-11-23 07:26:15 +00:00
Denis Vlasenko
7d75a96b15 ash: fix bug where redirection of closed fd was leaving it open afterwards.
redirect                                             983    1024     +41
bb_echo                                              276     301     +25
popredir                                             118     132     +14
evalcommand                                         1163    1176     +13
bbunpack                                             358     366      +8
echocmd                                               13       5      -8
echo_main                                             13       5      -8
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 5/2 up/down: 101/-16)            Total: 85 bytes
   text    data     bss     dec     hex filename
 774999     962    9236  785197   bfb2d busybox_old
 775084     962    9236  785282   bfb82 busybox_unstripped
2007-11-22 08:16:57 +00:00
Denis Vlasenko
2a587df80a stty: mark variable as static 2007-11-18 11:47:25 +00:00
Bernhard Reutner-Fischer
7c2db5c198 - use standard-imposed constants some more 2007-11-16 12:39:16 +00:00
Bernhard Reutner-Fischer
a702457eac - remove most of the forward declarations. No obj-code changes. 2007-11-16 12:20:30 +00:00
Bernhard Reutner-Fischer
e8979889b4 - add note about SUSv3 missing options. 2007-11-16 11:52:42 +00:00
Denis Vlasenko
01cd9570c7 who: add -a (by Tito) 2007-11-16 05:24:43 +00:00
Denis Vlasenko
6d38dc3af4 df: add -a
df: don't special case rootfs and /dev/root

function                                             old     new   delta
df_main                                              746     684     -62
find_block_device                                    111       -    -111
find_block_device_in_dir                             243       -    -243
------------------------------------------------------------------------------
(add/remove: 0/2 grow/shrink: 0/1 up/down: 0/-416)           Total: -416 bytes
2007-11-15 09:02:12 +00:00
Denis Vlasenko
f430cdbf2e df: add -i (conditional on CONFIG)
uasge: trim a bit
2007-11-15 07:02:55 +00:00
Denis Vlasenko
8d0a734d91 tr: more of code shrink (getopt32-ification)
runtest: cleanup. Method of getting $applets was truly bizarre

function                                             old     new   delta
tr_main                                              655     527    -128
2007-11-13 22:23:57 +00:00
Denis Vlasenko
3d461676a9 tr: better comments, small code shrink
function                                             old     new   delta
expand                                              2232    2230      -2
tr_main                                              677     655     -22
2007-11-13 22:22:29 +00:00
Denis Vlasenko
a89d50fb9a tr: properly detect read errors (Fernando Silveira <fsilveira@gmail.com>)
readprofile: use xwrite

function                                             old     new   delta
tr_main                                              679     677      -2
readprofile_main                                    1964    1944     -20
2007-11-13 17:51:40 +00:00
Denis Vlasenko
05c8c4f745 who: code shrink by Tito <farmatito@tiscali.it>
function                                             old     new   delta
who_main                                             271     259     -12
2007-11-13 17:26:21 +00:00
Denis Vlasenko
e5569cb52e who: fix wrong date/time field size 2007-11-11 06:35:41 +00:00
Denis Vlasenko
b4f608d8e0 readlink: realpath requires PATH_MAX, bb_common_bufsiz1 can be too small
umount: don't actually need char[2 * PATH_MAX] for realpath
2007-11-10 01:31:19 +00:00
Denis Vlasenko
6bef3d1d22 fbset: fix buglet where we were using wrong pointer
readahead: stop using stdio.h
*: style fixes
2007-11-06 03:05:54 +00:00
Denis Vlasenko
5576136563 fixes revealed by randomconfig run 2007-10-16 22:53:05 +00:00
Denis Vlasenko
2ea8c40e8f stty: incorporate strings into struct instead of keeping pointers there.
static:
   text    data     bss     dec     hex filename
 767535     974    9420  777929   bdec9 busybox_old
 767403     974    9420  777797   bde45 busybox_unstripped

dynamic -fpic:
   text    data     bss     dec     hex filename
 718954   14030   12032  745016   b5e38 busybox_old
 720278   12534   12032  744844   b5d8c busybox_unstripped
2007-10-11 16:02:36 +00:00
Denis Vlasenko
9b49a5ed85 add -fvisibility=hidden to CC flags, mark XXX_main functions
EXTERNALLY_VISIBLE. 5% size reduction of libbusybox.so
2007-10-11 10:05:36 +00:00
Denis Vlasenko
91e5203205 stat: code shrink; stop using bss; stop using strncat incorrectly
function                                             old     new   delta
printfs                                                -      28     +28
strcatc                                                -      26     +26
human_time                                            41      44      +3
print_it                                             229     219     -10
buf                                                   30       -     -30
print_statfs                                         420     358     -62
print_stat                                          1089     921    -168
------------------------------------------------------------------------------
(add/remove: 2/1 grow/shrink: 1/3 up/down: 57/-270)          Total: -213 bytes
   text    data     bss     dec     hex filename
 771105    1029    9552  781686   bed76 busybox_old
 770892    1029    9520  781441   bec81 busybox_unstripped
2007-10-05 20:31:23 +00:00
Denis Vlasenko
91e80c2be7 delete now unused check_header_gzip.c
sum: do not use uintmax needlessly
2007-10-05 20:29:31 +00:00
Denis Vlasenko
226002ea74 tail: sizeof(buf) is sizeof(char*)! must be BUFSIZ 2007-10-05 19:17:16 +00:00
Denis Vlasenko
368a12efc2 tail: work correctly on /proc files (Kazuo TAKADA <kztakada@sm.sony.co.jp>) 2007-10-02 10:17:56 +00:00
Denis Vlasenko
feb7ae7f01 printf("%s\n") -> puts() 2007-10-01 12:05:12 +00:00
Denis Vlasenko
0c97c9d437 'simple' error message functions by Loic Grenie <loic.grenie@gmail.com>.
263 bytes saved.
2007-10-01 11:58:38 +00:00