oweals/busybox.git
13 years agosetconsole: open console for writing rather than reading
Peter Korsgaard [Thu, 26 May 2011 15:51:37 +0000 (17:51 +0200)]
setconsole: open console for writing rather than reading

The console passed to TIOCCONS has to be writable, otherwise future
console writes will fail.

This presumably used to work, but in current kernels (see
drivers/tty/tty_io.c:redirected_tty_write) console writes are sent to
vfs_write(device), which checks if the device is writable. A quick look
in the linux git history doesn't show any recent changes to either tty_io
or vfs_write.

Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
13 years agonmeter: trim help text
Denys Vlasenko [Thu, 26 May 2011 07:00:23 +0000 (09:00 +0200)]
nmeter: trim help text

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
13 years agosyslogd,klogd: better help text
Denys Vlasenko [Wed, 25 May 2011 09:58:56 +0000 (11:58 +0200)]
syslogd,klogd: better help text

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
13 years agofuser: code shrink
Maksym Kryzhanovskyy [Mon, 23 May 2011 01:39:48 +0000 (03:39 +0200)]
fuser: code shrink

function                                             old     new   delta
scan_proc_net_or_maps                                  -     427    +427
scan_recursive                                         -     380    +380
search_dev_inode                                      74      71      -3
add_pid                                               39       -     -39
scan_link                                             46       -     -46
scan_dir_links                                        76       -     -76
scan_pid_maps                                        222       -    -222
fuser_main                                           871     297    -574
------------------------------------------------------------------------------
(add/remove: 2/4 grow/shrink: 0/2 up/down: 807/-960)         Total: -153 bytes

Signed-off-by: Maksym Kryzhanovskyy <xmaks@email.cz>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
13 years agolibbb.h: small reordering
Denys Vlasenko [Mon, 23 May 2011 01:39:08 +0000 (03:39 +0200)]
libbb.h: small reordering

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
13 years agofind: cater for libc w/o FNM_CASEFOLD
Denys Vlasenko [Sun, 22 May 2011 22:40:54 +0000 (00:40 +0200)]
find: cater for libc w/o FNM_CASEFOLD

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
13 years agofind: implement -ipath
Bogdan Harjoc [Sun, 22 May 2011 01:50:21 +0000 (03:50 +0200)]
find: implement -ipath

Signed-off-by: Bogdan Harjoc <harjoc@gmail.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
13 years agoreformime: do not require \r\n
Denys Vlasenko [Sun, 22 May 2011 01:46:33 +0000 (03:46 +0200)]
reformime: do not require \r\n

function                                             old     new   delta
parse                                                958    1063    +105
packed_usage                                       28691   28712     +21

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
13 years agoadduser: better logic for choosing addgroup -g/--gid
Denys Vlasenko [Sat, 21 May 2011 19:32:40 +0000 (21:32 +0200)]
adduser: better logic for choosing addgroup -g/--gid

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
13 years agoadduser: prefer to call addgroup --gid, not non-std addgroup -g
Denys Vlasenko [Sat, 21 May 2011 17:57:58 +0000 (19:57 +0200)]
adduser: prefer to call addgroup --gid, not non-std addgroup -g

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
13 years agood: code shrink
Denys Vlasenko [Sat, 21 May 2011 17:15:55 +0000 (19:15 +0200)]
od: code shrink

function                                             old     new   delta
od_main                                             2147    2132     -15

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
13 years agood: another fix for --strings
Denys Vlasenko [Sat, 21 May 2011 16:47:51 +0000 (18:47 +0200)]
od: another fix for --strings

function                                             old     new   delta
od_main                                             2139    2147      +8

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
13 years agood: fix -S NUM to not print chars >0x80
Denys Vlasenko [Sat, 21 May 2011 16:38:59 +0000 (18:38 +0200)]
od: fix -S NUM to not print chars >0x80

function                                             old     new   delta
write_block                                          433     431      -2
print_ascii                                          217     215      -2
check_and_close                                      104      96      -8
od_main                                             2164    2139     -25

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
13 years agood: code shrink
Denys Vlasenko [Sat, 21 May 2011 16:38:40 +0000 (18:38 +0200)]
od: code shrink

function                                             old     new   delta
exit_code                                              -       1      +1
open_next_file                                        73      72      -1
limit_bytes_to_format                                  1       -      -1
ioerror                                                1       -      -1
flag_pseudo_start                                      1       -      -1
flag_dump_strings                                      1       -      -1
od_main                                             2275    2164    -111

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
13 years agood: code shrink, fix "od --traditional FILE"
Denys Vlasenko [Sat, 21 May 2011 15:43:06 +0000 (17:43 +0200)]
od: code shrink, fix "od --traditional FILE"

function                                             old     new   delta
parse_old_offset                                     107     125     +18
packed_usage                                       28715   28691     -24
od_main                                             2312    2275     -37

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
13 years agolineedit: fix rare SEGV; mark a few FIXMEs
Alexey Fomenko [Fri, 20 May 2011 02:26:29 +0000 (04:26 +0200)]
lineedit: fix rare SEGV; mark a few FIXMEs

Signed-off-by: Alexey Fomenko <ext-alexey.fomenko@nokia.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
13 years agowarning removal
Cristian Ionescu-Idbohrn [Fri, 20 May 2011 01:52:36 +0000 (03:52 +0200)]
warning removal

Signed-off-by: Cristian Ionescu-Idbohrn <cii@axis.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
13 years agotail: optimize "tail -c HUGENUM REGULAR_FILE". Closes 3763.
Denys Vlasenko [Thu, 19 May 2011 22:30:04 +0000 (00:30 +0200)]
tail: optimize "tail -c HUGENUM REGULAR_FILE". Closes 3763.

function                                             old     new   delta
tail_main                                           1541    1547      +6

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
13 years agotop: display sort indicator in memory display
Denys Vlasenko [Wed, 18 May 2011 10:11:19 +0000 (12:11 +0200)]
top: display sort indicator in memory display

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
13 years agobusybox.conf: code shrink
Denys Vlasenko [Mon, 16 May 2011 12:30:26 +0000 (14:30 +0200)]
busybox.conf: code shrink

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
13 years agobusybox.conf: USER.GROUP is _optional_
Denys Vlasenko [Mon, 16 May 2011 11:53:19 +0000 (13:53 +0200)]
busybox.conf: USER.GROUP is _optional_

function                                             old     new   delta
main                                                 785     809     +24

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
13 years agomain: make busybox.conf mode handling less obscure
Denys Vlasenko [Mon, 16 May 2011 11:19:25 +0000 (13:19 +0200)]
main: make busybox.conf mode handling less obscure

function                                             old     new   delta
static.mode_mask                                       -      20     +20
main                                                 782     785      +3
static.mode_chars                                     15      13      -2
run_applet_no_and_exit                               450     441      -9
mode_mask                                             24       -     -24
------------------------------------------------------------------------------
(add/remove: 2/2 grow/shrink: 1/2 up/down: 41/-53)            Total: -12 bytes

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
13 years agomain: free suid_config list after use
Denys Vlasenko [Mon, 16 May 2011 10:21:31 +0000 (12:21 +0200)]
main: free suid_config list after use

function                                             old     new   delta
run_applet_no_and_exit                               438     450     +12
ifupdown_main                                       2147    2149      +2
writeFileToTarball                                  1325    1326      +1
pidof_main                                           244     245      +1
last_main                                            896     897      +1
grep_main                                            779     780      +1
find_list_entry2                                     121     122      +1
tar_main                                             835     833      -2
llist_unlink                                          28      26      -2
llist_rev                                             23      21      -2
main                                                 791     782      -9
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 7/4 up/down: 19/-15)              Total: 4 bytes

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
13 years agovi.c: remove warning: variable 'sp' set but not used
Cristian Ionescu-Idbohrn [Mon, 16 May 2011 01:53:43 +0000 (03:53 +0200)]
vi.c: remove warning: variable 'sp' set but not used

Signed-off-by: Cristian Ionescu-Idbohrn <cii@axis.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
13 years agoThe [-Wunused-but-set-variable] warnings
Cristian Ionescu-Idbohrn [Mon, 16 May 2011 01:53:00 +0000 (03:53 +0200)]
The [-Wunused-but-set-variable] warnings

networking/ntpd.c:1748:19: warning: variable 'version' set but not used

Signed-off-by: Cristian Ionescu-Idbohrn <cii@axis.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
13 years agodc: do not advertise ops disabled in .config
Denys Vlasenko [Sun, 15 May 2011 22:13:18 +0000 (00:13 +0200)]
dc: do not advertise ops disabled in .config

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
13 years agosimplify parsing of /etc/busybox.conf
Denys Vlasenko [Sun, 15 May 2011 22:01:08 +0000 (00:01 +0200)]
simplify parsing of /etc/busybox.conf

function                                             old     new   delta
parse_config_file                                    799     667    -132

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
13 years agotweak config help text
Denys Vlasenko [Sat, 14 May 2011 13:23:55 +0000 (15:23 +0200)]
tweak config help text

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
13 years agohush: fix misparsing of "... do eval a= ...". Closes 3721
Denys Vlasenko [Sat, 14 May 2011 09:27:36 +0000 (11:27 +0200)]
hush: fix misparsing of "... do eval a= ...". Closes 3721

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
13 years agotop: better indicator of selected field in mem view
Denys Vlasenko [Fri, 13 May 2011 23:32:09 +0000 (01:32 +0200)]
top: better indicator of selected field in mem view

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
13 years agofix "variable 'foo' set but not used" warnings
Denys Vlasenko [Fri, 13 May 2011 18:57:01 +0000 (20:57 +0200)]
fix "variable 'foo' set but not used" warnings

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
13 years agols: code shrink
Denys Vlasenko [Fri, 13 May 2011 15:55:08 +0000 (17:55 +0200)]
ls: code shrink

function                                             old     new   delta
sort_and_display_files                                 -     427    +427
scan_and_display_dirs_recur                          497     488      -9
ls_main                                              765     735     -30
display_files                                        422       -    -422
------------------------------------------------------------------------------
(add/remove: 1/1 grow/shrink: 0/2 up/down: 427/-461)          Total: -34 bytes

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
13 years agols: reorder and rename functions. No code changes
Denys Vlasenko [Fri, 13 May 2011 15:28:46 +0000 (17:28 +0200)]
ls: reorder and rename functions. No code changes

function                                             old     new   delta
display_single                                         -     931    +931
scan_and_display_dirs_recur                            -     497    +497
display_files                                          -     422    +422
showfiles                                            422       -    -422
showdirs                                             497       -    -497
list_single                                          931       -    -931
------------------------------------------------------------------------------
(add/remove: 3/3 grow/shrink: 0/0 up/down: 1850/-1850)          Total: 0 bytes

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
13 years agols: reduce memory consumption and speed up (don't do redundant [l]stat)
Denys Vlasenko [Fri, 13 May 2011 15:28:09 +0000 (17:28 +0200)]
ls: reduce memory consumption and speed up (don't do redundant [l]stat)

function                                             old     new   delta
my_stat                                              110     278    +168
splitdnarray                                         120     118      -2
ls_main                                              769     765      -4
list_single                                          961     931     -30
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 1/3 up/down: 168/-36)           Total: 132 bytes

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
13 years agols: avoid forward declaration. No code changes
Denys Vlasenko [Fri, 13 May 2011 15:27:36 +0000 (17:27 +0200)]
ls: avoid forward declaration. No code changes

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
13 years agols: code shrink
Denys Vlasenko [Fri, 13 May 2011 15:27:15 +0000 (17:27 +0200)]
ls: code shrink

function                                             old     new   delta
list_single                                          990     961     -29

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
13 years agopasswd: shorter help text
Denys Vlasenko [Fri, 13 May 2011 01:31:45 +0000 (03:31 +0200)]
passwd: shorter help text

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
13 years agoadduser: safe username passing to passwd/addgroup
Denys Vlasenko [Fri, 13 May 2011 01:19:01 +0000 (03:19 +0200)]
adduser: safe username passing to passwd/addgroup

passwd: support creating SHA passwords
random code shrink

function                                             old     new   delta
crypt_make_pw_salt                                     -      87     +87
adduser_main                                         883     904     +21
...
crypt_make_salt                                       99      89     -10
chpasswd_main                                        329     312     -17
packed_usage                                       28731   28691     -40
passwd_main                                         1070    1000     -70
cryptpw_main                                         310     224     -86
------------------------------------------------------------------------------
(add/remove: 1/0 grow/shrink: 4/12 up/down: 154/-288)        Total: -134 bytes

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
13 years agohush: install signal handlers with filled sigmask
Denys Vlasenko [Thu, 12 May 2011 21:06:20 +0000 (23:06 +0200)]
hush: install signal handlers with filled sigmask

function                                             old     new   delta
install_sighandler                                     -      39     +39
hush_main                                           1001    1031     +30
builtin_trap                                         386     392      +6
install_sighandlers                                  121     123      +2
switch_off_special_sigs                               87      86      -1
------------------------------------------------------------------------------
(add/remove: 1/0 grow/shrink: 3/1 up/down: 77/-1)              Total: 76 bytes

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
13 years agoinetd: add FIXMEs
Denys Vlasenko [Thu, 12 May 2011 21:05:27 +0000 (23:05 +0200)]
inetd: add FIXMEs

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
13 years agolibbb.h: use inlined sigfillset, sigemptyset, sigisemptyset on uclibc
Denys Vlasenko [Thu, 12 May 2011 21:03:18 +0000 (23:03 +0200)]
libbb.h: use inlined sigfillset, sigemptyset, sigisemptyset on uclibc

   text    data     bss     dec     hex filename
 875879     493    7584  883956   d7cf4 busybox_old
 875879     493    7584  883956   d7cf4 busybox_unstripped

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
13 years agols: fix help text: -w N is optional
Denys Vlasenko [Thu, 12 May 2011 16:44:51 +0000 (18:44 +0200)]
ls: fix help text: -w N is optional

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
13 years agols: fix -p help text, improve comments and define names
Denys Vlasenko [Thu, 12 May 2011 16:40:59 +0000 (18:40 +0200)]
ls: fix -p help text, improve comments and define names

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
13 years agohush: fixes and small shrink for HUSH_JOB!=y
Denys Vlasenko [Thu, 12 May 2011 11:12:47 +0000 (13:12 +0200)]
hush: fixes and small shrink for HUSH_JOB!=y

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
13 years agohush: remove one sigprocmask from exit path
Denys Vlasenko [Thu, 12 May 2011 08:59:18 +0000 (10:59 +0200)]
hush: remove one sigprocmask from exit path

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
13 years agohush: add forgotten {} in multi-statement if.
Denys Vlasenko [Thu, 12 May 2011 07:50:12 +0000 (09:50 +0200)]
hush: add forgotten {} in multi-statement if.

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
13 years agotrim help text
Denys Vlasenko [Thu, 12 May 2011 01:14:12 +0000 (03:14 +0200)]
trim help text

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
13 years agohush: fix login shell's signal handling; add -l option so that it's easier to test
Denys Vlasenko [Thu, 12 May 2011 00:10:33 +0000 (02:10 +0200)]
hush: fix login shell's signal handling; add -l option so that it's easier to test

function                                             old     new   delta
hush_main                                            958    1001     +43
install_special_sighandlers                           47      52      +5
packed_usage                                       28752   28741     -11
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 2/1 up/down: 48/-11)             Total: 37 bytes

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
13 years agohush: replace signal handling machinery
Denys Vlasenko [Wed, 11 May 2011 21:56:11 +0000 (23:56 +0200)]
hush: replace signal handling machinery

With new version of signal handling, read builtin should be less buggy
wrt signals.

function                                             old     new   delta
install_sighandlers                                    -     121    +121
switch_off_special_sigs                                -      84     +84
pick_sighandler                                        -      58     +58
install_special_sighandlers                            -      47     +47
builtin_wait                                         284     319     +35
record_pending_signo                                   -      21     +21
execvp_or_die                                         43      48      +5
file_get                                             290     288      -2
run_list                                            1004     998      -6
static.zero_timespec                                   8       -      -8
sigprocmask_set                                       14       -     -14
sigwaitinfo                                           23       -     -23
record_signal                                         23       -     -23
__GI_sigwaitinfo                                      23       -     -23
sigtimedwait                                          25       -     -25
builtin_trap                                         417     392     -25
__GI_sigtimedwait                                     25       -     -25
hush_main                                           1003     965     -38
check_and_run_traps                                  263     217     -46
__rt_sigtimedwait                                     52       -     -52
reset_traps_to_defaults                              213     126     -87
init_sigmasks                                        198       -    -198
builtin_read                                         536     197    -339
------------------------------------------------------------------------------
(add/remove: 5/10 grow/shrink: 2/7 up/down: 371/-934)        Total: -563 bytes
   text    data     bss     dec     hex filename
 903075     936   17736  921747   e1093 busybox_old
 902547     936   17736  921219   e0e83 busybox_unstripped

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
13 years agohush: use SA_RESTARTed signal handlers across read.
Denys Vlasenko [Wed, 11 May 2011 09:49:21 +0000 (11:49 +0200)]
hush: use SA_RESTARTed signal handlers across read.

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
13 years agofbset: abort on unknown options. closes 3121
Denys Vlasenko [Mon, 9 May 2011 01:57:27 +0000 (03:57 +0200)]
fbset: abort on unknown options. closes 3121

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
13 years agopam link error with SHARED_BUSYBOX and LIBBUSYBOX enabled
Steve Iribarne [Sun, 8 May 2011 23:42:12 +0000 (01:42 +0200)]
pam link error with SHARED_BUSYBOX and LIBBUSYBOX enabled

Signed-off-by: Steve Iribarne <siribarne@grid-net.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
13 years agohush: add tests for interrupting read
Denys Vlasenko [Sun, 8 May 2011 23:05:33 +0000 (01:05 +0200)]
hush: add tests for interrupting read

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
13 years agohush: code shrink
Denys Vlasenko [Sun, 8 May 2011 22:52:15 +0000 (00:52 +0200)]
hush: code shrink

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
13 years agohush: make read builtin interruptible.
Denys Vlasenko [Sun, 8 May 2011 19:23:43 +0000 (21:23 +0200)]
hush: make read builtin interruptible.

function                                             old     new   delta
builtin_read                                         185     471    +286
check_and_run_traps                                  200     262     +62
nonblock_immune_read                                  73     119     +46
sigismember                                            -      44     +44
record_signal                                          -      21     +21
sigisemptyset                                          -      16     +16
...
------------------------------------------------------------------------------
(add/remove: 5/0 grow/shrink: 7/5 up/down: 483/-46)           Total: 437 bytes

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
13 years agolibbb: nonblock_safe_read->nonblock_immune_read, remove unused param of xmalloc_reads
Denys Vlasenko [Sun, 8 May 2011 19:21:10 +0000 (21:21 +0200)]
libbb: nonblock_safe_read->nonblock_immune_read, remove unused param of xmalloc_reads

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
13 years agohush: fix incorrect PS2 dispaly and trap handling while reading command
Denys Vlasenko [Sun, 8 May 2011 19:20:01 +0000 (21:20 +0200)]
hush: fix incorrect PS2 dispaly and trap handling while reading command

The fix affects only !ENABLE_FEATURE_EDITING configuration

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
13 years agoiostat: code shrink ~0.5k
Maksym Kryzhanovskyy [Sat, 7 May 2011 02:37:22 +0000 (04:37 +0200)]
iostat: code shrink ~0.5k

Signed-off-by: Maksym Kryzhanovskyy <xmaks@email.cz>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
13 years agopreparatory patch
Denys Vlasenko [Sat, 7 May 2011 02:36:46 +0000 (04:36 +0200)]
preparatory patch

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
13 years agotop: another scripting improvement
Denys Vlasenko [Fri, 6 May 2011 18:47:54 +0000 (20:47 +0200)]
top: another scripting improvement

function                                             old     new   delta
handle_input                                         492     493      +1

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

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

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

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

function                                             old     new   delta
common_traceroute_main                              4196    4261     +65

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

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

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

function                                             old     new   delta
writeTarHeader                                       841     979    +138

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

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

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

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

function                                             old     new   delta
copy_parsing_escapes                                  65      91     +26

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

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

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

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

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

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

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

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

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

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

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

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

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

function                                             old     new   delta
list_devs_in_proc_partititons                        157     238     +81

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

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

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

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

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

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

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

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

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

function                                             old     new   delta
udhcp_run_script                                     609     818    +209

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Signed-off-by: Pascal Bellard <pascal.bellard@ads-lu.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>