Commit Graph

12734 Commits

Author SHA1 Message Date
Denys Vlasenko
39c2cb2e93 build system: fix broken CONFIG_SYSROOT handling
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2012-03-08 00:20:01 +01:00
Rob Walker
bf6343796e 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>
2012-03-07 12:25:53 +01:00
Denys Vlasenko
69d81a1c1b 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>
2012-03-07 11:57:47 +01:00
Denys Vlasenko
d4acaf70c5 printf: trim help text
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2012-03-07 11:44:15 +01:00
Denys Vlasenko
8be49c3a80 ntpd: tweak log messages format
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2012-03-06 19:16:50 +01:00
Denys Vlasenko
bb8d7db597 testsuite: add a test that tar detects XZ-compressed data
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2012-03-06 16:57:01 +01:00
Denys Vlasenko
d29c946f93 fix trivial bug in unpack_gz_stream (wrong fd used in read)
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2012-03-06 16:46:25 +01:00
Denys Vlasenko
b5d6ae9a33 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>
2012-03-06 16:34:23 +01:00
Denys Vlasenko
faac1d3e6e 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>
2012-03-06 16:33:42 +01:00
Denys Vlasenko
02c3c38420 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>
2012-03-06 16:32:06 +01:00
Denys Vlasenko
8a6a2f9c9c 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>
2012-03-06 16:27:48 +01:00
Denys Vlasenko
774bce8e8b archival/libarchive/decompress_unzip.c -> decompress_gunzip.c. no code changes
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2012-03-06 16:26:20 +01:00
Denys Vlasenko
59655077c5 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>
2012-03-06 16:23:50 +01:00
Denys Vlasenko
17eedcad94 ssd: compat: match -x EXECUTABLE by /proc/pid/exe too
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2012-03-05 16:28:07 +01:00
Denys Vlasenko
11e61d5c71 uudecode: tweak help text
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2012-03-05 14:23:26 +01:00
Denys Vlasenko
fa737cebe7 uuencode: tweak help text
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2012-03-05 14:22:33 +01:00
Denys Vlasenko
547ee7926e ntpd: fix a case when discipline_jitter = 0 if we step
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2012-03-05 10:18:00 +01:00
Denys Vlasenko
b3439d4727 cp: trim help text
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2012-03-05 10:09:18 +01:00
Denys Vlasenko
bb9254a3b2 du: trim help text a bit more
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2012-03-05 09:59:56 +01:00
Denys Vlasenko
81b6bf1852 du: remove stray whitespace in help text
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2012-03-05 09:52:19 +01:00
Denys Vlasenko
132b044f4b 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>
2012-03-05 00:51:48 +01:00
Denys Vlasenko
e8cfc3f693 blkid: if parameters are given, do not scan /dev
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2012-03-03 15:09:07 +01:00
Denys Vlasenko
97e5281641 ntpd: fix the "are we a server" check in previous commit
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2012-03-03 13:50:31 +01:00
Denys Vlasenko
e8ce285395 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>
2012-03-03 12:15:46 +01:00
Denys Vlasenko
b124c3491b ntpd: log clock drift with three digits after decimal point
+15 bytes.

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2012-03-02 15:51:43 +01:00
Denys Vlasenko
74584b8665 ntpd: log jitter on update too; increase assumed clock precision x2 - to 2ms
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2012-03-02 01:22:40 +01:00
Denys Vlasenko
03a99e3d5c date: extend help text to explain compat date format. Closes 4820
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2012-03-01 08:36:07 +01:00
Yin Kangkai
3ac066c256 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>
2012-02-29 18:07:59 +01:00
Denys Vlasenko
62c006d508 libbb/procps.c: make fast_strtoul_10() stop on '\n' too
This time for real :)

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2012-02-28 11:16:21 +01:00
Natanael Copa
cd09e81520 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>
2012-02-28 03:44:08 +01:00
Denys Vlasenko
0b170e6a09 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>
2012-02-28 03:36:49 +01:00
Ian Wienand
694738f4eb 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>
2012-02-28 03:10:31 +01:00
Denys Vlasenko
fc4ebd0d0b ntpd: fix offset adjustment after step; better step printing
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2012-02-28 02:45:00 +01:00
Denys Vlasenko
16c52a5d7b ntpd: increase OPT_qq constant to not collide with -L
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2012-02-23 14:28:47 +01:00
Denys Vlasenko
6111f967f5 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>
2012-02-23 13:45:18 +01:00
Timo Teras
af36ba206f 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>
2012-02-23 03:22:25 +01:00
Natanael Copa
cfcb1dac83 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>
2012-02-19 17:25:55 +01:00
Denys Vlasenko
8cce1b3ad8 httpd: make byte ranges which start at 0 work too. Closes 4766
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2012-02-19 17:18:45 +01:00
Denys Vlasenko
b2d668872c modprobe-small: add comment about aliased commands' help text
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2012-02-19 16:57:08 +01:00
Lauri Kasanen
5a5db93b0f depmod: supply help text
Signed-off-by: Lauri Kasanen <curaga@operamail.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2012-02-19 16:33:37 +01:00
Denys Vlasenko
817c230a0c getopt: trim help text
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2012-02-09 18:39:16 +01:00
Pere Orga
d0222503ff 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>
2012-02-09 18:23:33 +01:00
Denys Vlasenko
594db1e62a 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>
2012-02-09 18:17:29 +01:00
Jonh Wendell
9106107a50 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>
2012-02-09 15:14:33 +01:00
Denys Vlasenko
638dbc34b3 mdev: add a comment. no code changes
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2012-02-06 01:00:00 +01:00
Denys Vlasenko
bbf1e3c144 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>
2012-02-05 15:08:08 +01:00
Aaro Koskinen
6e9d047c15 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>
2012-02-04 21:55:01 +01:00
Denys Vlasenko
ef43beac63 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>
2012-02-04 21:37:17 +01:00
Denys Vlasenko
9ec3cd400a tweak comment, no code changes
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2012-02-02 11:29:43 +01:00
Denys Vlasenko
35def51c97 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>
2012-02-01 02:42:54 +01:00