oweals/busybox.git
11 years agobuild system: use pkg-config to look up selinux libs 1_20_stable
Mike Frysinger [Sat, 20 Oct 2012 19:01:26 +0000 (15:01 -0400)]
build system: use pkg-config to look up selinux libs

Newer versions of libselinux has started linking against more libs.
Rather than continuing hardcoding things, switch to using pkg-config
to query for its dependencies.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
11 years agoinclude sys/resource.h where needed
Mike Frysinger [Fri, 6 Jul 2012 03:19:09 +0000 (23:19 -0400)]
include sys/resource.h where needed

We use functions from sys/resource.h in misc applets, but don't include
the header.  This breaks building with newer glibc versions, so add the
include where needed.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
(cherry picked from commit c5fe9f7b723f949457263ef8e22ab807d5b549ce)

11 years agoinetd: fix build failure in Android
Tias Guns [Sun, 10 Jun 2012 12:19:01 +0000 (14:19 +0200)]
inetd: fix build failure in Android

Signed-off-by: Tias Guns <tias@ulyssis.org>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
(cherry picked from commit 64f763b42a43cbf36e401690ff6767c25575e520)

11 years agoApply post-1.20.1 patches, bump version to 1.20.2 1_20_2
Denys Vlasenko [Thu, 9 Aug 2012 22:36:07 +0000 (00:36 +0200)]
Apply post-1.20.1 patches, bump version to 1.20.2

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
11 years agoApply post-1.20.0 patches, bump version to 1.20.1 1_20_1
Denys Vlasenko [Mon, 28 May 2012 00:48:55 +0000 (02:48 +0200)]
Apply post-1.20.0 patches, bump version to 1.20.1

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>
12 years agocttyhack: handle multiple consoles found in sysfs
Aaro Koskinen [Sat, 4 Feb 2012 20:55:01 +0000 (21:55 +0100)]
cttyhack: handle multiple consoles found in sysfs

If multiple consoles are found from the sysfs file, cttyhack fails:

cttyhack: can't open '/dev/tty0 ttyS0': No such file or directory

In such cases take the last one as the kernel will use that one for
/dev/console.

Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
12 years agohttpd: fix sendfile of files larger than 2 Gb. Closes 4754
Denys Vlasenko [Sat, 4 Feb 2012 20:37:17 +0000 (21:37 +0100)]
httpd: fix sendfile of files larger than 2 Gb. Closes 4754

When built with "sendfile" support, httpd was unable to send large files
(>2 GB) in one single connection, terminating it before the full file
has been sent.

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
12 years agotweak comment, no code changes
Denys Vlasenko [Thu, 2 Feb 2012 10:29:43 +0000 (11:29 +0100)]
tweak comment, no code changes

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
12 years agohttpd: fix MD5-encrypted-in-httpd.conf password logic
Denys Vlasenko [Wed, 1 Feb 2012 01:42:54 +0000 (02:42 +0100)]
httpd: fix MD5-encrypted-in-httpd.conf password logic

function                                             old     new   delta
check_user_passwd                                    467     492     +25

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
12 years agomodprobe: accept -b even if blacklist functionality is disabled
Felipe Contreras [Tue, 31 Jan 2012 13:55:15 +0000 (14:55 +0100)]
modprobe: accept -b even if blacklist functionality is disabled

Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
12 years agovi: add ":prev" command support
Dennis Groenen [Tue, 31 Jan 2012 13:12:38 +0000 (14:12 +0100)]
vi: add ":prev" command support

function                                             old     new   delta
colon                                               2844    2891     +47
vi_main                                              243     255     +12
text_yank                                             54      56      +2
refresh                                              780     774      -6

Signed-off-by: Dennis Groenen <tj.groenen@gmail.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
12 years agovi: move mark[i] pointers if text[] moves after realloc
Denys Vlasenko [Tue, 31 Jan 2012 13:10:26 +0000 (14:10 +0100)]
vi: move mark[i] pointers if text[] moves after realloc

While at it, optimized :s/find/repl/ a bit

function                                             old     new   delta
text_hole_make                                       120     150     +30
colon                                               2848    2844      -4

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
12 years agologin: -f should not ask for password even with PAM
Sergey Naumov [Mon, 30 Jan 2012 11:52:56 +0000 (12:52 +0100)]
login: -f should not ask for password even with PAM

Signed-off-by: Sergey Naumov <sknaumov@gmail.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
12 years agoinit: add a segv debugging aid, disabled by default
Denys Vlasenko [Mon, 30 Jan 2012 11:15:22 +0000 (12:15 +0100)]
init: add a segv debugging aid, disabled by default

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
12 years agogen_build_files.sh: exclude hidden directories
Paulius Zaleckas [Mon, 30 Jan 2012 01:34:56 +0000 (02:34 +0100)]
gen_build_files.sh: exclude hidden directories

I am using quilt to manage patches internally. Quilt creates dir .pc
and stores unmodified files there. Since I made change in one of
Config.src quilt made a copy in .pc/xxx.patch/xxx/Config.src. When
I run make it calls gen_build_files.sh and it generates
.pc/xxx.patch/xxx/Config.in. Now when I want to pop patch quilt
thinks I have made changes to original xxx/Config.in.

IMO the best solution is just to ignore hidden directories in
gen_build_files.sh. This also results in shorter build time in case
busybox is under git/svn versioning, since it avoids searching
many directories for Config.src.

Signed-off-by: Paulius Zaleckas <paulius.zaleckas@gmail.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
12 years agomdev: fix wrong sizeof
Javier Viguera [Fri, 27 Jan 2012 17:30:20 +0000 (18:30 +0100)]
mdev: fix wrong sizeof

Signed-off-by: Javier Viguera <javier.viguera@digi.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
12 years agobootchartd: add process accounting feature
Quentin Casasnovas [Wed, 18 Jan 2012 01:12:13 +0000 (02:12 +0100)]
bootchartd: add process accounting feature

function                                             old     new   delta
bootchartd_main                                      962    1088    +126
finalize                                             294     357     +63
acct                                                   -      33     +33
------------------------------------------------------------------------------
(add/remove: 2/0 grow/shrink: 2/0 up/down: 222/0)             Total: 222 bytes

Signed-off-by: Quentin Casasnovas <quentin.casasnovas@mathembedded.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>