oweals/busybox.git
14 years agolineedit: clean up tab completion code (variable reuse, comments)
Denys Vlasenko [Fri, 3 Sep 2010 10:53:15 +0000 (12:53 +0200)]
lineedit: clean up tab completion code (variable reuse, comments)

Noted bugs in behavior.
Added debugging machinery.
Decoupled variables reused for unrelated purposes: apparently,
when not forced to use liveness analysis, gcc fares better.

function                                             old     new   delta
complete_cmd_dir_file                                699     705      +6
collapse_pos                                          75      79      +4
build_match_prefix                                   892     838     -54
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 2/1 up/down: 10/-54)            Total: -44 bytes

Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
14 years agopreparatory cleanup patch for tab completion fixes
Denys Vlasenko [Fri, 3 Sep 2010 10:51:36 +0000 (12:51 +0200)]
preparatory cleanup patch for tab completion fixes

renames and deinlines a few functions

function                                             old     new   delta
input_tab                                              -    1041   +1041
complete_cmd_dir_file                                  -     699    +699
complete_username                                      -     121    +121
username_completion                                  121       -    -121
read_line_input                                     5002    3313   -1689
------------------------------------------------------------------------------
(add/remove: 3/1 grow/shrink: 0/1 up/down: 1861/-1810)         Total: 51 bytes

Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
14 years agolineedit: small readability improvement (same code)
Denys Vlasenko [Thu, 2 Sep 2010 10:44:39 +0000 (12:44 +0200)]
lineedit: small readability improvement (same code)

Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
14 years agolineedit: fix completion with Unicode chars
Denys Vlasenko [Thu, 2 Sep 2010 10:03:11 +0000 (12:03 +0200)]
lineedit: fix completion with Unicode chars

function                                             old     new   delta
read_line_input                                     4966    5002     +36
bb_wcstombs                                          170     159     -11
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 1/1 up/down: 36/-11)             Total: 25 bytes

Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
14 years agolineedit: preparatory cleanup patch for Unicode completion fix
Denys Vlasenko [Thu, 2 Sep 2010 10:01:11 +0000 (12:01 +0200)]
lineedit: preparatory cleanup patch for Unicode completion fix

Some logic changes and function renames. The fix will follow this patch,
to mkae it distinct from cleanup.

function                                             old     new   delta
build_match_prefix                                     -     892    +892
username_completion                                    -     121    +121
read_line_input                                     4902    4966     +64
username_tab_completion                              235       -    -235
find_match                                           892       -    -892
------------------------------------------------------------------------------
(add/remove: 2/2 grow/shrink: 1/0 up/down: 1077/-1127)        Total: -50 bytes

Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
14 years agolibbb: xfunc_error_retval can be a byte
Denys Vlasenko [Wed, 1 Sep 2010 14:04:24 +0000 (16:04 +0200)]
libbb: xfunc_error_retval can be a byte

function                                             old     new   delta
xfunc_die                                             55      60      +5
log_and_exit                                          43      45      +2
hush_main                                            961     963      +2
xfunc_error_retval                                     4       1      -3
tty_main                                              87      84      -3
sv_main                                             1183    1180      -3
sort_main                                            804     801      -3
run_applet_no_and_exit                               440     437      -3
puts_maybe_newline                                   198     195      -3
nohup_main                                           228     225      -3
httpd_main                                           753     750      -3
get_header_tar                                      1496    1493      -3
fsck_minix_main                                     2972    2969      -3
expr_main                                            110     107      -3
cmp_main                                             641     638      -3
chat_main                                           1359    1356      -3
builtin_exit                                          48      45      -3
arping_main                                         1587    1584      -3
BB_EXECVP_or_die                                      47      44      -3
send_cgi_and_exit                                    901     895      -6
diff_main                                           1197    1191      -6
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 3/18 up/down: 9/-60)            Total: -51 bytes

Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
14 years agouudecode,base64: code shrink
Denys Vlasenko [Wed, 1 Sep 2010 11:24:05 +0000 (13:24 +0200)]
uudecode,base64: code shrink

function                                             old     new   delta
read_base64                                          373     358     -15

Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
14 years agobetter shared strings trick
Denys Vlasenko [Wed, 1 Sep 2010 10:01:17 +0000 (12:01 +0200)]
better shared strings trick

   text    data     bss     dec     hex filename
 861980     441    7540  869961   d4649 busybox_old
 861914     441    7540  869895   d4607 busybox_unstripped

Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
14 years agogetty: small code shrink
Denys Vlasenko [Wed, 1 Sep 2010 09:31:43 +0000 (11:31 +0200)]
getty: small code shrink

Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
14 years agofind: add rudimentary support for -exec {} +
Denys Vlasenko [Tue, 31 Aug 2010 17:17:42 +0000 (19:17 +0200)]
find: add rudimentary support for -exec {} +

function                                             old     new   delta
parse_params                                        1421    1414      -7

Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
14 years agobase64: new applet
Denys Vlasenko [Tue, 31 Aug 2010 12:09:22 +0000 (14:09 +0200)]
base64: new applet

function                                             old     new   delta
base64_main                                            -     217    +217
packed_usage                                       27181   27229     +48
read_base64                                          348     373     +25
applet_names                                        2299    2306      +7
bbconfig_config_bz2                                 4942    4948      +6
applet_main                                         1352    1356      +4
applet_nameofs                                       676     678      +2
applet_install_loc                                   169     170      +1
------------------------------------------------------------------------------
(add/remove: 1/0 grow/shrink: 7/0 up/down: 310/0)             Total: 310 bytes

Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
14 years agolibbb: add xfstat function
Denys Vlasenko [Tue, 31 Aug 2010 10:42:06 +0000 (12:42 +0200)]
libbb: add xfstat function

function                                             old     new   delta
xfstat                                                 -      25     +25
mkfs_ext2_main                                      2421    2423      +2
mkfs_reiser_main                                    1197    1194      -3
next                                                 312     307      -5
ar_main                                              533     522     -11
mkfs_minix_main                                     2938    2924     -14
mkfs_vfat_main                                      1511    1495     -16
writeTarFile                                         272     255     -17
------------------------------------------------------------------------------
(add/remove: 1/0 grow/shrink: 1/6 up/down: 27/-66)            Total: -39 bytes

Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
14 years agomkswap: clear 1st kilobyte. Closes bug 1831
Denys Vlasenko [Mon, 30 Aug 2010 23:50:03 +0000 (01:50 +0200)]
mkswap: clear 1st kilobyte. Closes bug 1831

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
14 years agoiplink: another compat #ifndef/#define tweak
Denys Vlasenko [Mon, 30 Aug 2010 17:20:09 +0000 (19:20 +0200)]
iplink: another compat #ifndef/#define tweak

Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
14 years agoash: small code shrink (-21 bytes)
Denys Vlasenko [Mon, 30 Aug 2010 13:20:07 +0000 (15:20 +0200)]
ash: small code shrink (-21 bytes)

Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
14 years agoash: add another ${v/a/b} test we currently fail
Denys Vlasenko [Mon, 30 Aug 2010 11:54:12 +0000 (13:54 +0200)]
ash: add another ${v/a/b} test we currently fail

Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
14 years agotypo fix in comment
Denys Vlasenko [Sun, 29 Aug 2010 23:19:47 +0000 (01:19 +0200)]
typo fix in comment

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
14 years agoremove stray debugging stuff
Denys Vlasenko [Sun, 29 Aug 2010 12:39:45 +0000 (14:39 +0200)]
remove stray debugging stuff

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
14 years agobbconfig: add COMPRESS_BBCONFIG option
Denys Vlasenko [Sun, 29 Aug 2010 12:36:11 +0000 (14:36 +0200)]
bbconfig: add COMPRESS_BBCONFIG option

function                                             old     new   delta
bbconfig_config_bz2                                    -    4905   +4905
bbconfig_main                                         13      70     +57
bbconfig_config                                    21811       -  -21811
------------------------------------------------------------------------------
(add/remove: 1/1 grow/shrink: 1/0 up/down: 4962/-21811)    Total: -16849 bytes

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
14 years agonandwrite: always check the first erase block
Baruch Siach [Sun, 29 Aug 2010 07:36:50 +0000 (10:36 +0300)]
nandwrite: always check the first erase block

Current code does not check the first erase block when mtdoffset is not erase
block aligned. Fix this.

Signed-off-by: Baruch Siach <baruch@tkos.co.il>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
14 years agonandwrite: complain on malformed -s NUM
Denys Vlasenko [Sun, 29 Aug 2010 11:29:02 +0000 (13:29 +0200)]
nandwrite: complain on malformed -s NUM

Elsewhere: use common error message. -30 bytes net size change

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
14 years agonandwrite: allow hex values in the -s parameter
Baruch Siach [Sun, 29 Aug 2010 07:36:49 +0000 (10:36 +0300)]
nandwrite: allow hex values in the -s parameter

Signed-off-by: Baruch Siach <baruch@tkos.co.il>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
14 years agoshowkey: code shrink
Denys Vlasenko [Sun, 29 Aug 2010 03:00:40 +0000 (05:00 +0200)]
showkey: code shrink

function                                             old     new   delta
signal_handler                                        52      45      -7
showkey_main                                         461     454      -7
xset1                                                 40      29     -11

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
14 years agotestsuite: show the number of failures after a test run
Dan Fandrich [Sun, 29 Aug 2010 02:47:03 +0000 (04:47 +0200)]
testsuite: show the number of failures after a test run

Signed-off-by: Dan Fandrich <dan@coneharvesters.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
14 years agotypo fixes in config help text
Denys Vlasenko [Sun, 29 Aug 2010 00:06:50 +0000 (02:06 +0200)]
typo fixes in config help text

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
14 years agopmap: new applet. +1k.
Alexander Shishkin [Sat, 28 Aug 2010 21:20:34 +0000 (23:20 +0200)]
pmap: new applet. +1k.

pmap is a tool used to look at processes' memory maps, normally found
in procps package. It provides more readable and easily sortable output
(one line per mapping) from  maps/smaps files in /proc/PID/.  This would
help in debugging memory usage issues, especially on devices where lots
of typing is not a viable option.

This patch does'n implement -d and -A command line options of GNU pmap,
since those are not that must have features and I was afraid of going
blind from looking at its code.

The implementation takes smaps scanning part out of procps_scan() function
and moves it into procps_read_smaps(), which does more detailed processing
of a single PID's smaps data.

Signed-off-by: Alexander Shishkin <virtuoso@slind.org>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
14 years agontpd: with -q, exit after 60 seconds even if time is not synced.
Denys Vlasenko [Fri, 27 Aug 2010 00:15:01 +0000 (02:15 +0200)]
ntpd: with -q, exit after 60 seconds even if time is not synced.

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
14 years agomodutils: explain why we no longer quote params
Denys Vlasenko [Wed, 25 Aug 2010 16:26:46 +0000 (18:26 +0200)]
modutils: explain why we no longer quote params

Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
14 years agoinsmod: Do not add a pair of "" around the arguments of the module.
Carmelo AMOROSO [Tue, 24 Aug 2010 04:01:13 +0000 (06:01 +0200)]
insmod: Do not add a pair of "" around the arguments of the module.

If there are some spaces in the insmod command line, then
this will be splitted in single words as separate elements of
argv. It just needs to chain them together in the options string
passed to the sys_init_module syscall.

Signed-off-by: Carmelo Amoroso <carmelo.amoroso@st.com>
Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
14 years agonandwrite: new applet
Baruch Siach [Wed, 25 Aug 2010 14:36:17 +0000 (16:36 +0200)]
nandwrite: new applet

function                                             old     new   delta
nandwrite_main                                         -     382    +382
packed_usage                                       27119   27135     +16
applet_names                                        2275    2285     +10
applet_main                                         1340    1344      +4
applet_nameofs                                       670     672      +2
------------------------------------------------------------------------------
(add/remove: 2/0 grow/shrink: 4/0 up/down: 414/0)             Total: 414 bytes

Signed-off-by: Baruch Siach <baruch@tkos.co.il>
Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
14 years agoRename a struct member from "interrupt"
Dan Fandrich [Tue, 24 Aug 2010 05:23:04 +0000 (22:23 -0700)]
Rename a struct member from "interrupt"

This is nonstandard, but common, keyword in embedded compilers.

Signed-off-by: Dan Fandrich <dan@coneharvesters.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
14 years agosplit: use xopen_stdin()
Denys Vlasenko [Mon, 23 Aug 2010 01:06:46 +0000 (03:06 +0200)]
split: use xopen_stdin()

function                                             old     new   delta
split_main                                           558     543     -15

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
14 years agogrep: fix -o match with empty string (suggested by Colin Watson <cjwatson@ubuntu...
Denys Vlasenko [Mon, 23 Aug 2010 00:39:47 +0000 (02:39 +0200)]
grep: fix -o match with empty string (suggested by Colin Watson <cjwatson@ubuntu.com>)

function                                             old     new   delta
grep_file                                           1216    1251     +35

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
14 years agoip: add a #define for older kernels
Denys Vlasenko [Sun, 22 Aug 2010 08:02:55 +0000 (10:02 +0200)]
ip: add a #define for older kernels

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
14 years agobuild system: make 3.82 fix. Closes bug 2323
Denys Vlasenko [Sun, 22 Aug 2010 07:28:46 +0000 (09:28 +0200)]
build system: make 3.82 fix. Closes bug 2323

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
14 years agopatch: support "patch [FILE [PATCH]]" format
Denys Vlasenko [Sun, 22 Aug 2010 03:39:15 +0000 (05:39 +0200)]
patch: support "patch [FILE [PATCH]]" format

function                                             old     new   delta
xopen_stdin                                            -      15     +15
patch_main                                          2075    2041     -34

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
14 years agolibbb: fix fallout from last patch to obscure() (my mistake). +143 bytes
Denys Vlasenko [Tue, 17 Aug 2010 15:21:36 +0000 (17:21 +0200)]
libbb: fix fallout from last patch to obscure() (my mistake). +143 bytes

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
14 years agolibbb: shrink obscure()
Bob Dunlop [Tue, 17 Aug 2010 14:01:16 +0000 (16:01 +0200)]
libbb: shrink obscure()

function                                             old     new   delta
string_checker_helper                                 59      45     -14
string_checker                                       116      98     -18
obscure                                              367     204    -163
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 0/3 up/down: 0/-195)           Total: -195 bytes

Signed-off-by: Bob Dunlop <bob.dunlop@xyzzy.org.uk>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
14 years agopatch: fix -N regression
Denys Vlasenko [Mon, 16 Aug 2010 23:31:40 +0000 (01:31 +0200)]
patch: fix -N regression

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
14 years agonmeter: fix misplaced closing comment
Denys Vlasenko [Mon, 16 Aug 2010 18:42:14 +0000 (20:42 +0200)]
nmeter: fix misplaced closing comment

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
14 years ago*: make GNU licensing statement forms more regular
Denys Vlasenko [Mon, 16 Aug 2010 18:14:46 +0000 (20:14 +0200)]
*: make GNU licensing statement forms more regular

This change retains "or later" state! No licensing _changes_ here,
only form is adjusted (article, space between "GPL" and "v2" and so on).

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
14 years agosed: make N command behave as in GNU sed
Denys Vlasenko [Mon, 16 Aug 2010 14:26:33 +0000 (16:26 +0200)]
sed: make N command behave as in GNU sed

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
14 years agomdev: fix non-working device deletion, add a test for that
Denys Vlasenko [Mon, 16 Aug 2010 12:26:15 +0000 (14:26 +0200)]
mdev: fix non-working device deletion, add a test for that

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
14 years agoplatform.h: regularize endian detection
Denys Vlasenko [Mon, 16 Aug 2010 01:24:40 +0000 (03:24 +0200)]
platform.h: regularize endian detection

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
14 years ago*: fix "see file License ..." - the file is named LICENSE (in uppercase)
Denys Vlasenko [Mon, 16 Aug 2010 01:04:14 +0000 (03:04 +0200)]
*: fix "see file License ..." - the file is named LICENSE (in uppercase)

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
14 years agopatch: uncomment the test which we actually do pass now
Denys Vlasenko [Mon, 16 Aug 2010 00:56:32 +0000 (02:56 +0200)]
patch: uncomment the test which we actually do pass now

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
14 years agolibbb: factor out common code from mpstat/iostat
Denys Vlasenko [Mon, 16 Aug 2010 00:49:21 +0000 (02:49 +0200)]
libbb: factor out common code from mpstat/iostat

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
14 years agopatch: add -N and a test for it (fails for now)
Denys Vlasenko [Sun, 15 Aug 2010 23:33:57 +0000 (01:33 +0200)]
patch: add -N and a test for it (fails for now)

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
14 years agopatch: move closer to toybox code
Denys Vlasenko [Fri, 13 Aug 2010 14:41:15 +0000 (16:41 +0200)]
patch: move closer to toybox code

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
14 years agopatch: deal with ommitted ",len" in hunk headers (default len to 1)
Rob Landley [Fri, 13 Aug 2010 14:40:21 +0000 (16:40 +0200)]
patch: deal with ommitted ",len" in hunk headers (default len to 1)

Signed-off-by: Rob Landley <rob@landley.net>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
14 years agopatch: replace it with toybox's implementation
Rob Landley [Fri, 13 Aug 2010 13:50:26 +0000 (15:50 +0200)]
patch: replace it with toybox's implementation

Signed-off-by: Rob Landley <rob@landley.net>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
14 years agoiostat: add forgotted fclose(); fix default count.
Denys Vlasenko [Thu, 12 Aug 2010 13:36:34 +0000 (15:36 +0200)]
iostat: add forgotted fclose(); fix default count.

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
14 years ago*: s/xatoi_u/xatoi_positive/g - I got bored of mistyping xatoi_u as xatou_i
Denys Vlasenko [Thu, 12 Aug 2010 12:14:45 +0000 (14:14 +0200)]
*: s/xatoi_u/xatoi_positive/g - I got bored of mistyping xatoi_u as xatou_i

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
14 years agofree: more compatible output. +16 bytes. Closes bug 2383.
Denys Vlasenko [Wed, 11 Aug 2010 23:56:44 +0000 (01:56 +0200)]
free: more compatible output. +16 bytes. Closes bug 2383.

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
14 years agoiostat: new applet. 2800 bytes
Marek Polacek [Wed, 11 Aug 2010 15:00:59 +0000 (17:00 +0200)]
iostat: new applet. 2800 bytes

Signed-off-by: Marek Polacek <mmpolacek@gmail.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
14 years agomodutils: Add support for NDS32 architecture.
Macpaul Lin [Thu, 5 Aug 2010 05:14:05 +0000 (13:14 +0800)]
modutils: Add support for NDS32 architecture.

Add support of NDS32 architecture to modutils.

Signed-off-by: Macpaul Lin <macpaul@andestech.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
14 years agofdisk: Add support for NDS32 architecture.
Macpaul Lin [Thu, 5 Aug 2010 05:14:04 +0000 (13:14 +0800)]
fdisk: Add support for NDS32 architecture.

NDS32 is a new architecture invented by Andestech.com.
This patch add the support to fdisk utility.

Signed-off-by: Macpaul Lin <macpaul@andestech.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
14 years agoRemove some more mentions of Subversion
Dan Fandrich [Wed, 11 Aug 2010 06:45:27 +0000 (23:45 -0700)]
Remove some more mentions of Subversion

Signed-off-by: Dan Fandrich <dan@coneharvesters.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
14 years agoImproved portability of tests
Dan Fandrich [Wed, 11 Aug 2010 06:33:57 +0000 (23:33 -0700)]
Improved portability of tests

Removed assumptions about umask and locale. Fixed hostname
tests to work even when the host has no DNS domain set.

Signed-off-by: Dan Fandrich <dan@coneharvesters.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
14 years agontpd: mention -N in help text
Denys Vlasenko [Wed, 11 Aug 2010 03:15:52 +0000 (05:15 +0200)]
ntpd: mention -N in help text

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
14 years agoSet HWCLOCK_ADJTIME_FHS to off by default
Denys Vlasenko [Tue, 10 Aug 2010 13:14:36 +0000 (15:14 +0200)]
Set HWCLOCK_ADJTIME_FHS to off by default

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
14 years agortc: remove useless code in "RTC is in UTC" detection
Denys Vlasenko [Tue, 10 Aug 2010 11:06:06 +0000 (13:06 +0200)]
rtc: remove useless code in "RTC is in UTC" detection

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
14 years agowget: fix ndelay_on call; progress bar: small shrink
Denys Vlasenko [Sun, 8 Aug 2010 02:21:50 +0000 (04:21 +0200)]
wget: fix ndelay_on call; progress bar: small shrink

function                                             old     new   delta
bb_progress_update                                   682     670     -12

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
14 years agowget: make -T support enabled by default
Denys Vlasenko [Sun, 8 Aug 2010 00:59:06 +0000 (02:59 +0200)]
wget: make -T support enabled by default

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
14 years agowget: implement -T SEC; rework progress meter to not use signals (it was unsafe)
Bradley M. Kuhn [Sun, 8 Aug 2010 00:51:20 +0000 (02:51 +0200)]
wget: implement -T SEC; rework progress meter to not use signals (it was unsafe)

function                                             old     new   delta
retrieve_file_data                                   364     450     +86
bb_progress_update                                   615     682     +67
packed_usage                                       27406   27422     +16
wget_main                                           2440    2453     +13
static.wget_longopts                                 145     155     +10
progress_meter                                       199     159     -40
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 5/1 up/down: 192/-40)           Total: 152 bytes

Signed-off-by: Bradley M. Kuhn <bkuhn@ebb.org>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
14 years agoash: fix another bit of var_bash4 bug
Denys Vlasenko [Sat, 7 Aug 2010 20:24:36 +0000 (22:24 +0200)]
ash: fix another bit of var_bash4 bug

But it _still_ doesn't pass! quoted case is a tough nut to crack

function                                             old     new   delta
redirect                                            1281    1286      +5
subevalvar                                          1141    1142      +1

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
14 years agoFix a typo in config text
Denys Vlasenko [Sat, 7 Aug 2010 12:02:26 +0000 (14:02 +0200)]
Fix a typo in config text

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
14 years agoudhcpc: add -v to help text
Denys Vlasenko [Sat, 7 Aug 2010 00:56:43 +0000 (02:56 +0200)]
udhcpc: add -v to help text

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
14 years agoash: cosmetic fixes, no code changes
Denys Vlasenko [Sat, 7 Aug 2010 00:44:33 +0000 (02:44 +0200)]
ash: cosmetic fixes, no code changes

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
14 years agoash: fix another bug detected by var_bash4.tests
Denys Vlasenko [Fri, 6 Aug 2010 20:06:21 +0000 (22:06 +0200)]
ash: fix another bug detected by var_bash4.tests

... but var_bash4.tests still does not pass!

function                                             old     new   delta
expandarg                                            959     962      +3
localcmd                                             259     257      -2
readtoken1                                          3275    3260     -15
subevalvar                                          1178    1141     -37
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 1/3 up/down: 3/-54)             Total: -51 bytes

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
14 years agovar_bash4.tests: better wording in comment
Denys Vlasenko [Fri, 6 Aug 2010 17:28:04 +0000 (19:28 +0200)]
var_bash4.tests: better wording in comment

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
14 years agoash: fix dequoting error detected by var_bash4 test
Denys Vlasenko [Fri, 6 Aug 2010 17:14:47 +0000 (19:14 +0200)]
ash: fix dequoting error detected by var_bash4 test

But the test still fails (one more bug to fix)

function                                             old     new   delta
changepath                                           195     192      -3
readtoken1                                          3247    3240      -7
subevalvar                                          1204    1184     -20
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 0/3 up/down: 0/-30)             Total: -30 bytes

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
14 years agoupdate var_bash4 test. one more bug revealed by it now...
Denys Vlasenko [Fri, 6 Aug 2010 15:21:52 +0000 (17:21 +0200)]
update var_bash4 test. one more bug revealed by it now...

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
14 years agoOpenBSD compatibility
Waldemar Brodkorb [Fri, 6 Aug 2010 07:17:26 +0000 (09:17 +0200)]
OpenBSD compatibility

Signed-off-by: Waldemar Brodkorb <wbx@openadk.org>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
14 years agoash: extend var_bash4.tests; nocode changes
Denys Vlasenko [Thu, 5 Aug 2010 16:29:13 +0000 (18:29 +0200)]
ash: extend var_bash4.tests; nocode changes

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
14 years agoash: add a testcase for bug 2281 (currently fails). Small code cleanups.
Denys Vlasenko [Thu, 5 Aug 2010 15:19:27 +0000 (17:19 +0200)]
ash: add a testcase for bug 2281 (currently fails). Small code cleanups.

function                                             old     new   delta
changepath                                           195     192      -3
subevalvar                                          1204    1200      -4
readtoken1                                          3247    3240      -7
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 0/3 up/down: 0/-14)             Total: -14 bytes

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
14 years agosyslogd: close/re-resolve/reopen remote sockets on some sendto() errors
Daniel Dickinson [Tue, 3 Aug 2010 02:26:20 +0000 (04:26 +0200)]
syslogd: close/re-resolve/reopen remote sockets on some sendto() errors

function                                             old     new   delta
syslogd_main                                        1201    1262     +61

Signed-off-by: Daniel Dickinson <cshore@csolve.net>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
14 years agoupdate _shipped file with hurd fix
Denys Vlasenko [Mon, 2 Aug 2010 00:17:25 +0000 (02:17 +0200)]
update _shipped file with hurd fix

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
14 years agosed.tests: make last test less confusing
Denys Vlasenko [Sun, 1 Aug 2010 02:19:59 +0000 (04:19 +0200)]
sed.tests: make last test less confusing

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
14 years agosed: fix sed -i: unlike without -i, it does not forget ranges
Denys Vlasenko [Sun, 1 Aug 2010 02:14:46 +0000 (04:14 +0200)]
sed: fix sed -i: unlike without -i, it does not forget ranges

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
14 years agostty: sort out preprocessor conditionals
Jeremie Koenig [Fri, 30 Jul 2010 04:01:37 +0000 (06:01 +0200)]
stty: sort out preprocessor conditionals

* Move the definitions of missing constants to the top of the file.
* Fix undefined IDX_xxx on missing termios constants.
* FreeBSD has TABDLY, TAB0 and TAB3, but no TAB1 or TAB2
* Omit the definition of set_window_size() if TIOCGWINSZ is not available.

Signed-off-by: Jeremie Koenig <jk@jk.fr.eu.org>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
14 years agoklogd: make it work on non-linux systems
Jeremie Koenig [Sun, 1 Aug 2010 01:01:44 +0000 (03:01 +0200)]
klogd: make it work on non-linux systems

The klogctl() interface allows changing the console loglevel, but is
Linux-specific. The more portable method of reading from _PATH_KLOG is
added as an alternative.

Adapted from the Debian kFreeBSD patch at:
http://svn.debian.org/viewsvn/d-i/people/slackydeb/kfreebsd/busybox/1.14/debian/klogd.diff

Signed-off-by: Jeremie Koenig <jk@jk.fr.eu.org>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
14 years agocttyhack: make it survive WERROR build
Denys Vlasenko [Fri, 30 Jul 2010 15:41:35 +0000 (17:41 +0200)]
cttyhack: make it survive WERROR build

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
14 years agocttyhack: serial console detection is Linux-specific
Jeremie Koenig [Fri, 30 Jul 2010 04:21:21 +0000 (06:21 +0200)]
cttyhack: serial console detection is Linux-specific

Signed-off-by: Jeremie Koenig <jk@jk.fr.eu.org>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
14 years agompstat: do not use /sys to get number of CPUs. /proc should be ok.
Marek Polacek [Fri, 30 Jul 2010 14:43:11 +0000 (16:43 +0200)]
mpstat: do not use /sys to get number of CPUs. /proc should be ok.

function                                             old     new   delta
get_cpu_nr                                             -     137    +137
mpstat_main                                         1140    1131      -9
get_proc_cpu_nr                                      137       -    -137
get_sys_cpu_nr                                       178       -    -178
------------------------------------------------------------------------------
(add/remove: 1/2 grow/shrink: 0/1 up/down: 137/-324)         Total: -187 bytes

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
14 years agompstat: better fix for IRQ counts
Denys Vlasenko [Fri, 30 Jul 2010 11:55:35 +0000 (13:55 +0200)]
mpstat: better fix for IRQ counts

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
14 years agompstat: fix total par-cpu IRQ counts
Denys Vlasenko [Fri, 30 Jul 2010 11:38:46 +0000 (13:38 +0200)]
mpstat: fix total par-cpu IRQ counts

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
14 years agompstat: fix/improve handling of interrupt names
Denys Vlasenko [Fri, 30 Jul 2010 10:45:14 +0000 (12:45 +0200)]
mpstat: fix/improve handling of interrupt names

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
14 years agompstat: small code shrink
Maksym Kryzhanovskyy [Fri, 30 Jul 2010 01:56:02 +0000 (03:56 +0200)]
mpstat: small code shrink

Signed-off-by: Maksym Kryzhanovskyy <xmaks@email.cz>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
14 years agovlock: disable linux console calls on other systems
Jeremie Koenig [Thu, 29 Jul 2010 02:29:52 +0000 (04:29 +0200)]
vlock: disable linux console calls on other systems

Signed-off-by: Jeremie Koenig <jk@jk.fr.eu.org>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
14 years agobootchartd: mounting tmpfs is Linux-specific
Jeremie Koenig [Thu, 29 Jul 2010 02:29:53 +0000 (04:29 +0200)]
bootchartd: mounting tmpfs is Linux-specific

Signed-off-by: Jeremie Koenig <jk@jk.fr.eu.org>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
14 years agoless: remove misguided dependency on PLATFORM_LINUX
Jeremie Koenig [Thu, 29 Jul 2010 02:29:47 +0000 (04:29 +0200)]
less: remove misguided dependency on PLATFORM_LINUX

Signed-off-by: Jeremie Koenig <jk@jk.fr.eu.org>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
14 years agotestsuite: typo in tr.tests
Leonid Lisovskiy [Thu, 29 Jul 2010 07:05:30 +0000 (11:05 +0400)]
testsuite: typo in tr.tests

Hi

tr.tests script from bb 1.17 testsuite has wrong "optional"
conditional clauses. As result, some tr tests was skipped even if
CONFIG_FEATURE_TR_CLASSES=y. Patch attached fixes problem for me.

- Leonid

Signed-off-by: Leonid Lisovskiy <lly.dev@gmail.com>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
14 years agodoc: remove trailing empty line
Bernhard Reutner-Fischer [Thu, 29 Jul 2010 07:34:04 +0000 (09:34 +0200)]
doc: remove trailing empty line

Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
14 years agodc: tweak help text
Denys Vlasenko [Thu, 29 Jul 2010 02:06:07 +0000 (04:06 +0200)]
dc: tweak help text

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
14 years agodc: make it use long longs for integer ops
Denys Vlasenko [Thu, 29 Jul 2010 02:00:27 +0000 (04:00 +0200)]
dc: make it use long longs for integer ops

function                                             old     new   delta
print_base                                           176     238     +62
or                                                    91     103     +12
eor                                                   91     103     +12
and                                                   91     103     +12
not                                                   60      64      +4
mod                                                  103     105      +2
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 6/0 up/down: 104/0)             Total: 104 bytes

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
14 years agoless: fix duplicate "depends on PLATFORM_LINUX". no code changes
Denys Vlasenko [Thu, 29 Jul 2010 00:22:43 +0000 (02:22 +0200)]
less: fix duplicate "depends on PLATFORM_LINUX". no code changes

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
14 years agofind_stray_empty_lines: make it work
Bernhard Reutner-Fischer [Wed, 28 Jul 2010 19:29:19 +0000 (21:29 +0200)]
find_stray_empty_lines: make it work

Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
14 years agofind_stray_empty_lines: fix tail "invalid context" error
Javier Viguera [Tue, 27 Jul 2010 09:13:28 +0000 (11:13 +0200)]
find_stray_empty_lines: fix tail "invalid context" error

"tail -1" works only with one input file. Using it with multiple input
files throws following error on Ubuntu systems:

tail: option used in invalid context

Adding "-n" makes it work on all cases.

Signed-off-by: Javier Viguera <javier.viguera@digi.com>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
14 years agoulimit: set both hard and soft limits by default
Alexander Shishkin [Tue, 27 Jul 2010 06:40:55 +0000 (08:40 +0200)]
ulimit: set both hard and soft limits by default

function                                             old     new   delta
shell_builtin_ulimit                                 494     498      +4

Signed-off-by: Alexander Shishkin <virtuoso@slind.org>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>