oweals/busybox.git
13 years agoash,hush: add ulimit -e -r (RLIMIT_NICE, RLIMIT_RTPRIO)
Denys Vlasenko [Mon, 4 Apr 2011 00:12:14 +0000 (02:12 +0200)]
ash,hush: add ulimit -e -r (RLIMIT_NICE, RLIMIT_RTPRIO)

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
13 years agostart-stop-daemon: fix "-K --test --pidfile PIDFILE" exitcode
Denys Vlasenko [Mon, 4 Apr 2011 00:03:35 +0000 (02:03 +0200)]
start-stop-daemon: fix "-K --test --pidfile PIDFILE" exitcode

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
13 years agomove help text from include/usage.src.h to debianutils/*.c e2fsprogs/*.c editors...
Pere Orga [Fri, 1 Apr 2011 20:56:30 +0000 (22:56 +0200)]
move help text from include/usage.src.h to debianutils/*.c e2fsprogs/*.c editors/*.c loginutils/*.c mailutils/*.c

Signed-off-by: Pere Orga <gotrunks@gmail.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
13 years agols: better help text for -a and -A
Denys Vlasenko [Sat, 2 Apr 2011 23:27:49 +0000 (01:27 +0200)]
ls: better help text for -a and -A

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
13 years agomove help text from include/usage.src.h to coreutils/*.c
Pere Orga [Thu, 31 Mar 2011 12:43:25 +0000 (14:43 +0200)]
move help text from include/usage.src.h to coreutils/*.c

Signed-off-by: Pere Orga <gotrunks@gmail.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
13 years agosmall fix for HISTFILESIZE
Denys Vlasenko [Thu, 31 Mar 2011 12:39:38 +0000 (14:39 +0200)]
small fix for HISTFILESIZE

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
13 years agoash,hush: optional support for $HISTFILESIZE.
Denys Vlasenko [Thu, 31 Mar 2011 11:16:52 +0000 (13:16 +0200)]
ash,hush: optional support for $HISTFILESIZE.

Based on patch from Alexey Fomenko (ext-alexey.fomenko AT nokia.com)

function                                             old     new   delta
size_from_HISTFILESIZE                                 -      44     +44
hush_main                                            998    1025     +27
ash_main                                            1348    1374     +26
read_line_input                                     3361    3372     +11
new_line_input_t                                      17      24      +7

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
13 years agohush: remove outdated comments
Denys Vlasenko [Wed, 30 Mar 2011 17:11:46 +0000 (19:11 +0200)]
hush: remove outdated comments

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
13 years agohush: fix source1.tests
Denys Vlasenko [Wed, 30 Mar 2011 16:54:52 +0000 (18:54 +0200)]
hush: fix source1.tests

function                                             old     new   delta
parse_and_run_stream                                  95     139     +44
static_get                                            22      25      +3
file_get                                             260     263      +3
builtin_umask                                        133     132      -1
parse_stream                                        2442    2425     -17
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 3/2 up/down: 50/-18)             Total: 32 bytes

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
13 years agofbsplash: Add support for 24 and 32 bit color depth
Nuno Lucas [Mon, 28 Mar 2011 13:30:59 +0000 (15:30 +0200)]
fbsplash: Add support for 24 and 32 bit color depth

function                                             old     new   delta
fb_drawprogressbar                                   372     447     +75
fb_pixel_value                                         -      50     +50
fb_write_pixel                                         -      47     +47
fbsplash_main                                        889     920     +31
fb_drawfullrectangle                                 101     131     +30
------------------------------------------------------------------------------
(add/remove: 2/0 grow/shrink: 3/0 up/down: 233/0)             Total: 233 bytes

Signed-off-by: Nuno Lucas <ntlucas@gmail.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
13 years agomove help text from include/usage.src.h to console-tools/*.c
Pere Orga [Sun, 27 Mar 2011 21:42:28 +0000 (23:42 +0200)]
move help text from include/usage.src.h to console-tools/*.c

Signed-off-by: Pere Orga <gotrunks@gmail.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
13 years agoapplet_tables: do not include libbb.h, that header ir for target builds
Denys Vlasenko [Sun, 27 Mar 2011 23:23:38 +0000 (01:23 +0200)]
applet_tables: do not include libbb.h, that header ir for target builds

...and applets/applet_tables.c is built on *host*.

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
13 years agomesg: operate on stdin, not on stderr (compat)
Denys Vlasenko [Sun, 27 Mar 2011 22:59:16 +0000 (00:59 +0200)]
mesg: operate on stdin, not on stderr (compat)

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
13 years agohttpd: don't send error messages with gzip encoding
Peter Korsgaard [Fri, 25 Mar 2011 12:38:52 +0000 (13:38 +0100)]
httpd: don't send error messages with gzip encoding

If CONFIG_FEATURE_HTTPD_GZIP is enabled and request contained
'Accept-Encoding: gzip', then errors were sent with 'Content-Encoding: gzip'
even though they aren't.

Fix it by clearing content_gzip before sending the headers.

Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
13 years agodiff: optimize diffing of files with the same metadata
Roman Borisov [Sun, 27 Mar 2011 21:24:09 +0000 (23:24 +0200)]
diff: optimize diffing of files with the same metadata

Signed-off-by: Roman Borisov <ext-roman.borisov@nokia.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
13 years agomove help text from include/usage.src.h to archival/*.c
Pere Orga [Sun, 27 Mar 2011 20:40:30 +0000 (22:40 +0200)]
move help text from include/usage.src.h to archival/*.c

Signed-off-by: Pere Orga <gotrunks@gmail.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
13 years agowget: --post-data=STR should not encode STR, should send it verbatim
Vitaly Magerya [Sun, 27 Mar 2011 20:33:13 +0000 (22:33 +0200)]
wget: --post-data=STR should not encode STR, should send it verbatim

This matches GNU Wget 1.12 behavior.

Signed-off-by: Vitaly Magerya <vmagerya@gmail.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
13 years agopstree: fix "warning: 'handle_thread' defined but not used"
Denys Vlasenko [Sun, 27 Mar 2011 14:15:02 +0000 (16:15 +0200)]
pstree: fix "warning: 'handle_thread' defined but not used"

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
13 years agolineedit: fixes for CONFIG_UNICODE_USING_LOCALE=y
Denys Vlasenko [Sun, 27 Mar 2011 00:18:07 +0000 (01:18 +0100)]
lineedit: fixes for CONFIG_UNICODE_USING_LOCALE=y

function                                             old     new   delta
load_string                                           45      91     +46
save_string                                           40      82     +42
reinit_unicode                                        34      61     +27
BB_PUTCHAR                                            97     120     +23
init_unicode                                          17      37     +20
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 5/0 up/down: 158/0)             Total: 158 bytes

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
13 years agomount: add --rbind option support
Roman Borisov [Thu, 24 Mar 2011 12:08:43 +0000 (15:08 +0300)]
mount: add --rbind option support

Signed-off-by: Roman Borisov <ext-roman.borisov@nokia.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
13 years agomount: rprivate option fix
Roman Borisov [Wed, 23 Mar 2011 08:20:25 +0000 (11:20 +0300)]
mount: rprivate option fix

fixed the mistake in writing for -make-rprivate option

Signed-off-by: Roman Borisov <ext-roman.borisov@nokia.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
13 years agohush: document a bug about aborting on sourced file error when non-interactive
Denys Vlasenko [Thu, 24 Mar 2011 04:38:51 +0000 (05:38 +0100)]
hush: document a bug about aborting on sourced file error when non-interactive

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
13 years agohush: make parse errors in sourced file non-fatal in interactive script
Denys Vlasenko [Thu, 24 Mar 2011 04:25:59 +0000 (05:25 +0100)]
hush: make parse errors in sourced file non-fatal in interactive script

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
13 years agohush: fix a case where return in sourced file has no effect
Denys Vlasenko [Thu, 24 Mar 2011 01:50:03 +0000 (02:50 +0100)]
hush: fix a case where return in sourced file has no effect

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
13 years agoash,hush: recheck LANG before every line input
Denys Vlasenko [Wed, 23 Mar 2011 16:59:27 +0000 (17:59 +0100)]
ash,hush: recheck LANG before every line input

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
13 years agodon't call freeaddinfo(NULL)
Vitaly Magerya [Tue, 22 Mar 2011 19:14:26 +0000 (20:14 +0100)]
don't call freeaddinfo(NULL)

Signed-off-by: Vitaly Magerya <vmagerya@gmail.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
13 years agologin: set PAM RHOST
Ryan Phillips [Tue, 22 Mar 2011 17:27:21 +0000 (18:27 +0100)]
login: set PAM RHOST

Signed-off-by: Ryan Phillips <ryan@trolocsis.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
13 years agodd: free allocated memory if CLEANUP enabled
Alexey Soloviev [Wed, 16 Mar 2011 07:39:46 +0000 (10:39 +0300)]
dd: free allocated memory if CLEANUP enabled

Signed-off-by: Alexey Soloviev <EXT-Alexey.Soloviev@nokia.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
13 years agomesg: make group/all writability configurable
Denys Vlasenko [Tue, 22 Mar 2011 05:54:36 +0000 (06:54 +0100)]
mesg: make group/all writability configurable

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
13 years agoln: explain why we use xstrdup
Denys Vlasenko [Mon, 21 Mar 2011 11:36:35 +0000 (12:36 +0100)]
ln: explain why we use xstrdup

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
13 years agoinit: fix a case where execv's 1st arg was wrong
Denys Vlasenko [Mon, 21 Mar 2011 04:07:43 +0000 (05:07 +0100)]
init: fix a case where execv's 1st arg was wrong

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
13 years agowget: move help text to .c file
Denys Vlasenko [Sun, 20 Mar 2011 23:37:05 +0000 (00:37 +0100)]
wget: move help text to .c file

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
13 years agowget: fix fname_out usage wrt redirects
Denys Vlasenko [Sun, 20 Mar 2011 23:29:37 +0000 (00:29 +0100)]
wget: fix fname_out usage wrt redirects

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
13 years agomount: add a test for bind+rshared
Denys Vlasenko [Mon, 14 Mar 2011 05:28:28 +0000 (06:28 +0100)]
mount: add a test for bind+rshared

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
13 years agopwdx: new applet
Pere Orga [Sat, 12 Mar 2011 17:13:15 +0000 (18:13 +0100)]
pwdx: new applet

function                                             old     new   delta
pwdx_main                                              -     197    +197
packed_usage                                       28237   28261     +24
applet_names                                        2391    2396      +5
applet_main                                         1392    1396      +4
applet_nameofs                                       696     698      +2
applet_install_loc                                   174     175      +1
------------------------------------------------------------------------------
(add/remove: 2/0 grow/shrink: 5/0 up/down: 233/0)             Total: 233 bytes

Signed-off-by: Pere Orga <gotrunks@gmail.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
13 years agobusybox: fail if --install is not given an absolute path
Denys Vlasenko [Sat, 12 Mar 2011 05:08:28 +0000 (06:08 +0100)]
busybox: fail if --install is not given an absolute path

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
13 years agoudhcpc: emit "correct" secs field
Denys Vlasenko [Sat, 12 Mar 2011 04:37:54 +0000 (05:37 +0100)]
udhcpc: emit "correct" secs field

In theory, sending secs set to constant zero should be ok too.
But some bleeping servers can actually be configured to answer ONLY
if secs is bigger than a preset value (!!)
http://developer.apple.com/library/mac/#documentation/Darwin/Reference/ManPages/man8/bootpd.8.html
grep for "reply_threshold_seconds"

function                                             old     new   delta
udhcpc_main                                         2573    2623     +50

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
13 years agols: fix handling of symlinks by option -1
Denys Vlasenko [Sat, 12 Mar 2011 02:12:36 +0000 (03:12 +0100)]
ls: fix handling of symlinks by option -1

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
13 years agolibbb: make warning go away
Denys Vlasenko [Sat, 12 Mar 2011 01:19:50 +0000 (02:19 +0100)]
libbb: make warning go away

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
13 years agochsum: fix
Pascal Bellard [Fri, 11 Mar 2011 22:40:27 +0000 (23:40 +0100)]
chsum: fix

Signed-off-by: Pascal Bellard <pascal.bellard@ads-lu.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
13 years agos/FAIL_DELAY/LOGIN_FAIL_DELAY/
Denys Vlasenko [Tue, 8 Mar 2011 20:07:05 +0000 (21:07 +0100)]
s/FAIL_DELAY/LOGIN_FAIL_DELAY/

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
13 years agoforgot to add libbb/get_shell_name.c
Denys Vlasenko [Tue, 8 Mar 2011 20:02:42 +0000 (21:02 +0100)]
forgot to add libbb/get_shell_name.c

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
13 years agouse user's shell instead of hardwired "/bin/sh" (android needs this)
Denys Vlasenko [Tue, 8 Mar 2011 20:00:36 +0000 (21:00 +0100)]
use user's shell instead of hardwired "/bin/sh" (android needs this)

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
13 years agoprintenv: fix environ == NULL segfault
Denys Vlasenko [Tue, 8 Mar 2011 11:44:02 +0000 (12:44 +0100)]
printenv: fix environ == NULL segfault

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
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>