Commit Graph

11627 Commits

Author SHA1 Message Date
Denys Vlasenko
b0fbe4b540 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>
2010-08-05 17:19:27 +02:00
Daniel Dickinson
e74d79866c 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>
2010-08-03 04:26:20 +02:00
Denys Vlasenko
6e06da5efd update _shipped file with hurd fix
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-08-02 02:17:25 +02:00
Denys Vlasenko
b883bc9884 sed.tests: make last test less confusing
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-08-01 04:19:59 +02:00
Denys Vlasenko
2e284a40bc sed: fix sed -i: unlike without -i, it does not forget ranges
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-08-01 04:14:46 +02:00
Jeremie Koenig
138ce54c9c 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>
2010-08-01 03:31:35 +02:00
Jeremie Koenig
63c2e7ecc0 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>
2010-08-01 03:01:44 +02:00
Denys Vlasenko
17662801ec cttyhack: make it survive WERROR build
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-07-30 17:41:35 +02:00
Jeremie Koenig
430ba79c39 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>
2010-07-30 17:40:37 +02:00
Marek Polacek
85a359afab 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>
2010-07-30 16:43:11 +02:00
Denys Vlasenko
3fb4a5e6d8 mpstat: better fix for IRQ counts
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-07-30 13:55:35 +02:00
Denys Vlasenko
9bb0510b9b mpstat: fix total par-cpu IRQ counts
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-07-30 13:38:46 +02:00
Denys Vlasenko
64c67891a2 mpstat: fix/improve handling of interrupt names
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-07-30 12:45:14 +02:00
Maksym Kryzhanovskyy
5e87c2ef15 mpstat: small code shrink
Signed-off-by: Maksym Kryzhanovskyy <xmaks@email.cz>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-07-30 03:56:02 +02:00
Jeremie Koenig
68fca4cd55 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>
2010-07-30 03:03:29 +02:00
Jeremie Koenig
e7a0632b7b 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>
2010-07-30 01:16:00 +02:00
Jeremie Koenig
5a71fb8202 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>
2010-07-30 01:15:46 +02:00
Leonid Lisovskiy
1538c975ec 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>
2010-07-29 10:11:09 +02:00
Bernhard Reutner-Fischer
64b6f7cfba doc: remove trailing empty line
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2010-07-29 09:34:04 +02:00
Denys Vlasenko
506d3a9bca dc: tweak help text
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-07-29 04:06:07 +02:00
Denys Vlasenko
7a07b0ee6a 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>
2010-07-29 04:00:27 +02:00
Denys Vlasenko
416f0405cb less: fix duplicate "depends on PLATFORM_LINUX". no code changes
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-07-29 02:26:22 +02:00
Bernhard Reutner-Fischer
3d615b8a41 find_stray_empty_lines: make it work
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2010-07-28 21:29:19 +02:00
Javier Viguera
a3f71001c3 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>
2010-07-28 21:01:55 +02:00
Alexander Shishkin
17e0e43c35 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>
2010-07-27 08:40:55 +02:00
Denys Vlasenko
06702365d7 mktemp: fix for dir/file.XXXXXX param (by Rob). +9 bytes.
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-07-27 08:26:32 +02:00
Denys Vlasenko
b4d035165f *: s/spaces/tabs/
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-07-26 12:47:36 +02:00
Denys Vlasenko
f0b82142b2 *: fix unterminated last lines. no code changes
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-07-26 12:26:04 +02:00
Peter Korsgaard
e5dbd56d77 httpd: simplified "gzip" test
function                                             old     new   delta
handle_incoming_and_exit                            2830    2807     -23

Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-07-26 02:08:35 +02:00
Denys Vlasenko
ba2dcccd79 *: trailing empty lines removed
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-07-26 01:49:12 +02:00
Denys Vlasenko
0f8960542f *: more empty lines removed. no code changes
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-07-26 01:35:44 +02:00
Denys Vlasenko
f3ea792bad *: mass cosmetic removal of extra empty lines. no code changes
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-07-26 01:06:14 +02:00
Alexander Shishkin
ccb9771861 ash: fix $! value when traps are set
Signed-off-by: Alexander Shishkin <virtuoso@slind.org>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-07-25 13:07:39 +02:00
Peter Korsgaard
7a2ba329b9 httpd: optional support for gzip-compressed pages
function                                             old     new   delta
send_file_and_exit                                   662     761     +99
handle_incoming_and_exit                            2756    2830     +74
send_headers                                         603     654     +51
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 3/0 up/down: 224/0)             Total: 224 bytes

Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-07-25 03:20:53 +02:00
Denys Vlasenko
535ce1df5c httpd: cosmetic fixes, no code changes
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-07-25 03:20:25 +02:00
Denys Vlasenko
451add4f23 lineedit: mostly revert recent wrong logic in "ask terminal" code
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-07-25 00:06:41 +02:00
Denys Vlasenko
2e9b5510d6 libiproute: code shrink by adding FAST_FUNC
function                                             old     new   delta
ipaddr_list_or_flush                                1282    1293     +11
ip_parse_common_args                                 153     151      -2
ip_main                                               53      50      -3
ip_do                                                 19      15      -4
do_iptunnel                                          985     980      -5
do_iprule                                            982     977      -5
do_iplink                                           1637    1631      -6
do_iproute                                          2105    2098      -7
do_ipaddr                                           1406    1398      -8
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 1/8 up/down: 11/-40)            Total: -29 bytes

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-07-24 23:27:38 +02:00
Denys Vlasenko
e0a622093c ip: fix "ip r" breakage
function                                             old     new   delta
static.ip_func_ptrs                                    -      32     +32
ip_main                                              110      53     -57
------------------------------------------------------------------------------
(add/remove: 1/0 grow/shrink: 0/1 up/down: 32/-57)            Total: -25 bytes

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-07-24 23:26:58 +02:00
Natanael Copa
b78ac5a20e libnetlink: code shrink
function                                             old     new   delta
xrtnl_open                                            95      93      -2
parse_rtattr                                          87      85      -2
rtnl_close                                             9       -      -9
xrtnl_wilddump_request                               101      64     -37
------------------------------------------------------------------------------
(add/remove: 0/1 grow/shrink: 0/3 up/down: 0/-50)             Total: -50 bytes

Signed-off-by: Natanael Copa <natanael.copa@gmail.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-07-23 01:31:24 +02:00
Maksym Kryzhanovskyy
4f0279bd93 ifplugd: code shrink
function                                             old     new   delta
ifplugd_main                                        1089    1161     +72
method_table                                           -      40     +40
detect_link                                          221     207     -14
static.method                                         40       -     -40
netlink_open                                          79       -     -79
------------------------------------------------------------------------------
(add/remove: 1/2 grow/shrink: 1/1 up/down: 112/-133)          Total: -21 bytes

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-07-22 02:18:05 +02:00
Denys Vlasenko
c5fb0ada9b vi: fix "ask terminal" code
function                                             old     new   delta
edit_file                                            761     793     +32
refresh                                              773     780      +7
query_screen_dimensions                               63      54      -9

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-07-21 12:39:42 +02:00
Denys Vlasenko
217df6ea9f mpstat: small code shrink
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-07-21 11:54:33 +02:00
Marek Polacek
23e8c08fa2 mpstat: new applet. ~5.5k
Signed-off-by: Marek Polacek <mmpolacek@gmail.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-07-21 10:29:07 +02:00
Denys Vlasenko
ba085c6351 make DESKTOP=y the default
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-07-21 08:58:11 +02:00
Jeremie Koenig
2ea12d8b6d tcpsvd,udpsvd: conditionalize usage of SO_ORIGINAL_DST
On systems without this call, $TCPORIGDSTADDR is not set.

Signed-off-by: Jeremie Koenig <jk@jk.fr.eu.org>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-07-19 00:46:57 +02:00
Jeremie Koenig
29885114a5 libbb: conditionalize AF_* usage in error reporting
Signed-off-by: Jeremie Koenig <jk@jk.fr.eu.org>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-07-19 00:46:47 +02:00
Jeremie Koenig
84b01d5afc mkdir: fix -p on FreeBSD
This patch is libbb.make_directory.diff from Debian kFreeBSD at:
http://svn.debian.org/viewsvn/d-i/people/slackydeb/kfreebsd/busybox/1.14/debian

Signed-off-by: Jeremie Koenig <jk@jk.fr.eu.org>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-07-19 00:46:28 +02:00
Jeremie Koenig
816ed971e4 libbb.h: add device names for Hurd and FreeBSD
Adapted from include.libbb.diff from the Debian kFreeBSD people:
http://svn.debian.org/viewsvn/d-i/people/slackydeb/kfreebsd/busybox/1.14/debian

Signed-off-by: Jeremie Koenig <jk@jk.fr.eu.org>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-07-19 00:46:23 +02:00
Jeremie Koenig
1c05303fdc init: make the initial $TERM value configurable
Signed-off-by: Jeremie Koenig <jk@jk.fr.eu.org>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-07-19 00:46:00 +02:00
Jeremie Koenig
714674e4da init,halt: portability improvements
* make init and halt use the same RB_* constants for reboot()
* conditionalize the Linux-specific code

Inspired by init.init.diff from the Debian kFreeBSD patches at:
http://svn.debian.org/viewsvn/d-i/people/slackydeb/kfreebsd/busybox/1.14/debian

Signed-off-by: Jeremie Koenig <jk@jk.fr.eu.org>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-07-19 00:45:51 +02:00