oweals/busybox.git
12 years agofix for spurious testsuite failure
Denys Vlasenko [Thu, 10 May 2012 17:26:37 +0000 (19:26 +0200)]
fix for spurious testsuite failure

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
12 years agomv: accept but ignore -v
Simon B [Sun, 6 May 2012 16:08:24 +0000 (18:08 +0200)]
mv: accept but ignore -v

function                                             old     new   delta
mv_longopts                                           36      46     +10

Signed-off-by: Simon B <sburnet@hotmail.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
12 years agomkdir,rmdir: accept and ignore -v, --verbose
Simon B [Sun, 6 May 2012 13:03:32 +0000 (15:03 +0200)]
mkdir,rmdir: accept and ignore -v, --verbose

function                                             old     new   delta
static.rmdir_longopts                                 38      48     +10
mkdir_longopts                                        18      28     +10

Signed-off-by: Simon B <sburnet@hotmail.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
12 years agosed: support long opts and -iSFX
Simon B [Sun, 6 May 2012 11:59:15 +0000 (13:59 +0200)]
sed: support long opts and -iSFX

function                                             old     new   delta
static.sed_longopts                                    -      67     +67
sed_main                                             618     682     +64
packed_usage                                       29179   29236     +57
------------------------------------------------------------------------------
(add/remove: 1/0 grow/shrink: 2/0 up/down: 188/0)             Total: 188 bytes

Signed-off-by: Simon B <sburnet@hotmail.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
12 years agoln: support -T and -v
Simon B [Sun, 6 May 2012 11:18:35 +0000 (13:18 +0200)]
ln: support -T and -v

function                                             old     new   delta
ln_main                                              445     524     +79
packed_usage                                       29182   29179      -3

Signed-off-by: Simon B <sburnet@hotmail.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
12 years agoget_linux_version_code: don't fail on Linux version strints like "3.0-foo"
Andreas Oberritter [Sat, 5 May 2012 15:47:23 +0000 (17:47 +0200)]
get_linux_version_code: don't fail on Linux version strints like "3.0-foo"

Signed-off-by: Andreas Oberritter <obi@opendreambox.org>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
12 years agoudhcpc6: depend on ipv6
Mike Frysinger [Thu, 3 May 2012 01:45:35 +0000 (21:45 -0400)]
udhcpc6: depend on ipv6

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
12 years agofix build failure when compressed help is selected, but bz2 compression is not
Denys Vlasenko [Sun, 29 Apr 2012 12:28:12 +0000 (14:28 +0200)]
fix build failure when compressed help is selected, but bz2 compression is not

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
12 years agosendmail: use host rather than NIS domain name for HELO
Ron Yorston [Sat, 28 Apr 2012 15:04:19 +0000 (17:04 +0200)]
sendmail: use host rather than NIS domain name for HELO

According to RFC 5321 the argument to HELO "contains the fully-qualified
domain name of the SMTP client" or its IP address if no FQDN is available.
BusyBox sendmail uses the NIS domain name instead which, in many cases,
is likely to be the default "(none)". [vda: yes, I checked my machine
and its uts.domainname was indeed "(none)"]

Using the host name is more likely to satisfy the intent of the RFC while
allowing the otherwise unused safe_getdomainname function to be removed.

Signed-off-by: Ron Yorston <rmy@tigress.co.uk>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
12 years agolpr: small code shrink
Denys Vlasenko [Fri, 27 Apr 2012 13:03:34 +0000 (15:03 +0200)]
lpr: small code shrink

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
12 years agolineedit: histfile can get emptied when CONFIG_FEATURE_EDITING_SAVE_ON_EXIT=y
Dennis Groenen [Tue, 24 Apr 2012 20:40:58 +0000 (22:40 +0200)]
lineedit: histfile can get emptied when CONFIG_FEATURE_EDITING_SAVE_ON_EXIT=y

When CONFIG_FEATURE_EDITING_SAVE_ON_EXIT is set to y, the histfile
will get cleared if the total amount of history lines is less than MAX_HISTORY.
Only if the histfile is not empty _and_ the amount of lines currently
in memory are equal to or greater than MAX_HISTORY, history saving will
work as expected with this feature enabled.

Output from defconfig + CONFIG_FEATURE_EDITING_SAVE_ON_EXIT=y:
$ echo "foo" > ~/.ash_history
$ ./busybox ash
~/busybox/a $ echo "bar" > /dev/null
~/busybox/a $ exit
$ cat ~/.ash_history
$

Output with the patch applied and same config as above:
$ echo "foo" > ~/.ash_history
$ ./busybox ash
~/busybox/b $ echo "bar" > /dev/null
~/busybox/b $ exit
$ cat ~/.ash_history
foo
echo "bar" > /dev/null
exit
$

Signed-off-by: Dennis Groenen <tj.groenen at gmail.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
12 years agohush: remove sighandler_t definition hack, platform.h has it too
Denys Vlasenko [Thu, 26 Apr 2012 08:59:01 +0000 (10:59 +0200)]
hush: remove sighandler_t definition hack, platform.h has it too

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
12 years agogetty: fix for NOCTTY killing us with SIGHUP
Denys Vlasenko [Thu, 26 Apr 2012 08:53:48 +0000 (10:53 +0200)]
getty: fix for NOCTTY killing us with SIGHUP

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
12 years agosed: slightly better fix for prev commit's problem
Denys Vlasenko [Tue, 24 Apr 2012 17:27:34 +0000 (19:27 +0200)]
sed: slightly better fix for prev commit's problem

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
12 years agosed: fix handling of s/// which has empty matches
Denys Vlasenko [Tue, 24 Apr 2012 17:21:16 +0000 (19:21 +0200)]
sed: fix handling of s/// which has empty matches

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
12 years agoifupdown: improve compatibility with Debian
Andreas Oberritter [Mon, 23 Apr 2012 20:08:39 +0000 (22:08 +0200)]
ifupdown: improve compatibility with Debian

Set environment variable 'PHASE'.
Treat post-up and pre-down as aliases for up and down.
Uses the same logic as ifupdown.nw from ifupdown-0.6.16.
Makes it possible to execute Debian's ifupdown script for
wpa-supplicant.

Signed-off-by: Andreas Oberritter <obi@opendreambox.org>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
12 years agoStart 1.21.0 development cycle
Denys Vlasenko [Sun, 22 Apr 2012 01:47:30 +0000 (03:47 +0200)]
Start 1.21.0 development cycle

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
12 years agoBump version to 1.20.0 1_20_0
Denys Vlasenko [Sun, 22 Apr 2012 01:38:31 +0000 (03:38 +0200)]
Bump version to 1.20.0

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
12 years agoudhcpc: fix improper size calculation for OPTION_STRING_HOST
Denys Vlasenko [Sun, 22 Apr 2012 01:37:01 +0000 (03:37 +0200)]
udhcpc: fix improper size calculation for OPTION_STRING_HOST

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
12 years agomdev: fix mode of creatred node if config file support is not configured
Denys Vlasenko [Sat, 21 Apr 2012 12:35:32 +0000 (14:35 +0200)]
mdev: fix mode of creatred node if config file support is not configured

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
12 years agoFix another build failure found with randconfig
Denys Vlasenko [Fri, 20 Apr 2012 16:59:14 +0000 (18:59 +0200)]
Fix another build failure found with randconfig

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
12 years agofix build breakage with gcc 4.2.1
Denys Vlasenko [Fri, 20 Apr 2012 16:24:09 +0000 (18:24 +0200)]
fix build breakage with gcc 4.2.1

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
12 years agowhitespace fixes
Denys Vlasenko [Fri, 20 Apr 2012 13:07:22 +0000 (15:07 +0200)]
whitespace fixes

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
12 years agofix build breakage found by randconfig
Denys Vlasenko [Fri, 20 Apr 2012 12:48:00 +0000 (14:48 +0200)]
fix build breakage found by randconfig

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
12 years agowho: fix typo in help text
Denys Vlasenko [Wed, 18 Apr 2012 12:38:15 +0000 (14:38 +0200)]
who: fix typo in help text

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
12 years agohwclock: fix wrong comparison of time value (when it will overlow int)
Denys Vlasenko [Tue, 17 Apr 2012 17:25:13 +0000 (19:25 +0200)]
hwclock: fix wrong comparison of time value (when it will overlow int)

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
12 years agoudhcp: make arpping code resistant to time jumps
Denys Vlasenko [Tue, 17 Apr 2012 15:10:31 +0000 (17:10 +0200)]
udhcp: make arpping code resistant to time jumps

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
12 years agowho,less: tweaked help text
Denys Vlasenko [Tue, 17 Apr 2012 14:11:25 +0000 (16:11 +0200)]
who,less: tweaked help text

function                                             old     new   delta
packed_usage                                       29176   29173      -3

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
12 years agomktemp: add support for -u
Denys Vlasenko [Tue, 17 Apr 2012 14:00:20 +0000 (16:00 +0200)]
mktemp: add support for -u

zlib-1.2.6 Makefile uses "mktemp -u".

function                                             old     new   delta
___path_search                                         -     266    +266
mktemp_main                                          165     250     +85
tempnam                                                -      79     +79
packed_usage                                       29189   29176     -13
------------------------------------------------------------------------------
(add/remove: 3/0 grow/shrink: 1/1 up/down: 430/-13)           Total: 417 bytes

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
12 years agoDrop include/bb_linux_ext2_fs.h, use existing e2fsprogs/e2fs_defs.h
Denys Vlasenko [Tue, 17 Apr 2012 13:06:55 +0000 (15:06 +0200)]
Drop include/bb_linux_ext2_fs.h, use existing e2fsprogs/e2fs_defs.h

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
12 years agoumount: make -d always active, add -D to suppress it
Denys Vlasenko [Tue, 17 Apr 2012 11:07:28 +0000 (13:07 +0200)]
umount: make -d always active, add -D to suppress it

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
12 years agoTweak INSTALL text
Denys Vlasenko [Tue, 17 Apr 2012 10:28:13 +0000 (12:28 +0200)]
Tweak INSTALL text

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
12 years agoCreate and use our own copy of linux/ext2_fs.h
Denys Vlasenko [Fri, 13 Apr 2012 14:39:18 +0000 (16:39 +0200)]
Create and use our own copy of linux/ext2_fs.h

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
12 years agowork around linux/ext2_fs.h breakage
Denys Vlasenko [Thu, 12 Apr 2012 12:01:10 +0000 (14:01 +0200)]
work around linux/ext2_fs.h breakage

See https://bugzilla.kernel.org/show_bug.cgi?id=42986

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
12 years agokillall5: don't do STOP/CONT dance if the signal we send is SIGSTOP or SIGCONT
Denys Vlasenko [Tue, 3 Apr 2012 06:16:05 +0000 (08:16 +0200)]
killall5: don't do STOP/CONT dance if the signal we send is SIGSTOP or SIGCONT

function                                             old     new   delta
kill_main                                            913     942     +29

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
12 years agohttpd: emit correct content length on range requests past the end. Closes 4952
Rob Walker [Tue, 3 Apr 2012 06:09:28 +0000 (08:09 +0200)]
httpd: emit correct content length on range requests past the end. Closes 4952

Signed-off-by: Rob Walker <rwalker@codeaurora.org>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
12 years agohostname: make -i not emit extra trailing space
Denys Vlasenko [Sun, 1 Apr 2012 14:52:21 +0000 (16:52 +0200)]
hostname: make -i not emit extra trailing space

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
12 years agontpd: fix build failure if !NTPD_SERVER. Closes 4994
Denys Vlasenko [Sun, 1 Apr 2012 14:31:04 +0000 (16:31 +0200)]
ntpd: fix build failure if !NTPD_SERVER. Closes 4994

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
12 years agolsof: new applet
Sven Oliver Moll [Sun, 1 Apr 2012 14:23:23 +0000 (16:23 +0200)]
lsof: new applet

   text    data     bss     dec     hex filename
    221       0       0     221      dd lsof.o

Signed-off-by: Sven Oliver Moll <busybox@svol.li>
Signed-off-by: souf <souf_oued@yahoo.fr>
Signed-off-by: Tito Ragusa <farmatito@tiscali.it>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
12 years agobloat-o-meter: Remove unused code
Bernhard Reutner-Fischer [Fri, 30 Mar 2012 17:50:39 +0000 (19:50 +0200)]
bloat-o-meter: Remove unused code

The regex matching is way slower, so remove it since it was disabled
anyway.

Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
12 years agobloat-o-meter: handle huge (hex) sizes.
Bernhard Reutner-Fischer [Fri, 30 Mar 2012 17:14:27 +0000 (19:14 +0200)]
bloat-o-meter: handle huge (hex) sizes.

dynamic symbols with size >99999 are printed in hex.
see print_vma(psym->st_size, DEC_5)

Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
12 years agohush: remove unused member struct command::is_stopped
Denys Vlasenko [Tue, 27 Mar 2012 12:32:48 +0000 (14:32 +0200)]
hush: remove unused member struct command::is_stopped

function                                             old     new   delta
builtin_umask                                        133     132      -1
checkjobs                                            551     544      -7
builtin_fg_bg                                        291     267     -24

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
12 years agobusybox: tweak help text
Denys Vlasenko [Thu, 22 Mar 2012 10:15:06 +0000 (11:15 +0100)]
busybox: tweak help text

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
12 years agoftp{get,put}: tweak help text
Denys Vlasenko [Mon, 19 Mar 2012 11:22:57 +0000 (12:22 +0100)]
ftp{get,put}: tweak help text

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
12 years agoFix one-applet build for tcpsvd
Denys Vlasenko [Mon, 19 Mar 2012 03:38:00 +0000 (04:38 +0100)]
Fix one-applet build for tcpsvd

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
12 years agonc: support "-<other_opts>e PROG" form of -e option
Denys Vlasenko [Mon, 19 Mar 2012 00:17:36 +0000 (01:17 +0100)]
nc: support "-<other_opts>e PROG" form of -e option

function                                             old     new   delta
nc_main                                              975    1033     +58
doexec                                                31      45     +14
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 2/0 up/down: 72/0)               Total: 72 bytes

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
12 years agoubi_tools: add workaround for bad kernel headers. Closes 4838
Denys Vlasenko [Sun, 11 Mar 2012 17:04:14 +0000 (18:04 +0100)]
ubi_tools: add workaround for bad kernel headers. Closes 4838

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
12 years agobuild system: remove bogus $(1) in last commit
Denys Vlasenko [Sun, 11 Mar 2012 11:17:20 +0000 (12:17 +0100)]
build system: remove bogus $(1) in last commit

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
12 years agobuild system: detect missing crypt and drop it from linking
Denys Vlasenko [Sat, 10 Mar 2012 15:30:00 +0000 (16:30 +0100)]
build system: detect missing crypt and drop it from linking

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
12 years agontpd: make "reply from IP" messages more uniform
Denys Vlasenko [Thu, 8 Mar 2012 12:02:52 +0000 (13:02 +0100)]
ntpd: make "reply from IP" messages more uniform

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
12 years agotest: "test !" was accessing argv past NULL - fix it. Closes 4832
Denys Vlasenko [Thu, 8 Mar 2012 02:50:01 +0000 (03:50 +0100)]
test: "test !" was accessing argv past NULL - fix it. Closes 4832

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
12 years agontpd: drop offset averaging code
Denys Vlasenko [Thu, 8 Mar 2012 02:27:49 +0000 (03:27 +0100)]
ntpd: drop offset averaging code

function                                             old     new   delta
filter_datapoints                                    475     174    -301

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
12 years agotftpd: chroot to DIR, not merely chdir. Closes 4874
Denys Vlasenko [Wed, 7 Mar 2012 23:28:52 +0000 (00:28 +0100)]
tftpd: chroot to DIR, not merely chdir. Closes 4874

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
12 years agolibbb: make xchroot do a chdir("/") after chroot
Denys Vlasenko [Wed, 7 Mar 2012 23:28:24 +0000 (00:28 +0100)]
libbb: make xchroot do a chdir("/") after chroot

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
12 years agobuild system: fix broken CONFIG_SYSROOT handling
Denys Vlasenko [Wed, 7 Mar 2012 23:20:01 +0000 (00:20 +0100)]
build system: fix broken CONFIG_SYSROOT handling

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
12 years agoAdd SYSROOT, EXTRA_{LDFLAGS,LDLIBS} config opts; sample Android NDK config
Rob Walker [Wed, 7 Mar 2012 11:25:53 +0000 (12:25 +0100)]
Add SYSROOT, EXTRA_{LDFLAGS,LDLIBS} config opts; sample Android NDK config

Signed-off-by: Rob Walker <rwalker@rwalker.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
12 years agoprintf: fix this case: printf "%b" '\0057usr\0057bin\n'
Denys Vlasenko [Wed, 7 Mar 2012 10:57:47 +0000 (11:57 +0100)]
printf: fix this case: printf "%b" '\0057usr\0057bin\n'

It was not accepting \0NNN. Standard printf tool does.

function                                             old     new   delta
printf_main                                          869     886     +17

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
12 years agoprintf: trim help text
Denys Vlasenko [Wed, 7 Mar 2012 10:44:15 +0000 (11:44 +0100)]
printf: trim help text

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
12 years agontpd: tweak log messages format
Denys Vlasenko [Tue, 6 Mar 2012 18:16:50 +0000 (19:16 +0100)]
ntpd: tweak log messages format

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
12 years agotestsuite: add a test that tar detects XZ-compressed data
Denys Vlasenko [Tue, 6 Mar 2012 15:57:01 +0000 (16:57 +0100)]
testsuite: add a test that tar detects XZ-compressed data

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
12 years agofix trivial bug in unpack_gz_stream (wrong fd used in read)
Denys Vlasenko [Tue, 6 Mar 2012 15:46:25 +0000 (16:46 +0100)]
fix trivial bug in unpack_gz_stream (wrong fd used in read)

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
12 years agoDon't compile get_header_tar_FOO function if they are not needed
Denys Vlasenko [Tue, 6 Mar 2012 15:34:23 +0000 (16:34 +0100)]
Don't compile get_header_tar_FOO function if they are not needed

Now get_header_tar_gz, get_header_tar_bz2, get_header_tar_lzma
are only used if dpkg is built.

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
12 years agotar,rpm2cpio: check that child decompressor did not error out
Denys Vlasenko [Tue, 6 Mar 2012 15:33:42 +0000 (16:33 +0100)]
tar,rpm2cpio: check that child decompressor did not error out

function                                             old     new   delta
check_errors_in_children                               -      57     +57
tar_main                                             833     848     +15
get_header_tar                                      1720    1733     +13
rpm2cpio_main                                        147     140      -7
handle_SIGCHLD                                        41       -     -41
------------------------------------------------------------------------------
(add/remove: 1/1 grow/shrink: 2/1 up/down: 85/-48)             Total: 37 bytes

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
12 years agoMove seamless .Z support into unpack_gz_stream
Denys Vlasenko [Tue, 6 Mar 2012 15:32:06 +0000 (16:32 +0100)]
Move seamless .Z support into unpack_gz_stream

unpack_gz_stream                                     566     643     +77
unpack_gunzip                                        123      12    -111

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
12 years agoupdate seamless uncompression code
Denys Vlasenko [Tue, 6 Mar 2012 15:27:48 +0000 (16:27 +0100)]
update seamless uncompression code

This change makes "tar tf hello_world.txz" work without
adding special-casing for ".txz" extension. It also removes
ever-growing magic checking code in rpm2cpio and get_header_tar -
we reuse one which lives in setup_unzip_on_fd.

function                                             old     new   delta
unpack_gz_stream                                       7     566    +559
check_signature16                                      -      70     +70
setup_unzip_on_fd                                     99     142     +43
handle_SIGCHLD                                         -      41     +41
unpack_bz2_stream                                    342     376     +34
unzip_main                                          2352    2385     +33
bbunpack                                             503     533     +30
open_transformer                                      74     102     +28
unpack_Z_stream                                     1278    1304     +26
unpack_gunzip                                        101     123     +22
init_transformer_aux_data                              -      18     +18
unpack_xz_stream                                    2388    2402     +14
open_zipped                                          131     141     +10
rpm_main                                            1358    1363      +5
get_header_tar_lzma                                   52      57      +5
get_header_tar_bz2                                    52      57      +5
unpack_lzma_stream                                  2698    2702      +4
hash_find                                            234     233      -1
get_header_tar                                      1759    1733     -26
get_header_tar_gz                                     92      57     -35
unpack_uncompress                                     51      12     -39
rpm2cpio_main                                        201     147     -54
unpack_unxz                                           67      12     -55
unpack_bz2_stream_prime                               55       -     -55
get_header_tar_Z                                      86       -     -86
unpack_gz_stream_with_info                           539       -    -539
------------------------------------------------------------------------------
(add/remove: 3/3 grow/shrink: 14/6 up/down: 947/-890)          Total: 57 bytes

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
12 years agoarchival/libarchive/decompress_unzip.c -> decompress_gunzip.c. no code changes
Denys Vlasenko [Tue, 6 Mar 2012 15:26:20 +0000 (16:26 +0100)]
archival/libarchive/decompress_unzip.c -> decompress_gunzip.c. no code changes

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
12 years agopreparatory cleanups for seamless uncompression improvements
Denys Vlasenko [Tue, 6 Mar 2012 15:23:50 +0000 (16:23 +0100)]
preparatory cleanups for seamless uncompression improvements

unpack_gz_stream_with_info: fix buggy error check
man: fix possible accesses past the end of a string
move seamless uncompression helpers from read_printf.c to open_transformer.c

function                                             old     new   delta
show_manpage                                         153     212     +59
unpack_gz_stream_with_info                           520     539     +19

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
12 years agossd: compat: match -x EXECUTABLE by /proc/pid/exe too
Denys Vlasenko [Mon, 5 Mar 2012 15:28:07 +0000 (16:28 +0100)]
ssd: compat: match -x EXECUTABLE by /proc/pid/exe too

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
12 years agouudecode: tweak help text
Denys Vlasenko [Mon, 5 Mar 2012 13:23:26 +0000 (14:23 +0100)]
uudecode: tweak help text

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
12 years agouuencode: tweak help text
Denys Vlasenko [Mon, 5 Mar 2012 13:22:33 +0000 (14:22 +0100)]
uuencode: tweak help text

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
12 years agontpd: fix a case when discipline_jitter = 0 if we step
Denys Vlasenko [Mon, 5 Mar 2012 09:18:00 +0000 (10:18 +0100)]
ntpd: fix a case when discipline_jitter = 0 if we step

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
12 years agocp: trim help text
Denys Vlasenko [Mon, 5 Mar 2012 09:09:18 +0000 (10:09 +0100)]
cp: trim help text

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
12 years agodu: trim help text a bit more
Denys Vlasenko [Mon, 5 Mar 2012 08:59:56 +0000 (09:59 +0100)]
du: trim help text a bit more

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
12 years agodu: remove stray whitespace in help text
Denys Vlasenko [Mon, 5 Mar 2012 08:52:19 +0000 (09:52 +0100)]
du: remove stray whitespace in help text

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
12 years agontpd: experimental code to correct frequency a bit more aggressively
Denys Vlasenko [Sun, 4 Mar 2012 23:51:48 +0000 (00:51 +0100)]
ntpd: experimental code to correct frequency a bit more aggressively

function                                             old     new   delta
update_local_clock                                   730     792     +62
recv_and_process_peer_pkt                            850     835     -15

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
12 years agoblkid: if parameters are given, do not scan /dev
Denys Vlasenko [Sat, 3 Mar 2012 14:09:07 +0000 (15:09 +0100)]
blkid: if parameters are given, do not scan /dev

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
12 years agontpd: fix the "are we a server" check in previous commit
Denys Vlasenko [Sat, 3 Mar 2012 12:50:31 +0000 (13:50 +0100)]
ntpd: fix the "are we a server" check in previous commit

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
12 years agontpd: avoid printing messages between send and recv. good for fast networks
Denys Vlasenko [Sat, 3 Mar 2012 11:15:46 +0000 (12:15 +0100)]
ntpd: avoid printing messages between send and recv. good for fast networks

function                                             old     new   delta
ntpd_main                                            887     929     +42

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
12 years agontpd: log clock drift with three digits after decimal point
Denys Vlasenko [Fri, 2 Mar 2012 14:51:43 +0000 (15:51 +0100)]
ntpd: log clock drift with three digits after decimal point

+15 bytes.

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
12 years agontpd: log jitter on update too; increase assumed clock precision x2 - to 2ms
Denys Vlasenko [Fri, 2 Mar 2012 00:22:40 +0000 (01:22 +0100)]
ntpd: log jitter on update too; increase assumed clock precision x2 - to 2ms

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
12 years agodate: extend help text to explain compat date format. Closes 4820
Denys Vlasenko [Thu, 1 Mar 2012 07:36:07 +0000 (08:36 +0100)]
date: extend help text to explain compat date format. Closes 4820

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
12 years agofbsplash: use line_length instead of xres * bytes_per_pixel
Yin Kangkai [Thu, 23 Feb 2012 07:56:36 +0000 (15:56 +0800)]
fbsplash: use line_length instead of xres * bytes_per_pixel

In some system (e.g. my "strange" device), line_length is not equal xres *
bytes_per_pixel, so we need to use line_length in scr_fix to mmap and draw
rectangle etc.

My "strange" device output this:
bytes_per_pixel: 4
xres: 600, yres: 1024
yoffset: 0, xoffset: 0, line_length: 2432
G.addr: b74da000

Signed-off-by: Yin Kangkai <kangkai.yin@intel.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
12 years agolibbb/procps.c: make fast_strtoul_10() stop on '\n' too
Denys Vlasenko [Tue, 28 Feb 2012 10:16:21 +0000 (11:16 +0100)]
libbb/procps.c: make fast_strtoul_10() stop on '\n' too

This time for real :)

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
12 years agogrep: support for -x, match whole line
Natanael Copa [Thu, 23 Feb 2012 14:20:22 +0000 (14:20 +0000)]
grep: support for -x, match whole line

Specified in POSIX.
http://pubs.opengroup.org/onlinepubs/009604499/utilities/grep.html

Signed-off-by: Natanael Copa <ncopa@alpinelinux.org>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
12 years agolibbb/procps.c: make fast_strtoul_10() stop on '\n' too
Denys Vlasenko [Tue, 28 Feb 2012 02:36:49 +0000 (03:36 +0100)]
libbb/procps.c: make fast_strtoul_10() stop on '\n' too

This is needed for parsing /proc data on linux 2.4

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
12 years agodu: use long long for size field
Ian Wienand [Tue, 28 Feb 2012 02:10:31 +0000 (03:10 +0100)]
du: use long long for size field

du has issues with files reporting large block counts on
32-bit systems with 4 byte longs.  From looking at the stat.c code, it
seems the preference is to use 'long long', rather than blkcnt_t.

function                                             old     new   delta
du                                                   420     444     +24
du_main                                              317     321      +4
print                                                 43      41      -2
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 2/1 up/down: 28/-2)              Total: 26 bytes

Signed-off-by: Ian Wienand <ianw@vmware.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
12 years agontpd: fix offset adjustment after step; better step printing
Denys Vlasenko [Tue, 28 Feb 2012 01:45:00 +0000 (02:45 +0100)]
ntpd: fix offset adjustment after step; better step printing

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
12 years agontpd: increase OPT_qq constant to not collide with -L
Denys Vlasenko [Thu, 23 Feb 2012 13:28:47 +0000 (14:28 +0100)]
ntpd: increase OPT_qq constant to not collide with -L

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
12 years agotar: add support for PAX-encoded path=LONGFILENAME
Denys Vlasenko [Thu, 23 Feb 2012 12:45:18 +0000 (13:45 +0100)]
tar: add support for PAX-encoded path=LONGFILENAME

function                                             old     new   delta
get_header_tar                                      1478    1759    +281

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
12 years agomkdir: fix permissions on 64-bit platforms
Timo Teras [Fri, 10 Feb 2012 07:55:24 +0000 (09:55 +0200)]
mkdir: fix permissions on 64-bit platforms

sizeof(long) != sizeof(mode_t), this causes the compare in
bb_make_directory of (long)-1 != (mode_t)-1 to fail and mess up
the permissions of final directory by doing chmod((mode_t) -1).

Signed-off-by: Timo Teras <timo.teras@iki.fi>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
12 years agoifupdown: support metric for static default gw
Natanael Copa [Fri, 17 Feb 2012 19:36:26 +0000 (19:36 +0000)]
ifupdown: support metric for static default gw

This is useful when you have multiple ISPs with failover. It allows
setting the priority of the static gateway and makes it possible
to specify multiple static gateways.

The ubuntu ifupdown supports it.

function                                             old     new   delta
.rodata                                           116725  116797     +72
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 1/0 up/down: 72/0)               Total: 72 bytes
   text    data     bss     dec     hex filename
 953343    7313    8984  969640   ecba8 busybox_old
 953415    7313    8984  969712   ecbf0 busybox_unstripped

Signed-off-by: Natanael Copa <natanael.copa@gmail.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
12 years agohttpd: make byte ranges which start at 0 work too. Closes 4766
Denys Vlasenko [Sun, 19 Feb 2012 16:18:45 +0000 (17:18 +0100)]
httpd: make byte ranges which start at 0 work too. Closes 4766

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
12 years agomodprobe-small: add comment about aliased commands' help text
Denys Vlasenko [Sun, 19 Feb 2012 15:57:08 +0000 (16:57 +0100)]
modprobe-small: add comment about aliased commands' help text

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
12 years agodepmod: supply help text
Lauri Kasanen [Sun, 19 Feb 2012 15:33:37 +0000 (16:33 +0100)]
depmod: supply help text

Signed-off-by: Lauri Kasanen <curaga@operamail.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
12 years agogetopt: trim help text
Denys Vlasenko [Thu, 9 Feb 2012 17:39:16 +0000 (18:39 +0100)]
getopt: trim help text

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
12 years agoapplets_sh/*: Add a few more examples of "shell applets"
Pere Orga [Thu, 9 Feb 2012 17:23:33 +0000 (18:23 +0100)]
applets_sh/*: Add a few more examples of "shell applets"

Signed-off-by: Pere Orga <gotrunks@gmail.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
12 years agogetopt: simple code shrink; expand help text
Denys Vlasenko [Thu, 9 Feb 2012 17:17:29 +0000 (18:17 +0100)]
getopt: simple code shrink; expand help text

function                                             old     new   delta
packed_usage                                       28978   29184    +206
getopt_main                                          656     632     -24

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
12 years agoMake unix (local) sockets work without IPv6 enabled
Jonh Wendell [Thu, 9 Feb 2012 14:14:33 +0000 (15:14 +0100)]
Make unix (local) sockets work without IPv6 enabled

The xsocket_type() function had an optional "family" argument
that was enabled only if IPv6 is enabled. In the case of the
function was called with a valid AF_UNIX argument, and IPv6 is
disabled, this argument was silently ignored.

This patch makes the "family" argument mandatory, while keeping
the old behavior i.e., if AF_UNSPEC is passed, we try first IPv6
(if it's enabled) and fallback to IPv4.

Also I changed all callers of xsocket_type() to reflect its new
interface.

Signed-off-by: Jonh Wendell <jonh.wendell@vexcorp.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
12 years agomdev: add a comment. no code changes
Denys Vlasenko [Mon, 6 Feb 2012 00:00:00 +0000 (01:00 +0100)]
mdev: add a comment. no code changes

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
12 years agoacpid: do not install handlers for fatal signals
Denys Vlasenko [Sun, 5 Feb 2012 14:08:08 +0000 (15:08 +0100)]
acpid: do not install handlers for fatal signals

For acpid, it's ok to die at once.

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