oweals/busybox.git
13 years agoash/hush: shrink help text
Denys Vlasenko [Tue, 8 Mar 2011 09:24:17 +0000 (10:24 +0100)]
ash/hush: shrink help text

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
13 years agoftpd: better usage text
Denys Vlasenko [Tue, 8 Mar 2011 02:01:10 +0000 (03:01 +0100)]
ftpd: better usage text

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
13 years agokill: fix infinite loop when passed PIDs are not valid numbers
Pere Orga [Mon, 7 Mar 2011 15:22:17 +0000 (16:22 +0100)]
kill: fix infinite loop when passed PIDs are not valid numbers

Signed-off-by: Pere Orga <gotrunks@gmail.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
13 years agoremove stray empty line
Denys Vlasenko [Mon, 7 Mar 2011 12:12:01 +0000 (13:12 +0100)]
remove stray empty line

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
13 years agoash/hush: provide help text
Denys Vlasenko [Mon, 7 Mar 2011 11:34:59 +0000 (12:34 +0100)]
ash/hush: provide help text

$ ./busybox ash --help
BusyBox v1.19.0.git (2011-03-07 11:25:29 CET) multi-call binary.

Usage: ash [-/+OPTCHARS] [-/+o OPTNAME]... [-c 'SCRIPT' [ARG0 [ARGS]] / SCRIPT_FILE [ARGS]]

Unix shell interpreter

$ ./busybox hush --help
BusyBox v1.19.0.git (2011-03-07 11:25:29 CET) multi-call binary.

Usage: hush [-nx] [-c 'SCRIPT' [ARG0 [ARGS]] / SCRIPT_FILE [ARGS]]

Unix shell interpreter

function                                             old     new   delta
packed_usage                                       28163   28212     +49
setcmd                                                85      78      -7
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 1/1 up/down: 49/-7)              Total: 42 bytes

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
13 years agoash: fix execution of shell scripts without shebang
Denys Vlasenko [Mon, 7 Mar 2011 11:02:40 +0000 (12:02 +0100)]
ash: fix execution of shell scripts without shebang

We were assuming #!/bin/sh, whereas we had to simply re-enter ash.

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
13 years agoklogd: fix the problem of delayed handling of ^C and SIGTERM
Denys Vlasenko [Mon, 7 Mar 2011 09:57:26 +0000 (10:57 +0100)]
klogd: fix the problem of delayed handling of ^C and SIGTERM

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
13 years agoudhcpc: add -B option
Keith Young [Mon, 7 Mar 2011 02:18:46 +0000 (03:18 +0100)]
udhcpc: add -B option

function                                             old     new   delta
udhcpc_longopts                                        -     262    +262
add_client_options                                   218     239     +21
packed_usage                                       28149   28163     +14
static.udhcpc_longopts                               250       -    -250
------------------------------------------------------------------------------
(add/remove: 1/1 grow/shrink: 2/0 up/down: 297/-250)           Total: 47 bytes

Signed-off-by: Keith Young <stripydog7@gmail.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
13 years agomore: fix tabs handling
Denys Vlasenko [Mon, 7 Mar 2011 01:01:52 +0000 (02:01 +0100)]
more: fix tabs handling

function                                             old     new   delta
more_main                                            837     829      -8

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
13 years agofix bit rot in scripts/Makefile.IMA #2
Denys Vlasenko [Sun, 6 Mar 2011 22:48:24 +0000 (23:48 +0100)]
fix bit rot in scripts/Makefile.IMA #2

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
13 years agofix bit rot in scripts/Makefile.IMA
Denys Vlasenko [Sun, 6 Mar 2011 22:09:42 +0000 (23:09 +0100)]
fix bit rot in scripts/Makefile.IMA

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
13 years ago.gitignore: add missing ignores
Bjørn Forsman [Thu, 3 Mar 2011 08:55:19 +0000 (09:55 +0100)]
.gitignore: add missing ignores

Ignore output files created by "make defconfig; make".

Signed-off-by: Bjørn Forsman <bjorn.forsman@gmail.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
13 years agonameif: add matching by phy_address=NUM; extend help text
Phil Sutter [Sun, 6 Mar 2011 18:42:51 +0000 (19:42 +0100)]
nameif: add matching by phy_address=NUM; extend help text

function                                             old     new   delta
nameif_main                                          618     686     +68
packed_usage                                       28095   28149     +54
prepend_new_eth_table                                295     338     +43
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 3/0 up/down: 165/0)             Total: 165 bytes

Signed-off-by: Phil Sutter <phil.sutter@viprinet.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
13 years agonameif: fix parsing of /proc/net/dev; small code shrink
Phil Sutter [Sun, 6 Mar 2011 18:15:30 +0000 (19:15 +0100)]
nameif: fix parsing of /proc/net/dev; small code shrink

function                                             old     new   delta
nameif_main                                          628     618     -10

Signed-off-by: Phil Sutter <phil.sutter@viprinet.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
13 years agolibbb/login/su: do not sanitize shell name twice
Denys Vlasenko [Sun, 6 Mar 2011 17:49:40 +0000 (18:49 +0100)]
libbb/login/su: do not sanitize shell name twice

function                                             old     new   delta
setup_environment                                    191     205     +14
login_main                                          1002     987     -15
su_main                                              474     458     -16
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 1/2 up/down: 14/-31)            Total: -17 bytes

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
13 years agotr: free allocated memory in tr if CLEANUP enabled
Alexey Soloviev [Sun, 6 Mar 2011 17:21:07 +0000 (18:21 +0100)]
tr: free allocated memory in tr if CLEANUP enabled

Signed-off-by: Alexey Soloviev <EXT-Alexey.Soloviev@nokia.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
13 years agoimprove --install operation in chroot jails
Denys Vlasenko [Sun, 6 Mar 2011 05:02:31 +0000 (06:02 +0100)]
improve --install operation in chroot jails

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
13 years agoxargs: support --no-run-if-empty (synonym to -r)
Denys Vlasenko [Thu, 3 Mar 2011 08:51:57 +0000 (09:51 +0100)]
xargs: support --no-run-if-empty (synonym to -r)

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
13 years agodon't leak malloced variables in the loop; remove double alloc
Alexey Fomenko [Wed, 2 Mar 2011 03:13:21 +0000 (04:13 +0100)]
don't leak malloced variables in the loop; remove double alloc

Signed-off-by: Alexey Fomenko <ext-alexey.fomenko@nokia.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
13 years agoconvert "do {...} while (1);" -> "while (1) {...}"
Denys Vlasenko [Wed, 2 Mar 2011 03:07:14 +0000 (04:07 +0100)]
convert "do {...} while (1);" -> "while (1) {...}"

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
13 years agoadd missing fclose's
Alexey Fomenko [Wed, 2 Mar 2011 03:01:24 +0000 (04:01 +0100)]
add missing fclose's

Signed-off-by: Alexey Fomenko <ext-alexey.fomenko@nokia.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
13 years agotar: skip leading / and handle names like abc/..////def -> def (not ///def)
Denys Vlasenko [Wed, 2 Mar 2011 00:21:02 +0000 (01:21 +0100)]
tar: skip leading / and handle names like abc/..////def -> def (not ///def)

function                                             old     new   delta
strip_unsafe_prefix                                    -     105    +105
writeFileToTarball                                   557     520     -37
get_header_tar                                      1545    1462     -83

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
13 years agolibbb: remove dead code in getopt32. -7 bytes
Alexey Fomenko [Tue, 1 Mar 2011 18:25:49 +0000 (19:25 +0100)]
libbb: remove dead code in getopt32. -7 bytes

Signed-off-by: Alexey Fomenko <ext-alexey.fomenko@nokia.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
13 years agotar: on extract, everything up to and including last ".." is stripped
Denys Vlasenko [Tue, 1 Mar 2011 16:21:07 +0000 (17:21 +0100)]
tar: on extract, everything up to and including last ".." is stripped

function                                             old     new   delta
get_header_tar                                      1493    1545     +52

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
13 years agolibbb: make user/group name cache strings longer (~27 chars)
Denys Vlasenko [Tue, 1 Mar 2011 15:27:13 +0000 (16:27 +0100)]
libbb: make user/group name cache strings longer (~27 chars)

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
13 years agols: widen -s (1k blocks) column from 4 to 6
Denys Vlasenko [Tue, 1 Mar 2011 04:37:41 +0000 (05:37 +0100)]
ls: widen -s (1k blocks) column from 4 to 6

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
13 years agols: -g implies -l
Denys Vlasenko [Mon, 28 Feb 2011 11:38:08 +0000 (12:38 +0100)]
ls: -g implies -l

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
13 years agols: fix bits for -T, -w and --color; make -n imply -l; fix comments
Denys Vlasenko [Mon, 28 Feb 2011 11:16:10 +0000 (12:16 +0100)]
ls: fix bits for -T, -w and --color; make -n imply -l; fix comments

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
13 years agomount: strip multiple trailing slashes, not just one
Denys Vlasenko [Mon, 28 Feb 2011 10:09:49 +0000 (11:09 +0100)]
mount: strip multiple trailing slashes, not just one

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
13 years agomount: update /etc/mtab properly on mount --move
Roman Borisov [Mon, 28 Feb 2011 04:06:01 +0000 (05:06 +0100)]
mount: update /etc/mtab properly on mount --move

Signed-off-by: Roman Borisov <ext-roman.borisov@nokia.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
13 years agowhois: new applet
Pere Orga [Sun, 27 Feb 2011 22:38:52 +0000 (23:38 +0100)]
whois: new applet

function                                             old     new   delta
whois_main                                             -     118    +118
pipe_out                                               -      80     +80
packed_usage                                       28084   28095     +11
applet_names                                        2385    2391      +6
applet_main                                         1388    1392      +4
applet_nameofs                                       694     696      +2
------------------------------------------------------------------------------
(add/remove: 3/0 grow/shrink: 4/0 up/down: 221/0)             Total: 221 bytes

Signed-off-by: Pere Orga <gotrunks@gmail.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
13 years agoshowkey: make showkey -a work on any stdin
Harald Becker [Sun, 27 Feb 2011 06:16:44 +0000 (07:16 +0100)]
showkey: make showkey -a work on any stdin

function                                             old     new   delta
showkey_main                                         496     513     +17

Signed-off-by: Harald Becker <ralda@gmx.de>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
13 years agols: fix one-bit-off which caused -H to behave as -h
Denys Vlasenko [Sun, 27 Feb 2011 03:10:00 +0000 (04:10 +0100)]
ls: fix one-bit-off which caused -H to behave as -h

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
13 years agoadduser: use better argv passing to addgroup
Denys Vlasenko [Sun, 27 Feb 2011 03:03:27 +0000 (04:03 +0100)]
adduser: use better argv passing to addgroup

function                                             old     new   delta
adduser_main                                         855     882     +27

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
13 years agoReplace "depends on PLATFORM_LINUX" with "select PLATFORM_LINUX"
Denys Vlasenko [Sat, 26 Feb 2011 21:24:08 +0000 (22:24 +0100)]
Replace "depends on PLATFORM_LINUX" with "select PLATFORM_LINUX"

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
13 years agofix libiproute compile with kernel headers < 2.6.17
Stefan Seyfried [Mon, 21 Feb 2011 16:29:59 +0000 (17:29 +0100)]
fix libiproute compile with kernel headers < 2.6.17

Signed-off-by: Stefan Seyfried <seife+dev@b1-systems.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
13 years agomount: ignore unknown mount options when remounting NFS mounts
Peter Korsgaard [Mon, 21 Feb 2011 16:52:13 +0000 (17:52 +0100)]
mount: ignore unknown mount options when remounting NFS mounts

Don't fail on unknown nfs mount options. The kernel automatically
adds a few mount options that we don't currently handle, like:

sec=null|sys|krb5..
mountaddr=<ip>
mountproto=tcp|udp
local_lock=none|all|flock|posix

Which causes a simple mount -o remount,rw <mountpoint> to fail.

Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
13 years agomount: fix wrong long option namess
Roman Borisov [Fri, 25 Feb 2011 11:50:39 +0000 (14:50 +0300)]
mount: fix wrong long option namess

Fixed the --make-shared, --make-rshared, ... etc. (--make-*) options
in the mount command. Now parse_mount_options() may reasonably process such
options.
Fixed: http://lists.busybox.net/pipermail/busybox/2011-January/074511.html

Signed-off-by: Roman Borisov <ext-roman.borisov@nokia.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
13 years agoiproute: fix parsing and matching of of "short" IP addrs like 10/8
Denys Vlasenko [Wed, 23 Feb 2011 00:20:44 +0000 (01:20 +0100)]
iproute: fix parsing and matching of of "short" IP addrs like 10/8

function                                             old     new   delta
print_route                                         1613    1813    +200
get_addr_1                                           209     258     +49
get_prefix                                           393     356     -37
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 2/1 up/down: 249/-37)           Total: 212 bytes

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
13 years agoslightly better wording in comments
Denys Vlasenko [Mon, 21 Feb 2011 02:47:50 +0000 (03:47 +0100)]
slightly better wording in comments

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
13 years agoash: fix ash-signals/signal8 testcase failure
Denys Vlasenko [Mon, 21 Feb 2011 02:22:20 +0000 (03:22 +0100)]
ash: fix ash-signals/signal8 testcase failure

function                                             old     new   delta
killcmd                                              109     224    +115
kill_main                                            882     910     +28
changepath                                           194     195      +1
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 3/0 up/down: 144/0)             Total: 144 bytes

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
13 years agofix "make install"
Bernd Jendrissek [Sun, 20 Feb 2011 04:50:04 +0000 (05:50 +0100)]
fix "make install"

Signed-off-by: Bernd Jendrissek <bernd.jendrissek@gmail.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
13 years agoblockdev: add --getsz to replace --getsize
Dan Fandrich [Sun, 20 Feb 2011 03:15:43 +0000 (04:15 +0100)]
blockdev: add --getsz to replace --getsize

function                                             old     new   delta
blockdev_main                                        255     273     +18
bdcommands                                           160     176     +16
packed_usage                                       28142   28107     -35
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 2/1 up/down: 34/-35)             Total: -1 bytes

Signed-off-by: Dan Fandrich <dan@coneharvesters.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
13 years agowget: reduce bloat
Pere Orga [Wed, 16 Feb 2011 19:09:36 +0000 (20:09 +0100)]
wget: reduce bloat

Signed-off-by: Pere Orga <gotrunks@gmail.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
13 years agoudhcpd: optional IP selection based on MAC hash
Vladislav Grishenko [Wed, 16 Feb 2011 12:31:30 +0000 (13:31 +0100)]
udhcpd: optional IP selection based on MAC hash

function                                             old     new   delta
find_free_or_expired_nip                             153     225     +72

Signed-off-by: Vladislav Grishenko <themiron@mail.ru>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
13 years agoecho: fix SEGV when run with no args
Denys Vlasenko [Tue, 15 Feb 2011 17:35:54 +0000 (18:35 +0100)]
echo: fix SEGV when run with no args

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
13 years agowget: check for final write errors for -O FILE too
Denys Vlasenko [Tue, 15 Feb 2011 10:03:53 +0000 (11:03 +0100)]
wget: check for final write errors for -O FILE too

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
13 years agoAdd the help text for 'position independent executable' code build
Gilles Espinasse [Sun, 13 Feb 2011 21:54:37 +0000 (22:54 +0100)]
Add the help text for 'position independent executable' code build

Signed-off-by: Gilles Espinasse <g.esp@free.fr>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
13 years agomodprobe: fix "modprobe -l name-with-dash"
Denys Vlasenko [Tue, 15 Feb 2011 01:17:31 +0000 (02:17 +0100)]
modprobe: fix "modprobe -l name-with-dash"

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
13 years agomodinfo: trivial optimizations
Denys Vlasenko [Tue, 15 Feb 2011 00:45:14 +0000 (01:45 +0100)]
modinfo: trivial optimizations

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
13 years agomodinfo: show firmware and depends fields
Lauri Kasanen [Mon, 14 Feb 2011 17:50:30 +0000 (19:50 +0200)]
modinfo: show firmware and depends fields

Signed-off-by: Lauri Kasanen <curaga@operamail.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
13 years agowget: make "wget -O FILE URL1 URL2" concatenate output
Denys Vlasenko [Mon, 14 Feb 2011 23:58:36 +0000 (00:58 +0100)]
wget: make "wget -O FILE URL1 URL2" concatenate output

Also fixes a few cases where URL1's data (like start pos)
was leaking into URL2

function                                             old     new   delta
wget_main                                           2303    2321     +18
progress_meter                                       140     152     +12
retrieve_file_data                                   397     396      -1
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 2/1 up/down: 30/-1)              Total: 29 bytes

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
13 years agowget: fix SEGV with multiple urls and redirection
Pere Orga [Mon, 14 Feb 2011 22:56:07 +0000 (23:56 +0100)]
wget: fix SEGV with multiple urls and redirection

Signed-off-by: Pere Orga <gotrunks@gmail.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
13 years agohush: do not print killer signal's name for SIGPIPE
Denys Vlasenko [Mon, 14 Feb 2011 16:17:10 +0000 (17:17 +0100)]
hush: do not print killer signal's name for SIGPIPE

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
13 years agoecho: fix ENOSPC detection and some iffy code in \NNN handling
Denys Vlasenko [Mon, 14 Feb 2011 14:42:18 +0000 (15:42 +0100)]
echo: fix ENOSPC detection and some iffy code in \NNN handling

function                                             old     new   delta
echo_main                                            330     302     -28

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
13 years agoudhcpc: use more correct, and more importantly, more understandable BPF code
Vladislav Grishenko [Mon, 14 Feb 2011 03:50:30 +0000 (04:50 +0100)]
udhcpc: use more correct, and more importantly, more understandable BPF code

Signed-off-by: Vladislav Grishenko <themiron@mail.ru>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
13 years agoreverted LINHIB0001 swap signature addition
Denys Vlasenko [Mon, 14 Feb 2011 02:52:16 +0000 (03:52 +0100)]
reverted LINHIB0001 swap signature addition

see:

https://bugs.launchpad.net/ubuntu/+source/util-linux/+bug/683605

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
13 years agoMove stpcpy replacement function into libbb
Dan Fandrich [Sun, 13 Feb 2011 06:26:57 +0000 (22:26 -0800)]
Move stpcpy replacement function into libbb

Signed-off-by: Dan Fandrich <dan@coneharvesters.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
13 years agomktemp: make it more compatible with GNU coreutils 8.4
Denys Vlasenko [Sun, 13 Feb 2011 16:38:34 +0000 (17:38 +0100)]
mktemp: make it more compatible with GNU coreutils 8.4

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
13 years agofix bug 3223 (parameter loading problem for 2.4 kernels)
Denys Vlasenko [Sun, 13 Feb 2011 03:17:35 +0000 (04:17 +0100)]
fix bug 3223 (parameter loading problem for 2.4 kernels)

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
13 years agowget: support multiple URLs on command line even without -O :)
Denys Vlasenko [Sun, 13 Feb 2011 01:49:43 +0000 (02:49 +0100)]
wget: support multiple URLs on command line even without -O :)

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
13 years agowget: support multiple URLs on command line
Denys Vlasenko [Sun, 13 Feb 2011 01:33:11 +0000 (02:33 +0100)]
wget: support multiple URLs on command line

function                                             old     new   delta
wget_main                                           2190    2310    +120
progress_meter                                       124     140     +16
parse_url                                            288     304     +16
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 3/0 up/down: 152/0)             Total: 152 bytes

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
13 years agotypo fix in comment
Denys Vlasenko [Sat, 12 Feb 2011 22:40:31 +0000 (23:40 +0100)]
typo fix in comment

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
13 years agofind: trim help text a bit
Denys Vlasenko [Sat, 12 Feb 2011 19:37:41 +0000 (20:37 +0100)]
find: trim help text a bit

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
13 years agofind: remove the hack we use to parse options first, replace with simpler code
Denys Vlasenko [Sat, 12 Feb 2011 19:27:13 +0000 (20:27 +0100)]
find: remove the hack we use to parse options first, replace with simpler code

   text    data     bss     dec     hex filename
 867764     438    7552  875754   d5cea busybox_old
 867629     438    7552  875619   d5c63 busybox_unstripped

function                                             old     new   delta
parse_params                                        1377    1440     +63
static.params                                        151     192     +41
static.options                                        42      57     +15
fileAction                                           151     153      +2
find_main                                            466     267    -199
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 4/1 up/down: 121/-199)          Total: -78 bytes

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
13 years agofind: print/print0/prune _can_ be inverted, fix it
Denys Vlasenko [Sat, 12 Feb 2011 19:26:14 +0000 (20:26 +0100)]
find: print/print0/prune _can_ be inverted, fix it

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
13 years agofind: document ! (not) operator
Denys Vlasenko [Sat, 12 Feb 2011 17:49:48 +0000 (18:49 +0100)]
find: document ! (not) operator

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
13 years agofind: help text: PATH must be first
Denys Vlasenko [Sat, 12 Feb 2011 17:24:15 +0000 (18:24 +0100)]
find: help text: PATH must be first

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
13 years agofind: yet another tweak to help text
Denys Vlasenko [Sat, 12 Feb 2011 16:13:03 +0000 (17:13 +0100)]
find: yet another tweak to help text

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
13 years agofind: fix help text about -prune: it also does assume -print
Denys Vlasenko [Sat, 12 Feb 2011 16:08:16 +0000 (17:08 +0100)]
find: fix help text about -prune: it also does assume -print

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
13 years agofind: significantly improve hext text. +116 bytes
Denys Vlasenko [Sat, 12 Feb 2011 15:35:24 +0000 (16:35 +0100)]
find: significantly improve hext text. +116 bytes

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
13 years agotypo fix
Denys Vlasenko [Sat, 12 Feb 2011 00:56:25 +0000 (01:56 +0100)]
typo fix

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
13 years agowget: display 100% at the _end_ of chunked download
Denys Vlasenko [Fri, 11 Feb 2011 22:06:21 +0000 (23:06 +0100)]
wget: display 100% at the _end_ of chunked download

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
13 years agowget: chunked mode fix. Closes bug 3229
Denys Vlasenko [Fri, 11 Feb 2011 21:23:23 +0000 (22:23 +0100)]
wget: chunked mode fix. Closes bug 3229

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
13 years agowget: explain clearerr more clearly
Denys Vlasenko [Fri, 11 Feb 2011 21:01:33 +0000 (22:01 +0100)]
wget: explain clearerr more clearly

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
13 years agowget: correctly handle rare case when we get EAGAIN _on first_ read
Denys Vlasenko [Fri, 11 Feb 2011 20:42:00 +0000 (21:42 +0100)]
wget: correctly handle rare case when we get EAGAIN _on first_ read

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
13 years agoprogress meter: fix bugs found in stall detection and unknown size logic
Denys Vlasenko [Fri, 11 Feb 2011 18:09:30 +0000 (19:09 +0100)]
progress meter: fix bugs found in stall detection and unknown size logic

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
13 years agoprogress meter: move file name to bb_progress_t. +20 bytes
Denys Vlasenko [Fri, 11 Feb 2011 17:56:13 +0000 (18:56 +0100)]
progress meter: move file name to bb_progress_t. +20 bytes

We were doing expensive unicode conversion on every update

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
13 years agolibbb/progress.c: make sure we never get negative ETA
Denys Vlasenko [Fri, 11 Feb 2011 11:59:11 +0000 (12:59 +0100)]
libbb/progress.c: make sure we never get negative ETA

function                                             old     new   delta
bb_progress_update                                   738     733      -5

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
13 years agoprogress meter: display >999 hours ETA correctly
Denys Vlasenko [Thu, 10 Feb 2011 22:35:52 +0000 (23:35 +0100)]
progress meter: display >999 hours ETA correctly

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
13 years agowget: shrink progress meter code; strink wget and add debug logging
Denys Vlasenko [Thu, 10 Feb 2011 22:02:28 +0000 (23:02 +0100)]
wget: shrink progress meter code; strink wget and add debug logging

function                                             old     new   delta
fgets_and_trim                                         -      73     +73
retrieve_file_data                                   367     349     -18
bb_progress_update                                   723     699     -24
wget_main                                           2220    2190     -30
ftpcmd                                               133      87     -46
gethdr                                               200     153     -47
------------------------------------------------------------------------------
(add/remove: 1/0 grow/shrink: 0/5 up/down: 73/-165)           Total: -92 bytes

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
13 years agoprogress bar: better overflow protection; more precise bar
Denys Vlasenko [Thu, 10 Feb 2011 13:25:51 +0000 (14:25 +0100)]
progress bar: better overflow protection; more precise bar

function                                             old     new   delta
bb_progress_update                                   639     749    +110

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
13 years agowget: use closed HTTP/1.1 connection, stop when we dl'ed $content_len bytes
Denys Vlasenko [Thu, 10 Feb 2011 12:23:45 +0000 (13:23 +0100)]
wget: use closed HTTP/1.1 connection, stop when we dl'ed $content_len bytes

function                                             old     new   delta
retrieve_file_data                                   353     367     +14

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
13 years agoremve erroneous dependensies on INSTALLER
Denys Vlasenko [Thu, 10 Feb 2011 10:18:31 +0000 (11:18 +0100)]
remve erroneous dependensies on INSTALLER

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
13 years agogetty config help: fix example script
Denys Vlasenko [Thu, 10 Feb 2011 09:38:13 +0000 (10:38 +0100)]
getty config help: fix example script

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
13 years agogetty: extend its config help
Denys Vlasenko [Thu, 10 Feb 2011 09:24:51 +0000 (10:24 +0100)]
getty: extend its config help

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
13 years agoreset: "ESC(K" selects German, why do we use THAT? Change to "ESC(B" (US)
Denys Vlasenko [Thu, 10 Feb 2011 09:18:22 +0000 (10:18 +0100)]
reset: "ESC(K" selects German, why do we use THAT? Change to "ESC(B" (US)

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
13 years agosave 10 bytes on strings
Denys Vlasenko [Thu, 10 Feb 2011 09:01:49 +0000 (10:01 +0100)]
save 10 bytes on strings

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
13 years agowget: remove functions which retry on EINTR
Denys Vlasenko [Thu, 10 Feb 2011 08:55:05 +0000 (09:55 +0100)]
wget: remove functions which retry on EINTR

function                                             old     new   delta
retrieve_file_data                                   392     353     -39
safe_fgets                                            58       -     -58
------------------------------------------------------------------------------
(add/remove: 0/1 grow/shrink: 0/1 up/down: 0/-97)             Total: -97 bytes

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
13 years agofix trivial build failure
Denys Vlasenko [Thu, 10 Feb 2011 08:50:07 +0000 (09:50 +0100)]
fix trivial build failure

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
13 years agowget: use FEATURE_COPYBUF_KB-sized buffer. Much faster for local transfers
Denys Vlasenko [Thu, 10 Feb 2011 05:29:06 +0000 (06:29 +0100)]
wget: use FEATURE_COPYBUF_KB-sized buffer. Much faster for local transfers

function                                             old     new   delta
base64enc                                              -      53     +53
gethdr                                               190     200     +10
ftpcmd                                               129     133      +4
progress_meter                                       160     122     -38
retrieve_file_data                                   431     392     -39
base64enc_512                                         46       -     -46
wget_main                                           2456    2220    -236
------------------------------------------------------------------------------
(add/remove: 1/1 grow/shrink: 2/3 up/down: 67/-359)          Total: -292 bytes

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
13 years agotc: less ugly check for bad sizeof(G)
Denys Vlasenko [Thu, 10 Feb 2011 05:28:09 +0000 (06:28 +0100)]
tc: less ugly check for bad sizeof(G)

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
13 years agoiproute: fix handling of "dev IFACE" selector
Denys Vlasenko [Wed, 9 Feb 2011 03:39:09 +0000 (04:39 +0100)]
iproute: fix handling of "dev IFACE" selector

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
13 years agoscripts/mkconfigs: don't use invalid basic regexp
Denys Vlasenko [Wed, 9 Feb 2011 00:33:41 +0000 (01:33 +0100)]
scripts/mkconfigs: don't use invalid basic regexp

\? are GNU extension and thus are non-standard

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
13 years agouse unistd.h before _POSIX_VERSION
Denys Vlasenko [Tue, 8 Feb 2011 04:35:04 +0000 (05:35 +0100)]
use unistd.h before _POSIX_VERSION

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
13 years agoash: fix TMOUT not restoring tty attributes
Denys Vlasenko [Tue, 8 Feb 2011 04:07:02 +0000 (05:07 +0100)]
ash: fix TMOUT not restoring tty attributes

function                                             old     new   delta
pgetc                                                420     500     +80
readtoken1                                          3202    3239     +37
read_line_input                                     3316    3337     +21
udhcpc_main                                         2610    2630     +20
file_get                                             266     272      +6
expandarg                                            958     963      +5
localcmd                                             257     259      +2
addLines                                              85      87      +2
read_line                                             94      95      +1
ed_main                                             2540    2541      +1
timed_out                                              1       -      -1
lineedit_read_key                                    256     255      -1
alrm_sighandler                                       44       -     -44
cmdloop                                              539     434    -105
------------------------------------------------------------------------------
(add/remove: 0/2 grow/shrink: 10/2 up/down: 175/-151)          Total: 24 bytes
   text    data     bss     dec     hex filename
 887379     936   17200  905515   dd12b busybox_old
 887411     936   17192  905539   dd143 busybox_unstripped

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
13 years agoincorporate header fixes proposed in bug 3097
Denys Vlasenko [Mon, 7 Feb 2011 13:58:57 +0000 (14:58 +0100)]
incorporate header fixes proposed in bug 3097

Not sure these are *really* needed, but I suppose they don't hurt

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
13 years agoscripts/kconfig/mconf.c: stop-gap fix for buffer overflow
Denys Vlasenko [Mon, 7 Feb 2011 01:19:02 +0000 (02:19 +0100)]
scripts/kconfig/mconf.c: stop-gap fix for buffer overflow

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
13 years agoecho: do not retry on write errors
Denys Vlasenko [Mon, 7 Feb 2011 01:03:51 +0000 (02:03 +0100)]
echo: do not retry on write errors

function                                             old     new   delta
echo_main                                            297     336     +39
stpcpy                                                 -      22     +22
run_pipe                                            1561    1566      +5
pseudo_exec_argv                                     187     192      +5
hush_exit                                             75      80      +5
------------------------------------------------------------------------------
(add/remove: 3/0 grow/shrink: 4/0 up/down: 98/0)               Total: 76 bytes

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
13 years agotypo fix
Denys Vlasenko [Sun, 6 Feb 2011 19:02:15 +0000 (20:02 +0100)]
typo fix

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>