oweals/busybox.git
16 years agovi: introduce FEATURE_VI_8BIT (as vi currently is not Unicode capable,
Denis Vlasenko [Sat, 22 Dec 2007 17:00:11 +0000 (17:00 -0000)]
vi: introduce FEATURE_VI_8BIT (as vi currently is not Unicode capable,
people may want to disable display of high-bit chars)
ip: build fixlet

16 years agoperror_nomsg: don't print extra colon
Denis Vlasenko [Sat, 22 Dec 2007 15:44:23 +0000 (15:44 -0000)]
perror_nomsg: don't print extra colon
losetup: print name of loop device in error messages

16 years agovi: change MAX_LINELEN meaning: now it is the biggest supported
Denis Vlasenko [Sat, 22 Dec 2007 15:40:13 +0000 (15:40 -0000)]
vi: change MAX_LINELEN meaning: now it is the biggest supported
screen wigth. Introduce MAX_TABSTOP and MAX_INPUT_LEN. Fix redraw
of very long lines and cursor movement past NULs.

16 years agofix buglets found by randomconfig
Denis Vlasenko [Fri, 21 Dec 2007 22:18:16 +0000 (22:18 -0000)]
fix buglets found by randomconfig

16 years agovi: fix a problem with displaying overlong lines
Denis Vlasenko [Fri, 21 Dec 2007 21:34:37 +0000 (21:34 -0000)]
vi: fix a problem with displaying overlong lines

16 years agoudhcp: decided to not send "short" dhcp packets,
Denis Vlasenko [Fri, 21 Dec 2007 16:32:30 +0000 (16:32 -0000)]
udhcp: decided to not send "short" dhcp packets,
but lets add comments how to do it if needed.

16 years agoudhcp: fix oversized packet sending (introduced by "slack for bad dhcp servers" options);
Denis Vlasenko [Thu, 20 Dec 2007 21:11:38 +0000 (21:11 -0000)]
udhcp: fix oversized packet sending (introduced by "slack for bad dhcp servers" options);
slight optimizations and function renaming

udhcp_send_raw_packet                                  -     391    +391
udhcp_send_kernel_packet                               -     197    +197
udhcp_recv_packet                                      -     134    +134
get_raw_packet                                       353     326     -27
udhcp_get_packet                                     134       -    -134
udhcp_kernel_packet                                  197       -    -197
udhcp_raw_packet                                     391       -    -391
------------------------------------------------------------------------------
(add/remove: 3/3 grow/shrink: 0/1 up/down: 722/-749)          Total: -27 bytes

16 years agofdisk: reduce global data/bss usage. 8k data+bss build is achievable soon ;)
Denis Vlasenko [Sun, 16 Dec 2007 17:22:33 +0000 (17:22 -0000)]
fdisk: reduce global data/bss usage. 8k data+bss build is achievable soon ;)

(add/remove: 0/13 grow/shrink: 6/19 up/down: 74/-492)        Total: -418 bytes
   text    data     bss     dec     hex filename
 778330     860    7408  786598   c00a6 busybox_old
 777970     840    7376  786186   bff0a busybox_unstripped

16 years agomsh: reduce global data/bss usage
Denis Vlasenko [Sun, 16 Dec 2007 17:21:29 +0000 (17:21 -0000)]
msh: reduce global data/bss usage

(add/remove: 1/5 grow/shrink: 28/6 up/down: 464/-394)          Total: 70 bytes
   text    data     bss     dec     hex filename
 778077     908    7568  786553   c0079 busybox_old
 778330     860    7408  786598   c00a6 busybox_unstripped

16 years agoash: reduce global data/bss usage
Denis Vlasenko [Sun, 16 Dec 2007 17:20:38 +0000 (17:20 -0000)]
ash: reduce global data/bss usage

(add/remove: 4/29 grow/shrink: 76/21 up/down: 1007/-1713)    Total: -706 bytes
   text    data     bss     dec     hex filename
 777206    1084    8976  787266   c0342 busybox_old
 778077     908    7568  786553   c0079 busybox_unstripped

16 years agotraceroute: stop using global data/bss
Denis Vlasenko [Sun, 16 Dec 2007 17:19:40 +0000 (17:19 -0000)]
traceroute: stop using global data/bss

(add/remove: 0/15 grow/shrink: 0/1 up/down: 0/-95)            Total: -95 bytes
   text    data     bss     dec     hex filename
 777245    1094    9008  787347   c0393 busybox_old
 777206    1084    8976  787266   c0342 busybox_unstripped

16 years agoadd a link to vda's pet projects
Denis Vlasenko [Thu, 13 Dec 2007 00:15:50 +0000 (00:15 -0000)]
add a link to vda's pet projects

16 years agonum conversions: allow for leading '+' (renice needs that)
Denis Vlasenko [Tue, 11 Dec 2007 13:15:11 +0000 (13:15 -0000)]
num conversions: allow for leading '+' (renice needs that)

16 years agocttyhack: add missing ';'
Denis Vlasenko [Mon, 10 Dec 2007 08:40:29 +0000 (08:40 -0000)]
cttyhack: add missing ';'
init: remove pointless access() check

16 years agoinit: remove superfluous forks and messing up with argv[0]
Denis Vlasenko [Mon, 10 Dec 2007 07:06:04 +0000 (07:06 -0000)]
init: remove superfluous forks and messing up with argv[0]
cttyhack: add stealing of ctty

16 years agoudhcpc: support for -O <option>.
Denis Vlasenko [Mon, 10 Dec 2007 07:03:38 +0000 (07:03 -0000)]
udhcpc: support for -O <option>.
Two important notes:
* nissrv and nisdomain are not requested by default anymore!
* inconsistency between "XXXsvr" and "XXsrv" in option names resolved,
  all are "XXXsrv" now.

function                                             old     new   delta
udhcpc_main                                         2494    2600    +106
packed_usage                                       23023   23067     +44
add_requests                                          91     119     +28
static.udhcpc_longopts                               209     226     +17
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 4/0 up/down: 195/0)             Total: 195 bytes

16 years agofind: add -iname support (Alexander Griesser <alexander.griesser@lkh-vil.or.at>)
Denis Vlasenko [Sun, 9 Dec 2007 10:07:39 +0000 (10:07 -0000)]
find: add -iname support (Alexander Griesser <alexander.griesser@lkh-vil.or.at>)

16 years agolineedit: don't violate API if we do simple fgets
Denis Vlasenko [Sun, 9 Dec 2007 10:03:28 +0000 (10:03 -0000)]
lineedit: don't violate API if we do simple fgets
ash: cosmetic style fixes, no code changes

16 years agovi: don't use common_bufsiz as read buffer, it can be too small
Denis Vlasenko [Sun, 9 Dec 2007 04:13:43 +0000 (04:13 -0000)]
vi: don't use common_bufsiz as read buffer, it can be too small
(found by Cristian Ionescu-Idbohrn <cristian.ionescu-idbohrn@axis.com>)

16 years agosignal names hack was wrong, it broke "get signal name" function.
Denis Vlasenko [Tue, 4 Dec 2007 21:44:52 +0000 (21:44 -0000)]
signal names hack was wrong, it broke "get signal name" function.
Reverting :(

16 years agogetty: a small code shrink
Denis Vlasenko [Tue, 4 Dec 2007 18:46:01 +0000 (18:46 -0000)]
getty: a small code shrink

touch                                                  -      40     +40
fakehost                                               4       -      -4
getty_main                                          2546    2493     -53

16 years agoMake signal table a bit smaller
Denis Vlasenko [Tue, 4 Dec 2007 10:20:48 +0000 (10:20 -0000)]
Make signal table a bit smaller

get_signum                                           136     151     +15
signals                                              224     192     -32

16 years agoguard against SIGxxx >= 32 (no code changes on i386)
Denis Vlasenko [Tue, 4 Dec 2007 10:05:28 +0000 (10:05 -0000)]
guard against SIGxxx >= 32 (no code changes on i386)

16 years agogetty: don't accept ancient '#' and '@' as backspace/kill line,
Denis Vlasenko [Tue, 4 Dec 2007 09:48:40 +0000 (09:48 -0000)]
getty: don't accept ancient '#' and '@' as backspace/kill line,
it only confuses people.
(Alexander Griesser <alexander.griesser@lkh-vil.or.at> (LKH Villach))
various other cleanups.

function                                             old     new   delta
getty_main                                          2526    2546     +20
static.baud_index                                      4       -      -4
parse_speeds                                          91       -     -91
------------------------------------------------------------------------------
(add/remove: 0/2 grow/shrink: 1/0 up/down: 20/-95)            Total: -75 bytes
   text    data     bss     dec     hex filename
 773152    1086    9008  783246   bf38e busybox_old
 773081    1086    9008  783175   bf347 busybox_unstripped

16 years agolineedit: reduce stack usage
Denis Vlasenko [Mon, 3 Dec 2007 10:45:14 +0000 (10:45 -0000)]
lineedit: reduce stack usage
netstat: reduce stack usage; fix handling of NULs in unix socket filenames

static.has_inode                                       1       -      -1
do_info                                              119     116      -3
deinit_S                                              60      51      -9
unix_do_one                                          578     451    -127
parse_and_put_prompt                                 966     825    -141
------------------------------------------------------------------------------
(add/remove: 0/1 grow/shrink: 0/4 up/down: 0/-281)           Total: -281 bytes

16 years agofix whitespace damage
Denis Vlasenko [Sun, 2 Dec 2007 08:56:53 +0000 (08:56 -0000)]
fix whitespace damage

16 years agomkfs.minix: add testsuite; disable code which makes images variable
Denis Vlasenko [Sun, 2 Dec 2007 08:55:34 +0000 (08:55 -0000)]
mkfs.minix: add testsuite; disable code which makes images variable

16 years agoattack the biggest stack users:
Denis Vlasenko [Sun, 2 Dec 2007 08:35:37 +0000 (08:35 -0000)]
attack the biggest stack users:
-mkfs_minix_main [busybox_unstripped]:                  4288
-mkfs_minix_main [busybox_unstripped]:                  4276
-grave [busybox_unstripped]:                            4260
(bzip2 users too - not listed)

price we pay in code size increase:
mainSort                                            2458    2515     +57
grave                                               1005    1058     +53
sendMTFValues                                       2177    2195     +18
BZ2_blockSort                                        122     125      +3
mkfs_minix_main                                     3070    3022     -48
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 4/1 up/down: 131/-48)            Total: 83 bytes

16 years agoexplain why we use mmap instead of malloc
Denis Vlasenko [Sun, 2 Dec 2007 07:18:29 +0000 (07:18 -0000)]
explain why we use mmap instead of malloc

16 years agolibnetlink: comment out unused code; don't use 8k stack buffers
Denis Vlasenko [Sun, 2 Dec 2007 06:30:57 +0000 (06:30 -0000)]
libnetlink: comment out unused code; don't use 8k stack buffers

function                                             old     new   delta
ipaddr_modify                                       1305    1297      -8
do_iprule                                            963     955      -8
do_iproute                                          2193    2169     -24
xrtnl_dump_filter                                    418     391     -27
rtnl_talk                                            671     536    -135
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 0/5 up/down: 0/-202)           Total: -202 bytes

16 years agoFix minor discrepancy in "make help"
Denis Vlasenko [Sun, 2 Dec 2007 05:36:37 +0000 (05:36 -0000)]
Fix minor discrepancy in "make help"

16 years agoIntroduce FEATURE_COPYBUF_KB.
Denis Vlasenko [Sun, 2 Dec 2007 03:27:42 +0000 (03:27 -0000)]
Introduce FEATURE_COPYBUF_KB.
People who want smaller stack at any cost may use it
to reduce cp's stack usage (FEATURE_COPYBUF_KB=1).
Desktop people may get faster copy of big files
(FEATURE_COPYBUF_KB=32 is ~30% faster than 4kb)

16 years agodd: fix a bug where we don't report write errors
Denis Vlasenko [Sun, 2 Dec 2007 01:44:42 +0000 (01:44 -0000)]
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

16 years agodd: add testsuite entry for write errors
Denis Vlasenko [Sun, 2 Dec 2007 01:43:18 +0000 (01:43 -0000)]
dd: add testsuite entry for write errors

17 years agotest: stop using lots of bss.
Denis Vlasenko [Fri, 30 Nov 2007 07:29:05 +0000 (07:29 -0000)]
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

17 years agodhcp: heed TODO item - divorced options from their string descriptions
Denis Vlasenko [Thu, 29 Nov 2007 08:17:45 +0000 (08:17 -0000)]
dhcp: heed TODO item - divorced options from their string descriptions
code shrink while at it.

function                                             old     new   delta
dhcp_option_strings                                    -     258    +258
udhcp_run_script                                    1135    1174     +39
dhcp_option_lengths                                    -      11     +11
udhcp_add_simple_option                               93      92      -1
packet_num                                             4       -      -4
read_opt                                             746     739      -7
udhcp_option_lengths                                  11       -     -11
udhcpc_main                                         2590    2494     -96
dhcp_options                                         490      70    -420
------------------------------------------------------------------------------
(add/remove: 2/2 grow/shrink: 1/4 up/down: 308/-539)         Total: -231 bytes
   text    data     bss     dec     hex filename
 775309     929    9100  785338   bfbba busybox_old
 775098     929    9084  785111   bfad7 busybox_unstripped

17 years agosysctl: add -e: supress warnings about invalid key (Jeremy Kerr <jk@ozlabs.org>)
Denis Vlasenko [Thu, 29 Nov 2007 06:40:28 +0000 (06:40 -0000)]
sysctl: add -e: supress warnings about invalid key (Jeremy Kerr <jk@ozlabs.org>)
code shrink:

   text    data     bss     dec     hex filename
 775565     929    9100  785594   bfcba busybox_old
 775296     929    9100  785325   bfbad busybox_unstripped

17 years agoFurther optimize applet tables; prettify build output
Denis Vlasenko [Thu, 29 Nov 2007 03:31:20 +0000 (03:31 -0000)]
Further optimize applet tables; prettify build output

   text    data     bss     dec     hex filename
 775923     929    9100  785952   bfe20 busybox_old
 775565     929    9100  785594   bfcba busybox_unstripped

17 years agotouch: accept and ignore -f
Denis Vlasenko [Wed, 28 Nov 2007 19:25:32 +0000 (19:25 -0000)]
touch: accept and ignore -f

17 years agodhcpc: let server know we don't like oversized packets.
Denis Vlasenko [Wed, 28 Nov 2007 19:23:12 +0000 (19:23 -0000)]
dhcpc: let server know we don't like oversized packets.
add TODO comment

17 years agoforgotten part of previous commit
Denis Vlasenko [Wed, 28 Nov 2007 06:49:42 +0000 (06:49 -0000)]
forgotten part of previous commit

17 years agoreorganize applet table. Eliminates pointers to names.
Denis Vlasenko [Wed, 28 Nov 2007 06:49:03 +0000 (06:49 -0000)]
reorganize applet table. Eliminates pointers to names.
Should be a big win for libbusybox. busybox wins too:

   text    data     bss     dec     hex filename
 776524     929    9100  786553   c0079 busybox_old
 775903     929    9100  785932   bfe0c busybox_unstripped

17 years agoip route: add comment, no code changes
Denis Vlasenko [Tue, 27 Nov 2007 09:42:33 +0000 (09:42 -0000)]
ip route: add comment, no code changes

17 years agoiproute: fix a bug where "ip r flush table main" was rejected,
Denis Vlasenko [Mon, 26 Nov 2007 18:29:52 +0000 (18:29 -0000)]
iproute: fix a bug where "ip r flush table main" was rejected,
add "ip r flush cache" (however I'm unsure it is really valid syntax)
Add a few comments and stop mixing params and params' keywords.

17 years agofix vda's testsuite bogons, part 2
Denis Vlasenko [Mon, 26 Nov 2007 07:23:27 +0000 (07:23 -0000)]
fix vda's testsuite bogons, part 2

17 years agofix vda's testsuite bogons, part 1
Denis Vlasenko [Mon, 26 Nov 2007 07:23:09 +0000 (07:23 -0000)]
fix vda's testsuite bogons, part 1

17 years agotestsuite: add tests for cut and grep;
Denis Vlasenko [Mon, 26 Nov 2007 05:38:20 +0000 (05:38 -0000)]
testsuite: add tests for cut and grep;
slight improvements to infrastructure

17 years agoash: make code simpler, and do not do close(-1) - it's rude
Denis Vlasenko [Mon, 26 Nov 2007 05:37:07 +0000 (05:37 -0000)]
ash: make code simpler, and do not do close(-1) - it's rude

17 years agozcip: simplify code a bit
Denis Vlasenko [Sun, 25 Nov 2007 12:53:25 +0000 (12:53 -0000)]
zcip: simplify code a bit

17 years agozcip: use low-order 4 bytes of MAC as random seed, not 4 high-order
Denis Vlasenko [Sun, 25 Nov 2007 12:40:56 +0000 (12:40 -0000)]
zcip: use low-order 4 bytes of MAC as random seed, not 4 high-order
arping: fix wrong roundtrip calculation
arping,zcip: cleanups and code shrink

run                                                  389     402     +13
arp                                                  195     188      -7
zcip_main                                           1524    1495     -29
arping_main                                         1874    1823     -51
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 1/3 up/down: 13/-87)            Total: -74 bytes
   text    data     bss     dec     hex filename
 776587     929    9100  786616   c00b8 busybox_old
 776499     929    9100  786528   c0060 busybox_unstripped

17 years agocttyhack should be in /bin, not /usr/bin
Denis Vlasenko [Sun, 25 Nov 2007 07:58:42 +0000 (07:58 -0000)]
cttyhack should be in /bin, not /usr/bin

17 years agowhich: fix testsuite failure
Denis Vlasenko [Sun, 25 Nov 2007 04:54:13 +0000 (04:54 -0000)]
which: fix testsuite failure
pidof: do not output empty line if nothing found
testsuite: disable false positive

17 years agodhcpc: cope with buggy DHCP servers which send oversized packets
Denis Vlasenko [Sun, 25 Nov 2007 03:15:24 +0000 (03:15 -0000)]
dhcpc: cope with buggy DHCP servers which send oversized packets
(Cristian Ionescu-Idbohrn <cristian.ionescu-idbohrn@axis.com>)

17 years agoAnnounce 1.8.2 and 1.7.4
Denis Vlasenko [Sat, 24 Nov 2007 04:49:07 +0000 (04:49 -0000)]
Announce 1.8.2 and 1.7.4

17 years agostty: reorganize data tables - save 0.5k
Denis Vlasenko [Sat, 24 Nov 2007 04:32:49 +0000 (04:32 -0000)]
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

17 years agoremove echo_main -> bb_echo indirection
Denis Vlasenko [Sat, 24 Nov 2007 02:23:51 +0000 (02:23 -0000)]
remove echo_main -> bb_echo indirection

17 years agohush: fix segfault in "echo $@" when we have no arguments
Denis Vlasenko [Sat, 24 Nov 2007 00:22:42 +0000 (00:22 -0000)]
hush: fix segfault in "echo $@" when we have no arguments

17 years agofix buglets found by randomconfig
Denis Vlasenko [Fri, 23 Nov 2007 23:39:01 +0000 (23:39 -0000)]
fix buglets found by randomconfig

17 years agoupdate defconfig
Denis Vlasenko [Fri, 23 Nov 2007 23:37:19 +0000 (23:37 -0000)]
update defconfig

17 years agokill lash. "lash" builtin still exists, but it runs hush.
Denis Vlasenko [Fri, 23 Nov 2007 23:28:55 +0000 (23:28 -0000)]
kill lash. "lash" builtin still exists, but it runs hush.

17 years agoAdd an RFC for future ipv6 ftp work
Denis Vlasenko [Fri, 23 Nov 2007 21:43:40 +0000 (21:43 -0000)]
Add an RFC for future ipv6 ftp work

17 years agohush: implement echo builtin
Denis Vlasenko [Fri, 23 Nov 2007 21:20:21 +0000 (21:20 -0000)]
hush: implement echo builtin

builtin_echo                                           -      36     +36
bltins                                               384     396     +12
------------------------------------------------------------------------------
(add/remove: 1/0 grow/shrink: 1/0 up/down: 48/0)               Total: 48 bytes

17 years agohush: fix $ expansion in redirections, add testcase for that
Denis Vlasenko [Fri, 23 Nov 2007 21:08:38 +0000 (21:08 -0000)]
hush: fix $ expansion in redirections, add testcase for that

17 years agohush: implement test builtin
Denis Vlasenko [Fri, 23 Nov 2007 13:11:42 +0000 (13:11 -0000)]
hush: implement test builtin

17 years agohush: plug memory leak
Denis Vlasenko [Fri, 23 Nov 2007 12:50:54 +0000 (12:50 -0000)]
hush: plug memory leak

17 years agoarping: fix help text (-i -> -I), and shorten it a bit
Denis Vlasenko [Fri, 23 Nov 2007 09:27:05 +0000 (09:27 -0000)]
arping: fix help text (-i -> -I), and shorten it a bit

17 years agoarping: fix a bug where there is implicit count of 4G;
Denis Vlasenko [Fri, 23 Nov 2007 09:15:26 +0000 (09:15 -0000)]
arping: fix a bug where there is implicit count of 4G;
eliminate data/bss usage; code shrink

function                                             old     new   delta
timeout_us                                             4       -      -4
static.start                                           4       -      -4
src                                                    4       -      -4
sock                                                   4       -      -4
sent                                                   4       -      -4
req_recv                                               4       -      -4
received                                               4       -      -4
last                                                   4       -      -4
dst                                                    4       -      -4
count                                                  4       -      -4
brd_sent                                               4       -      -4
brd_recv                                               4       -      -4
catcher                                              375     365     -10
me                                                    20       -     -20
he                                                    20       -     -20
arping_main                                         1941    1874     -67
------------------------------------------------------------------------------
(add/remove: 0/14 grow/shrink: 0/2 up/down: 0/-165)          Total: -165 bytes
   text    data     bss     dec     hex filename
 783035     941    9244  793220   c1a84 busybox_old
 782907     937    9156  793000   c19a8 busybox_unstripped

17 years agocut: add proper stdout error handling, fix "-" handling;
Denis Vlasenko [Fri, 23 Nov 2007 07:26:15 +0000 (07:26 -0000)]
cut: add proper stdout error handling, fix "-" handling;
modest code shrink

17 years agologread: add forgotten INIT_G();
Denis Vlasenko [Fri, 23 Nov 2007 03:41:20 +0000 (03:41 -0000)]
logread: add forgotten INIT_G();

17 years agologread: eliminate usage of data/bss
Denis Vlasenko [Fri, 23 Nov 2007 03:39:45 +0000 (03:39 -0000)]
logread: eliminate usage of data/bss
ifup: don't remove virtual iface prefixes (eth0:0)

function                                             old     new   delta
shbuf                                                  4       -      -4
SMrup                                                  6       -      -6
SMrdn                                                 12       -     -12
static.label_buf                                      20       4     -16
get_var                                              158     140     -18
------------------------------------------------------------------------------
(add/remove: 0/3 grow/shrink: 0/2 up/down: 0/-56)             Total: -56 bytes
   text    data     bss     dec     hex filename
 783501     962    9260  793723   c1c7b busybox_old
 783483     942    9244  793669   c1c45 busybox_unstripped

17 years agodhcp: stop using magic constants; use (htonl(CONST) != a) - it's smaller
Denis Vlasenko [Fri, 23 Nov 2007 00:08:54 +0000 (00:08 -0000)]
dhcp: stop using magic constants; use (htonl(CONST) != a) - it's smaller

function                                             old     new   delta
udhcp_get_packet                                     146     134     -12
get_raw_packet                                       368     353     -15

17 years agoudhcpc: remove -W option, -A can be reused for that
Denis Vlasenko [Thu, 22 Nov 2007 21:41:14 +0000 (21:41 -0000)]
udhcpc: remove -W option, -A can be reused for that
help texts: trimmed a bit

static.udhcpc_longopts                               227     209     -18
udhcpc_main                                         2633    2590     -43
packed_usage                                       22927   22871     -56
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 0/3 up/down: 0/-117)           Total: -117 bytes

17 years agofix a thinko in build system
Denis Vlasenko [Thu, 22 Nov 2007 20:09:41 +0000 (20:09 -0000)]
fix a thinko in build system

17 years agoash: fix bug where redirection of closed fd was leaving it open afterwards.
Denis Vlasenko [Thu, 22 Nov 2007 08:16:57 +0000 (08:16 -0000)]
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

17 years agosestatus: new SELinux applet (KaiGai Kohei <kaigai@ak.jp.nec.com>)
Denis Vlasenko [Thu, 22 Nov 2007 01:10:41 +0000 (01:10 -0000)]
sestatus: new SELinux applet (KaiGai Kohei <kaigai@ak.jp.nec.com>)

17 years agodhcpc: cleanup and comments; fix buggy timeout handling in corner cases.
Denis Vlasenko [Thu, 22 Nov 2007 01:00:00 +0000 (01:00 -0000)]
dhcpc: cleanup and comments; fix buggy timeout handling in corner cases.
-25 bytes.

17 years agoudhcpc: an option to perform ARP check (Jonas Danielsson <jonas.danielsson@axis.com>)
Denis Vlasenko [Thu, 22 Nov 2007 00:58:49 +0000 (00:58 -0000)]
udhcpc: an option to perform ARP check (Jonas Danielsson <jonas.danielsson@axis.com>)
configurable, ~+300 bytes when on.

17 years agocleanup comments and coding style and rewrite the mdev.conf parser to use common...
Mike Frysinger [Mon, 19 Nov 2007 09:04:22 +0000 (09:04 -0000)]
cleanup comments and coding style and rewrite the mdev.conf parser to use common busybox functions and call strdup() less often ... saves a ~few hundred bytes

17 years agoip: stop propagating argc; optimize ip_parse_common_args
Denis Vlasenko [Sun, 18 Nov 2007 22:56:25 +0000 (22:56 -0000)]
ip: stop propagating argc; optimize ip_parse_common_args

function                                             old     new   delta
find_pair                                            167     187     +20
static.families                                        -      17     +17
die_must_be_on_off                                     -      11     +11
...
on_off                                                33      22     -11
do_ipaddr                                            103      90     -13
do_iptunnel                                         1001     986     -15
iproute_list_or_flush                               1237    1217     -20
static.ip_common_commands                             43      22     -21
do_iproute                                          2217    2193     -24
parse_args                                          1444    1414     -30
ip_do                                                 47      16     -31
do_iprule                                            994     963     -31
ip_main                                              153     113     -40
ipaddr_modify                                       1357    1305     -52
ipaddr_list_or_flush                                2543    2490     -53
ip_parse_common_args                                 294     159    -135
------------------------------------------------------------------------------
(add/remove: 4/1 grow/shrink: 4/24 up/down: 85/-563)         Total: -478 bytes
   text    data     bss     dec     hex filename
 775561     966    9236  785763   bfd63 busybox_old
 775073     962    9236  785271   bfb77 busybox_unstripped

17 years agostty: mark variable as static
Denis Vlasenko [Sun, 18 Nov 2007 11:47:25 +0000 (11:47 -0000)]
stty: mark variable as static

17 years agomake output a little more friendly
Mike Frysinger [Sun, 18 Nov 2007 06:42:56 +0000 (06:42 -0000)]
make output a little more friendly

17 years agomerge from upstream for systems that dont integrate libintl into their C library:
Mike Frysinger [Sun, 18 Nov 2007 06:17:52 +0000 (06:17 -0000)]
merge from upstream for systems that dont integrate libintl into their C library:

commit aa1e5ef5c1d95e7ebf0821d9ba27debe43a87a22
Author: Sam Ravnborg <sam@ravnborg.org>
Date:   Sun Aug 12 23:15:44 2007 +0200

    kbuild: check if we can link gettext not just compile

    cygwin provides the header file but the lib file needs
    to be added manually. A generic fix is to check if
    we can compile and link a program that uses gettext()
    and if it fails fall back to NO_NLS.

    International users of cygwin may have to specify
    HOST_LOADLIBES := "-lintl" on the make command line.

Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
17 years agoexported symbols may be weak, so allow symbols marked as W
Mike Frysinger [Sun, 18 Nov 2007 06:13:58 +0000 (06:13 -0000)]
exported symbols may be weak, so allow symbols marked as W

17 years agosyslogd: use DEV_CONSOLE consistently
Denis Vlasenko [Sun, 18 Nov 2007 05:43:05 +0000 (05:43 -0000)]
syslogd: use DEV_CONSOLE consistently
init: remove obsolete comment

17 years agohexdump: add hd alias, add -R option
Denis Vlasenko [Sun, 18 Nov 2007 05:36:50 +0000 (05:36 -0000)]
hexdump: add hd alias, add -R option

17 years agoadd comment clarifying busybox's use of non-standard tar header
Paul Fox [Sat, 17 Nov 2007 19:11:05 +0000 (19:11 -0000)]
add comment clarifying busybox's use of non-standard tar header

17 years agotar: fix a case where glibc detects bogus buffer overrun
Denis Vlasenko [Fri, 16 Nov 2007 20:35:30 +0000 (20:35 -0000)]
tar: fix a case where glibc detects bogus buffer overrun
     which is not really there!

17 years agodmesg,klogd: make code more readable
Denis Vlasenko [Fri, 16 Nov 2007 20:18:54 +0000 (20:18 -0000)]
dmesg,klogd: make code more readable
libbb: explain why we declare klogctl
libbb: move defs around so that order makes more sense

17 years ago- use standard-imposed constants some more
Bernhard Reutner-Fischer [Fri, 16 Nov 2007 12:39:16 +0000 (12:39 -0000)]
- use standard-imposed constants some more

17 years ago- remove most of the forward declarations. No obj-code changes.
Bernhard Reutner-Fischer [Fri, 16 Nov 2007 12:20:30 +0000 (12:20 -0000)]
- remove most of the forward declarations. No obj-code changes.

17 years ago- add note about SUSv3 missing options.
Bernhard Reutner-Fischer [Fri, 16 Nov 2007 11:52:42 +0000 (11:52 -0000)]
- add note about SUSv3 missing options.

17 years agowho: add -a (by Tito)
Denis Vlasenko [Fri, 16 Nov 2007 05:24:43 +0000 (05:24 -0000)]
who: add -a (by Tito)

17 years agolash: fix compile-time warning
Denis Vlasenko [Thu, 15 Nov 2007 17:47:45 +0000 (17:47 -0000)]
lash: fix compile-time warning

17 years agodf: add -a
Denis Vlasenko [Thu, 15 Nov 2007 09:02:12 +0000 (09:02 -0000)]
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

17 years agodf: add -i (conditional on CONFIG)
Denis Vlasenko [Thu, 15 Nov 2007 07:02:55 +0000 (07:02 -0000)]
df: add -i (conditional on CONFIG)
uasge: trim a bit

17 years agocosmetic change in message text
Denis Vlasenko [Thu, 15 Nov 2007 00:57:40 +0000 (00:57 -0000)]
cosmetic change in message text

17 years agobad syntax error should go to stderr
Paul Fox [Wed, 14 Nov 2007 23:48:35 +0000 (23:48 -0000)]
bad syntax error should go to stderr

17 years agoIntroduce FEATURE_PREFER_IPV4_ADDRESS. If selected, we have:
Denis Vlasenko [Wed, 14 Nov 2007 10:18:33 +0000 (10:18 -0000)]
Introduce FEATURE_PREFER_IPV4_ADDRESS. If selected, we have:
function                                             old     new   delta
str2sockaddr                                         328     344     +16

17 years agotr: more of code shrink (getopt32-ification)
Denis Vlasenko [Tue, 13 Nov 2007 22:23:57 +0000 (22:23 -0000)]
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

17 years agotr: better comments, small code shrink
Denis Vlasenko [Tue, 13 Nov 2007 22:22:29 +0000 (22:22 -0000)]
tr: better comments, small code shrink

function                                             old     new   delta
expand                                              2232    2230      -2
tr_main                                              677     655     -22