platform/upstream/busybox.git
13 years agotop: another scripting improvement
Denys Vlasenko [Fri, 6 May 2011 18:47:54 +0000 (20:47 +0200)]
top: another scripting improvement

function                                             old     new   delta
handle_input                                         492     493      +1

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
13 years agotop: make it possible to feed commands via pipe
Denys Vlasenko [Fri, 6 May 2011 18:34:04 +0000 (20:34 +0200)]
top: make it possible to feed commands via pipe

function                                             old     new   delta
handle_input                                           -     492    +492
mult_lvl_cmp                                          38      49     +11
packed_usage                                       28247   28257     +10
top_main                                            1345     928    -417
------------------------------------------------------------------------------
(add/remove: 1/0 grow/shrink: 2/1 up/down: 513/-417)           Total: 96 bytes

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
13 years agotraceroute: properly reduce poll timeout
Denys Vlasenko [Thu, 5 May 2011 00:31:30 +0000 (02:31 +0200)]
traceroute: properly reduce poll timeout

This removes the problem where during the time we wait to declare
a target as unresponsive we receive an unrelated ICMP packet.
If there is enough traffic, this can make traceroute hang as
it never declares the target as unresponsive.

function                                             old     new   delta
common_traceroute_main                              4196    4261     +65

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
13 years agosed: shrink by 17 bytes
Pascal Bellard [Wed, 4 May 2011 22:26:37 +0000 (00:26 +0200)]
sed: shrink by 17 bytes

Signed-off-by: Pascal Bellard <pascal.bellard@ads-lu.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
13 years agotweak examples/udhcp/udhcpd.conf
Denys Vlasenko [Wed, 4 May 2011 19:17:23 +0000 (21:17 +0200)]
tweak examples/udhcp/udhcpd.conf

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
13 years agotar: store negative mtime as 0; pack very large files using base-256 encoding
Denys Vlasenko [Wed, 4 May 2011 19:14:12 +0000 (21:14 +0200)]
tar: store negative mtime as 0; pack very large files using base-256 encoding

function                                             old     new   delta
writeTarHeader                                       841     979    +138

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
13 years agomount: for NFS use tcp per default rather than udp
Bernhard Reutner-Fischer [Wed, 4 May 2011 17:03:30 +0000 (19:03 +0200)]
mount: for NFS use tcp per default rather than udp

nfs-utils's mount.nfs uses TCP per default unless explicitly asked for
otherwise. This is also the expected behaviour for NFSv4, so ok there,
too.

Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
13 years agoudhcp: fix some default values from "" to NULL
Denys Vlasenko [Tue, 3 May 2011 14:46:47 +0000 (16:46 +0200)]
udhcp: fix some default values from "" to NULL

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
13 years agosed: support \r in s command
Denys Vlasenko [Mon, 2 May 2011 22:52:22 +0000 (00:52 +0200)]
sed: support \r in s command

function                                             old     new   delta
copy_parsing_escapes                                  65      91     +26

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
13 years agosed: code shrink
Denys Vlasenko [Mon, 2 May 2011 22:51:43 +0000 (00:51 +0200)]
sed: code shrink

   text    data     bss     dec     hex filename
 876354     493    7584  884431   d7ecf busybox_old
 876323     493    7584  884400   d7eb0 busybox_unstripped

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
13 years agoCompile options: default to -O2 when -Os is not available
Wolfgang Denk [Sun, 1 May 2011 12:00:27 +0000 (14:00 +0200)]
Compile options: default to -O2 when -Os is not available

Recent versions of GCC for PowerPC systems suffer from some compiler
bugs which prevent the use of "--enable-target-optspace" in their
configuration, which makes the compiler option "-Os" unavailable;
for reference see

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43810
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48278
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45053

In the result, BusyBox will be compiled without any optimization
options, which causes a huge binary (1.8 MiB for default configuration
on PPC, built with gcc 54.51 from the Yocto / Poky / OpenEmbedded tool
chains).  This commit changes behaviour so "-O2" gets used as fallback
when "-Os" is not available.  This reduces the image size in above
test to 1.3 MiB.  This is still 10...15% more then what we get with
"-Os", but much better than using no optimization at all.

Signed-off-by: Wolfgang Denk <wd@denx.de>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
13 years agosetserial: small fix
Denys Vlasenko [Mon, 2 May 2011 00:47:25 +0000 (02:47 +0200)]
setserial: small fix

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
13 years agoget rid of several "variable 'x' set but not used" warnings
Cristian Ionescu-Idbohrn [Sun, 1 May 2011 12:43:53 +0000 (14:43 +0200)]
get rid of several "variable 'x' set but not used" warnings

Signed-off-by: Cristian Ionescu-Idbohrn <cii@axis.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
13 years agosetserial: new applet
Marek Bečka [Sun, 1 May 2011 01:09:14 +0000 (03:09 +0200)]
setserial: new applet

   text    data     bss     dec     hex filename
 873605     493    7584  881682   d7412 busybox_old
 876354     493    7584  884431   d7ecf busybox_unstripped

Signed-off-by: Marek Bečka <yuen@klacno.sk>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
13 years agompstat.c: remove unused line
Marek Polacek [Sat, 30 Apr 2011 20:09:01 +0000 (22:09 +0200)]
mpstat.c: remove unused line

Signed-off-by: Marek Polacek <mpolacek@redhat.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
13 years agofdisk: backport disk check from util-linux
Lauri Kasanen [Sat, 30 Apr 2011 19:31:05 +0000 (21:31 +0200)]
fdisk: backport disk check from util-linux

With the digit check devices like mmcblk0 were skipped,
but now with 0 allowed we're seeing a ton of loop devices listed
(loop0, loop10, loop20...) as well as ramzswap0,
all which should not be shown in fdisk -l.

function                                             old     new   delta
list_devs_in_proc_partititons                        157     238     +81

Signed-off-by: Lauri Kasanen <curaga@operamail.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
13 years agorename miscutils/ubi_attach_detach.c -> miscutils/ubi_tools.c
Denys Vlasenko [Tue, 26 Apr 2011 02:32:05 +0000 (04:32 +0200)]
rename miscutils/ubi_attach_detach.c -> miscutils/ubi_tools.c

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
13 years agoadd help text
Denys Vlasenko [Tue, 26 Apr 2011 02:31:03 +0000 (04:31 +0200)]
add help text

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
13 years agoubiupdatevol: new applet
Reuben Dowle [Tue, 26 Apr 2011 02:27:48 +0000 (04:27 +0200)]
ubiupdatevol: new applet

ubi_tools_main                                       658    1046    +388
packed_usage                                       28274   28304     +30
applet_names                                        2396    2409     +13
applet_main                                         1396    1400      +4
applet_nameofs                                       698     700      +2
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 5/0 up/down: 437/0)             Total: 437 bytes

Signed-off-by: Reuben Dowle <Reuben.Dowle@navico.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
13 years agoFix ubirsvol usage information
Reuben Dowle [Sun, 3 Apr 2011 22:55:55 +0000 (10:55 +1200)]
Fix ubirsvol usage information

The usage information for the ubirsvol applet is incorrect. This fixes the mistake.

Signed-off-by: Reuben Dowle <Reuben.Dowle@navico.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
13 years agoudhcp: add FEATURE_UDHCP_8021Q option
Nigel Hathaway [Tue, 26 Apr 2011 00:50:00 +0000 (02:50 +0200)]
udhcp: add FEATURE_UDHCP_8021Q option

function                                             old     new   delta
dhcp_option_strings                                  217     237     +20
dhcp_optflags                                         64      68      +4

Signed-off-by: Nigel Hathaway <Nigel.Hathaway@ubiquisys.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
13 years agodhcpc: export unrecognized options in "optNN=XXXXXXXXX" form
Nigel Hathaway [Tue, 26 Apr 2011 00:38:29 +0000 (02:38 +0200)]
dhcpc: export unrecognized options in "optNN=XXXXXXXXX" form

function                                             old     new   delta
udhcp_run_script                                     609     818    +209

Signed-off-by: Nigel Hathaway <Nigel.Hathaway@ubiquisys.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
13 years agobuild fixes for scripts/kconfig
Denys Vlasenko [Sun, 17 Apr 2011 23:19:59 +0000 (01:19 +0200)]
build fixes for scripts/kconfig

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
13 years agoadd include <sys/socket.h>
Denys Vlasenko [Sun, 17 Apr 2011 21:18:15 +0000 (23:18 +0200)]
add include <sys/socket.h>

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
13 years agostraighten out dprintf/fdprintf mess; remove old "define lchown chown"
Denys Vlasenko [Sun, 17 Apr 2011 21:14:19 +0000 (23:14 +0200)]
straighten out dprintf/fdprintf mess; remove old "define lchown chown"

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
13 years agosmall fixes atop syslog config patch
Denys Vlasenko [Sat, 16 Apr 2011 18:15:14 +0000 (20:15 +0200)]
small fixes atop syslog config patch

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
13 years agoash: clear sa_flags always
Ian Wienand [Sat, 16 Apr 2011 18:05:14 +0000 (20:05 +0200)]
ash: clear sa_flags always

Signed-off-by: Ian Wienand <ianw@vmware.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
13 years agofix another nonportable grep usage in scripts
Denys Vlasenko [Sat, 16 Apr 2011 17:45:33 +0000 (19:45 +0200)]
fix another nonportable grep usage in scripts

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
13 years agosyslogd: small fix to config patch
Sergey Naumov [Sat, 16 Apr 2011 17:36:15 +0000 (19:36 +0200)]
syslogd: small fix to config patch

Signed-off-by: Sergey Naumov <sknaumov@gmail.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
13 years agowget: add a note about bug 3625
Denys Vlasenko [Sat, 16 Apr 2011 17:31:08 +0000 (19:31 +0200)]
wget: add a note about bug 3625

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
13 years agomd5/sha1sum: better fix for small resource leak
Denys Vlasenko [Sat, 16 Apr 2011 16:56:36 +0000 (18:56 +0200)]
md5/sha1sum: better fix for small resource leak

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
13 years agomd5/sha1sum: fix small resource leak
Alexey Fomenko [Sat, 16 Apr 2011 16:49:39 +0000 (18:49 +0200)]
md5/sha1sum: fix small resource leak

Signed-off-by: Alexey Fomenko <ext-alexey.fomenko@nokia.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
13 years agoUse net/ethernet.h instead of linux/if_ether.h in more cases. Closes 3619
Denys Vlasenko [Sat, 16 Apr 2011 16:31:53 +0000 (18:31 +0200)]
Use net/ethernet.h instead of linux/if_ether.h in more cases. Closes 3619

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
13 years agomake FDISK_SUPPORT_LARGE_DISKS redundant when LFS=y
Denys Vlasenko [Sat, 16 Apr 2011 16:07:35 +0000 (18:07 +0200)]
make FDISK_SUPPORT_LARGE_DISKS redundant when LFS=y

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
13 years agogen_build_files.sh: do not use "sed --" for now
Denys Vlasenko [Sat, 16 Apr 2011 15:59:34 +0000 (17:59 +0200)]
gen_build_files.sh: do not use "sed --" for now

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
13 years agoFix double words in comments. No code changes
Marek Polacek [Sat, 16 Apr 2011 15:33:43 +0000 (17:33 +0200)]
Fix double words in comments. No code changes

Signed-off-by: Marek Polacek <mpolacek@redhat.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
13 years agoadd forgotten #include
Denys Vlasenko [Mon, 11 Apr 2011 03:24:58 +0000 (05:24 +0200)]
add forgotten #include

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
13 years agotftpd: add -l "log to syslog" option. Needed for inetd mode
Denys Vlasenko [Mon, 11 Apr 2011 03:12:53 +0000 (05:12 +0200)]
tftpd: add -l "log to syslog" option. Needed for inetd mode

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
13 years agotftp: fix progress bar for large (>32M) files. Closes 3499
Denys Vlasenko [Mon, 11 Apr 2011 02:29:39 +0000 (04:29 +0200)]
tftp: fix progress bar for large (>32M) files. Closes 3499

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
13 years agobasename,dirname,freeramdisk,rx,raidautorun,runsv,chvt: skip "--" argument
Denys Vlasenko [Mon, 11 Apr 2011 01:58:30 +0000 (03:58 +0200)]
basename,dirname,freeramdisk,rx,raidautorun,runsv,chvt: skip "--" argument

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
13 years agoconspy: fix ESC key lost
Pascal Bellard [Mon, 11 Apr 2011 01:52:53 +0000 (03:52 +0200)]
conspy: fix ESC key lost

Signed-off-by: Pascal Bellard <pascal.bellard@ads-lu.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
13 years agomove remaining help text from include/usage.src.h
Pere Orga [Mon, 11 Apr 2011 01:29:49 +0000 (03:29 +0200)]
move remaining help text from include/usage.src.h

Signed-off-by: Pere Orga <gotrunks@gmail.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
13 years agosyslogd: optional support for /etc/syslog.conf
Sergey Naumov [Sun, 10 Apr 2011 05:34:27 +0000 (07:34 +0200)]
syslogd: optional support for /etc/syslog.conf

function                                             old     new   delta
syslogd_main                                        1241    1870    +629
timestamp_and_log                                    301     540    +239
find_by_name                                           -      37     +37
find_by_val                                            -      22     +22
init_data                                             64      68      +4
log_locally                                          603     413    -190
------------------------------------------------------------------------------
(add/remove: 2/0 grow/shrink: 3/1 up/down: 931/-190)          Total: 741 bytes

Signed-off-by: Sergey Naumov <sknaumov@gmail.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
13 years agohttp: document index.cgi usage. no code changes
Denys Vlasenko [Sun, 10 Apr 2011 01:08:22 +0000 (03:08 +0200)]
http: document index.cgi usage. no code changes

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
13 years agolibbb: make set_nport accept pointer to sockaddr, not to len_and_sockaddr.
Denys Vlasenko [Thu, 7 Apr 2011 15:52:20 +0000 (17:52 +0200)]
libbb: make set_nport accept pointer to sockaddr, not to len_and_sockaddr.

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
13 years agontpd: decrease ntpd -q "no response" timeout to 10 sec
Denys Vlasenko [Wed, 6 Apr 2011 23:45:20 +0000 (01:45 +0200)]
ntpd: decrease ntpd -q "no response" timeout to 10 sec

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
13 years agoapplets/install.sh: afer quoting of variables
Denys Vlasenko [Tue, 5 Apr 2011 00:37:15 +0000 (02:37 +0200)]
applets/install.sh: afer quoting of variables

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
13 years agopasswd,chpasswd: reset password in /etc/passwd to "x" if /etc/shadow was updated
Tito Ragusa [Mon, 4 Apr 2011 22:18:33 +0000 (00:18 +0200)]
passwd,chpasswd: reset password in /etc/passwd to "x" if /etc/shadow was updated

Signed-off-by: Tito Ragusa <farmatito@tiscali.it>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
13 years agofix install.sh
Denys Vlasenko [Mon, 4 Apr 2011 01:53:23 +0000 (03:53 +0200)]
fix install.sh

Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
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>