Commit Graph

42 Commits

Author SHA1 Message Date
Denys Vlasenko
66426760be *: remove "Options:" string from help texts
function                                             old     new   delta
packed_usage                                       28706   28623     -83

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-06-05 03:58:28 +02:00
Pere Orga
5bc8c005a8 move remaining help text from include/usage.src.h
Signed-off-by: Pere Orga <gotrunks@gmail.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-04-11 03:29:49 +02:00
Denys Vlasenko
0ef64bdb40 *: make GNU licensing statement forms more regular
This change retains "or later" state! No licensing _changes_ here,
only form is adjusted (article, space between "GPL" and "v2" and so on).

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-08-16 20:14:46 +02:00
Pascal Bellard
926031b764 *: introduce and use xfork() and xvfork()
function                                             old     new   delta
launch_helper                                        170     169      -1
setup_heredoc                                        312     302     -10
handle_dir_common                                    367     354     -13
expand_vars_to_list                                 2456    2443     -13
open_transformer                                      89      74     -15
data_extract_to_command                              439     423     -16
do_ipaddr                                           1406    1389     -17
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 0/7 up/down: 0/-85)             Total: -85 bytes

Signed-off-by: Pascal Bellard <pascal.bellard@ads-lu.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-07-04 15:32:38 +02:00
Pascal Bellard
21e8e8da64 libbb: introduce and use BB_EXECVP_or_die()
function                                             old     new   delta
BB_EXECVP_or_die                                       -      47     +47
time_main                                           1042    1043      +1
chrt_main                                            371     364      -7
ionice_main                                          292     282     -10
setsid_main                                           69      56     -13
nohup_main                                           236     223     -13
cttyhack_main                                        266     253     -13
chroot_main                                           94      81     -13
chpst_main                                           746     733     -13
timeout_main                                         297     279     -18
taskset_main                                         541     522     -19
vfork_child                                           67      45     -22
parse                                                975     953     -22
lpd_main                                             770     748     -22
launch_helper                                        192     170     -22
tcpudpsvd_main                                      1810    1782     -28
nice_main                                            190     156     -34
env_main                                             242     206     -36
run_command                                          221     174     -47
------------------------------------------------------------------------------
(add/remove: 1/0 grow/shrink: 1/17 up/down: 48/-352)         Total: -304 bytes

Signed-off-by: Pascal Bellard <pascal.bellard@ads-lu.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-07-04 00:57:03 +02:00
Denys Vlasenko
41ddd9f606 *: make exec failure message more consistent
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-06-25 01:46:53 +02:00
Denys Vlasenko
651a2697f7 *: merge some common strings
text   data    bss    dec    hexfilename
 838650   8009      0 846659  ceb43busybox_old
 838519   8009      0 846528  ceac0busybox_unstripped

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-03-23 16:25:17 +01:00
Denys Vlasenko
f2c8aa6676 libbb: introduce and use monotonic_ms
function                                             old     new   delta
monotonic_ms                                           -      60     +60
process_stdin                                        433     443     +10
display_speed                                         85      90      +5
nmeter_main                                          672     674      +2
builtin_type                                         114     116      +2
bb__parsespent                                       117     119      +2
ifplugd_main                                        1110    1109      -1
acpid_main                                           441     440      -1
chat_main                                           1361    1359      -2
doCommands                                          2458    2449      -9
arpping                                              466     450     -16
run_command                                          268     234     -34
readcmd                                             1072    1034     -38
------------------------------------------------------------------------------
(add/remove: 1/0 grow/shrink: 5/7 up/down: 81/-101)           Total: -20 bytes

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-01-12 12:52:30 +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
6331cf059c *: use "can't" instead of "cannot"
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-11-13 09:08:27 +01:00
Bernhard Reutner-Fischer
0adf7f2d46 - by not calling getpagesize() twice we can save 2 bytes (walter harms) 2009-02-23 16:51:25 +00:00
Denis Vlasenko
94884eb486 time: don't segfault with no arguments 2008-07-11 15:05:51 +00:00
Denis Vlasenko
a60f84ebf0 *: rename ATTRIBUTE_XXX to just XXX. 2008-07-05 09:18:54 +00:00
Denis Vlasenko
fa0b56db76 sendmail: fix wrong vfork usage here too
*: shorten error texts

function                                             old     new   delta
launch_helper                                          -     151    +151
vfork_or_die                                          20       -     -20
sendgetmail_main                                    1946    1848     -98
------------------------------------------------------------------------------
(add/remove: 1/1 grow/shrink: 0/1 up/down: 151/-118)           Total: 33 bytes
2008-07-01 16:09:07 +00:00
Denis Vlasenko
82604e9730 revert last two commits. vfork cannot be used in subroutine,
it trashes stack on return
2008-07-01 15:59:42 +00:00
Denis Vlasenko
3da5572bfa *: introduce and use xvfork()
function                                             old     new   delta
time_main                                           1052    1285    +233
crontab_main                                         623     856    +233
ifupdown_main                                       2202    2403    +201
xvfork                                                 -      20     +20
passwd_main                                         1049    1053      +4
grave                                               1068    1066      -2
script_main                                          935     921     -14
vfork_or_die                                          20       -     -20
vfork_compressor                                     206     175     -31
open_as_user                                         109       -    -109
popen2                                               218       -    -218
edit_file                                            910     690    -220
run_command                                          268       -    -268
------------------------------------------------------------------------------
(add/remove: 1/4 grow/shrink: 4/4 up/down: 691/-882)         Total: -191 bytes
2008-07-01 10:40:41 +00:00
Bernhard Reutner-Fischer
636a1f85e8 - use EXIT_{SUCCESS,FAILURE}. No object-code changes 2008-05-19 09:29:47 +00:00
Denis Vlasenko
b44c790e41 *: fix various kinds of damage to letter 'c' in Arkadiusz Mickiewicz' surname.
chrt,taskset,dc,eject: shrink
crontab: call "vi" with just name, no path
watchdog: intercept all fatal signals

function                                             old     new   delta
xstrtoull_range                                        -      35     +35
static.sg_commands                                     -      18     +18
packed_usage                                       23698   23712     +14
watchdog_main                                        148     151      +3
crontab_main                                         637     638      +1
base                                                   1       -      -1
static.ps                                              4       -      -4
pointer                                                4       -      -4
stack_machine                                         99      92      -7
run_command                                          273     260     -13
eject_main                                           360     343     -17
static.C                                              30      12     -18
ptok                                                  61      38     -23
xstrtol_range                                         27       -     -27
get_token                                             35       -     -35
taskset_main                                         586     550     -36
chrt_main                                            411     372     -39
dc_main                                              158     117     -41
time_main                                           1127    1037     -90
------------------------------------------------------------------------------
(add/remove: 2/5 grow/shrink: 3/9 up/down: 71/-355)          Total: -284 bytes
   text    data     bss     dec     hex filename
 793680     662    7420  801762   c3be2 busybox_old
 793327     662    7412  801401   c3a79 busybox_unstripped
2008-03-17 09:29:43 +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
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
4daad9004d introduce bb_putchar(). saves ~1800 on uclibc (less on glibc). 2007-09-27 10:20:47 +00:00
Denis Vlasenko
6ca409e0e4 trylink: produce even more info about final link stage
trylink: explain how to modify link and drastically decrease amount
  of padding (unfortunately, needs hand editing ATM).
*: add ALIGN1 / ALIGN2 to global strings and arrays of bytes and shorts

size saving: 0.5k
2007-08-12 20:58:27 +00:00
Denis Vlasenko
bd7bb299c0 wget: use monotonic_sec instead of gettimeofday
zcip: use monotonic_us instead of gettimeofday
udhcpcd: simpler, shorter random_xid()

function                                             old     new   delta
monotonic_sec                                          -      41     +41
find_pair                                            164     180     +16
run_list_real                                       2018    2028     +10
cmp_main                                             547     555      +8
collect_ctx                                          112     119      +7
singlemount                                         4544    4549      +5
time_main                                           1124    1128      +4
static.start_sec                                       -       4      +4
static.lastupdate_sec                                  -       4      +4
sock                                                   -       4      +4
read_package_field                                   253     257      +4
pick                                                  38      40      +2
get_next_line                                        145     147      +2
count_lines                                           59      61      +2
process_stdin                                        435     433      -2
xstrtoul_range_sfx                                   229     226      -3
static.initialized                                     4       1      -3
dhcprelay_main                                      1125    1122      -3
catcher                                              380     377      -3
arping_main                                         1969    1966      -3
s                                                      8       4      -4
cfg                                                    4       -      -4
static.lastupdate                                      8       -      -8
start                                                  8       -      -8
random_xid                                            95      33     -62
.rodata                                           129114  129050     -64
zcip_main                                           1731    1576    -155
progressmeter                                       1035     867    -168
------------------------------------------------------------------------------
(add/remove: 4/3 grow/shrink: 10/11 up/down: 113/-490)       Total: -377 bytes
2007-06-17 23:40:26 +00:00
Denis Vlasenko
459be35234 hwclock: size optimizations
libbb/time.c: new file, introducing monotonic_us()
pscan, traceroute, arping: use it instead of gettimeofday
ping, zcip: TODO

function                                             old     new   delta
monotonic_us                                           -      89     +89
find_pair                                            164     180     +16
.rodata                                           129747  129763     +16
refresh                                             1144    1152      +8
............
timeout                                                8       4      -4
static.start                                           8       4      -4
last                                                   8       4      -4
parse_conf                                          1303    1284     -19
time_main                                           1149    1124     -25
gettimeofday_us                                       39       -     -39
arping_main                                         2042    1969     -73
hwclock_main                                         594     501     -93
catcher                                              485     380    -105
traceroute_main                                     4300    4117    -183
------------------------------------------------------------------------------
(add/remove: 2/1 grow/shrink: 8/11 up/down: 157/-562)        Total: -405 bytes
2007-06-17 19:09:05 +00:00
Denis Vlasenko
e79dd06782 time: *const str = "xxx" ==> str[] = "xxx" 2007-06-17 19:04:58 +00:00
Denis Vlasenko
b6adbf1be2 usage.c: remove reference to busybox.h
*: s/include "busybox.h"/include "libbb.h"
2007-05-26 19:00:18 +00:00
Denis Vlasenko
1d76f439da EXEC_PREFER_APPLETS support by Gabriel L. Somlo <somlo@cmu.edu> 2007-02-06 01:20:12 +00:00
Denis Vlasenko
06af216528 suppress warnings about easch <applet>_main() having
no preceding prototype
2007-02-03 17:28:39 +00:00
Denis Vlasenko
c5cb38f4d9 time: -200 bytes of text 2006-12-22 13:43:19 +00:00
Denis Vlasenko
f93ab47c45 time: fix option parsing bug, size optimizations 2006-12-22 12:36:13 +00:00
Rob Landley
e9a7a6212b Change license statements (and clean up headers) on some of the files that
Erik or I are primary copyright holders on.
2006-09-22 02:52:41 +00:00
Mike Frysinger
8e640a1043 use vfork() instead of vork() since the only thing we do is execve() an app after fork (allows time to work on no-mmu) 2006-06-06 06:08:34 +00:00
Bernhard Reutner-Fischer
b1312c9125 - use bb_msg_write_error in 3 places
- whitespace
2006-06-03 20:09:02 +00:00
Bernhard Reutner-Fischer
c89982dcd7 - move #include busybox.h to the very top so we pull in the config
and eventual platform specific includes in early.
2006-06-03 19:49:21 +00:00
Rob Landley
299a6b4d7b Consolidate #include <sys/time.h> so libbb.h does it. 2006-05-27 21:42:58 +00:00
Rob Landley
dfba741457 Robert P. Day removed 8 gazillion occurrences of "extern" on function
definitions.  (That should only be on prototypes.)
2006-03-06 20:47:33 +00:00
Eric Andersen
c7bda1ce65 Remove trailing whitespace. Update copyright to include 2004. 2004-03-15 08:29:22 +00:00
Eric Andersen
2849209db2 Patch from Steven Scholz to send the output from 'time'
to stderr, rather than stdout, so that things like

~ # time bunzip2 -c /tmp/test.bz2 > /dev/null
real    0m 29.44s
user    0m 29.30s
sys     0m 0.12s

operate as expected.
2003-11-07 21:39:14 +00:00
Manuel Novoa III
cad5364599 Major coreutils update. 2003-03-19 09:13:01 +00:00
Eric Andersen
e4d2a43951 Doh. We divide microseconds by 60? 2002-09-30 19:37:48 +00:00
Eric Andersen
92052e3945 Bug fix from Nitin Gupta <gupta@equator.com> 2002-09-27 23:34:53 +00:00
Eric Andersen
c3657428d3 Add in a 'time' applet. Adds 4.5k.
-Erik
2001-11-30 07:54:32 +00:00