oweals/busybox.git
14 years agomake it possible to keep Config/Kbuild snippets in *.c files
Denys Vlasenko [Sun, 9 May 2010 02:22:48 +0000 (04:22 +0200)]
make it possible to keep Config/Kbuild snippets in *.c files

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
14 years agotune2fs: move to e2fsprogs
Denys Vlasenko [Sat, 8 May 2010 22:13:40 +0000 (00:13 +0200)]
tune2fs: move to e2fsprogs

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
14 years agoifplugd: replace potentially-leaking setenv with malloc/putenv/free
Denys Vlasenko [Sat, 8 May 2010 21:26:16 +0000 (23:26 +0200)]
ifplugd: replace potentially-leaking setenv with malloc/putenv/free

   text    data     bss     dec     hex filename
 842657     453    6828  849938   cf812 busybox_old
 842722     453    6828  850003   cf853 busybox_unstripped

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
14 years agotar: support GNU 256-bit encoding in all numeric fields
Denys Vlasenko [Thu, 6 May 2010 18:08:14 +0000 (20:08 +0200)]
tar: support GNU 256-bit encoding in all numeric fields

function                                             old     new   delta
getOctal                                              63     125     +62
get_header_tar                                      1572    1496     -76
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 1/1 up/down: 62/-76)            Total: -14 bytes

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
14 years agoinstall lspci and lsusb to /usr/bin
Gustavo Zacarias [Thu, 6 May 2010 14:57:14 +0000 (11:57 -0300)]
install lspci and lsusb to /usr/bin

Both can be run (to some degree) by mere users.

Signed-off-by: Gustavo Zacarias <gustavo@zacarias.com.ar>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
14 years agoadd comment about xz format support
Denys Vlasenko [Thu, 6 May 2010 15:05:22 +0000 (17:05 +0200)]
add comment about xz format support

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
14 years agorpm: make rpm -i SRPM.rpm install it to surrent dir; better help text
Denys Vlasenko [Thu, 6 May 2010 14:56:38 +0000 (16:56 +0200)]
rpm: make rpm -i SRPM.rpm install it to surrent dir; better help text

function                                             old     new   delta
rpm_main                                            1355    1358      +3
packed_usage                                       26732   26728      -4
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 1/1 up/down: 3/-4)               Total: -1 bytes

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
14 years agorpm: code shrink. Now uses open_zipped's logic (factored out into setup_unzip_on_fd())
Denys Vlasenko [Thu, 6 May 2010 14:19:19 +0000 (14:19 +0000)]
rpm: code shrink. Now uses open_zipped's logic (factored out into setup_unzip_on_fd())

function                                             old     new   delta
setup_unzip_on_fd                                      -      80     +80
open_zipped                                          176     113     -63
rpm_main                                            1672    1355    -317
------------------------------------------------------------------------------
(add/remove: 1/0 grow/shrink: 0/2 up/down: 80/-380)          Total: -300 bytes

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
14 years agobootchartd: better wording in comment
Denys Vlasenko [Tue, 4 May 2010 22:40:15 +0000 (00:40 +0200)]
bootchartd: better wording in comment

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
14 years agobootchartd: add missing parenthesis
Denys Vlasenko [Tue, 4 May 2010 15:34:37 +0000 (17:34 +0200)]
bootchartd: add missing parenthesis

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
14 years agobootchartd: new applet
Denys Vlasenko [Tue, 4 May 2010 13:45:25 +0000 (15:45 +0200)]
bootchartd: new applet

Usage: bootchartd start [PROG ARGS]|init|stop

Create /var/log/bootchart.tgz with boot chart data

Options:
start: start background logging; with PROG, run PROG, then kill
logging with USR1
stop: send USR1 to all bootchartd processes
init: start background logging; stop when getty/gdm is seen (for init scripts)
Under PID 1: as init, then exec $bootchart_init, /init, /sbin/init

function                                             old     new   delta
bootchartd_main                                        -     907    +907
dump_procs                                             -     353    +353
packed_usage                                       26566   26735    +169
dump_file                                              -      91     +91
static.dirs                                            -      23     +23
applet_names                                        2176    2187     +11
applet_main                                         1284    1288      +4
applet_nameofs                                       642     644      +2
------------------------------------------------------------------------------
(add/remove: 5/0 grow/shrink: 4/0 up/down: 1560/0)           Total: 1560 bytes

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
14 years agofix typo in commented-out code
Denys Vlasenko [Tue, 4 May 2010 12:59:01 +0000 (14:59 +0200)]
fix typo in commented-out code

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
14 years agoifdown: use /var/run/udhcpc.%iface%.pid only if it exists
Denys Vlasenko [Sun, 2 May 2010 18:30:28 +0000 (20:30 +0200)]
ifdown: use /var/run/udhcpc.%iface%.pid only if it exists

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
14 years agorfkill: new applet
Souf Oued [Sun, 2 May 2010 16:45:02 +0000 (18:45 +0200)]
rfkill: new applet

function                                             old     new   delta
rfkill_main                                            -     683    +683
packed_usage                                       26824   26966    +142
static.rfkill_types                                    -      42     +42
applet_names                                        2216    2223      +7
applet_main                                         1300    1304      +4
applet_nameofs                                       650     652      +2

Signed-off-by: Souf Oued <souf_oued@yahoo.fr>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
14 years agoudhcpd: fix hostname truncation bug 1663
Denys Vlasenko [Sun, 2 May 2010 12:17:07 +0000 (14:17 +0200)]
udhcpd: fix hostname truncation bug 1663

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
14 years agogrep: fix -Fi
Ian Wienand [Fri, 30 Apr 2010 07:32:10 +0000 (09:32 +0200)]
grep: fix -Fi

function                                             old     new   delta
grep_file                                           1151    1169     +18

Signed-off-by: Ian Wienand <ianw@vmware.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
14 years agoswapon: skip noauto entries
Lauri Kasanen [Thu, 29 Apr 2010 20:20:57 +0000 (22:20 +0200)]
swapon: skip noauto entries

Signed-off-by: Lauri Kasanen <curaga@operamail.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
14 years agolibbb/lineedit: add support for preserving "broken" (non-unicode) chars
Tomas Heinrich [Thu, 29 Apr 2010 11:43:39 +0000 (13:43 +0200)]
libbb/lineedit: add support for preserving "broken" (non-unicode) chars

Signed-off-by: Tomas Heinrich <heinrich.tomas@gmail.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
14 years agotelnet: prevent SEGV if we are requested TELOPT_NEW_ENVIRON.
Denys Vlasenko [Tue, 27 Apr 2010 06:54:24 +0000 (08:54 +0200)]
telnet: prevent SEGV if we are requested TELOPT_NEW_ENVIRON.

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
14 years agodnsd: fix unaligned access problem
Denys Vlasenko [Mon, 26 Apr 2010 12:25:33 +0000 (14:25 +0200)]
dnsd: fix unaligned access problem

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
14 years agoash: refresh stack pointers after makestrspace in rmescapes
Colin Watson [Mon, 26 Apr 2010 12:21:27 +0000 (14:21 +0200)]
ash: refresh stack pointers after makestrspace in rmescapes

Without this, rmescapes sometimes returns random garbage while
performing parameter expansions such as ${foo#bar}, in the event that
the allocation of r happens to need to reallocate the stack and hence
invalidate str and p.  I'd love to provide a test case but unfortunately
it's dependent on exact stack layout, so I don't have anything simpler
than the situation described in
https://bugs.launchpad.net/ubuntu/+source/partman-base/+bug/527401/comments/23
which involved a sequence of foo="${foo#*, }" expansions on a long
string inside our RAID configuration tool.

The same fix has been in dash since 2007-09-26, contributed by Roy
Marples <uberlord@gentoo.org>.  I actually came up with it independently
almost to the character, but then synced it up with the variable naming
used in dash when I noticed that change afterwards.

Signed-off-by: Colin Watson <cjwatson@ubuntu.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
14 years agocmp: remove history comment. it is more natural to keep it in source control
Denys Vlasenko [Mon, 26 Apr 2010 12:04:29 +0000 (14:04 +0200)]
cmp: remove history comment. it is more natural to keep it in source control

The comment was:

* Mar 16, 2003      Manuel Novoa III   (mjn3@codepoet.org)
*
* Original version majorly reworked for SUSv3 compliance, bug fixes, and
* size optimizations.  Changes include:
* 1) Now correctly distinguishes between errors and actual file differences.
* 2) Proper handling of '-' args.
* 3) Actual error checking of i/o.
* 4) Accept SUSv3 -l option.  Note that we use the slightly nicer gnu format
*    in the '-l' case.

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
14 years agocmp: ifdefectomy
Rob Landley [Mon, 26 Apr 2010 12:01:14 +0000 (14:01 +0200)]
cmp: ifdefectomy

Signed-off-by: Rob Landley <rob@landley.net>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
14 years agocpio: "NNN blocks" should go to stderr
Matheus Izvekov [Mon, 26 Apr 2010 11:53:57 +0000 (13:53 +0200)]
cpio: "NNN blocks" should go to stderr

Signed-off-by: Matheus Izvekov <mizvekov@gmail.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
14 years agofind: fix -name matching for dotfiles. -1 byte
Denys Vlasenko [Mon, 26 Apr 2010 07:54:04 +0000 (09:54 +0200)]
find: fix -name matching for dotfiles. -1 byte

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
14 years agogrep: makw -w support unconditional
Denys Vlasenko [Mon, 26 Apr 2010 06:45:44 +0000 (08:45 +0200)]
grep: makw -w support unconditional

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
14 years agodate: support -d @SECONDS_SINCE_1970
Denys Vlasenko [Thu, 22 Apr 2010 04:45:28 +0000 (00:45 -0400)]
date: support -d @SECONDS_SINCE_1970

function                                             old     new   delta
parse_datestr                                        647     721     +74

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
14 years agoftpd: work around LIST -aXYZ too, not only LIST -lXYZ
Denys Vlasenko [Wed, 21 Apr 2010 22:05:10 +0000 (18:05 -0400)]
ftpd: work around LIST -aXYZ too, not only LIST -lXYZ

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
14 years agobusybox --list option. +140 bytes. Rob wanted it.
Denys Vlasenko [Wed, 21 Apr 2010 01:02:57 +0000 (21:02 -0400)]
busybox --list option. +140 bytes. Rob wanted it.

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
14 years agosed: fix nested {} case
Denys Vlasenko [Tue, 20 Apr 2010 08:00:03 +0000 (04:00 -0400)]
sed: fix nested {} case

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
14 years agosed: fix c cmd
Denys Vlasenko [Tue, 20 Apr 2010 02:36:07 +0000 (22:36 -0400)]
sed: fix c cmd

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
14 years agovi: discover window size even on serial consoles. optional
Denys Vlasenko [Mon, 19 Apr 2010 05:09:30 +0000 (22:09 -0700)]
vi: discover window size even on serial consoles. optional

function                                             old     new   delta
edit_file                                            671     761     +90
wh_helper                                              -      57     +57
query_screen_dimensions                               54      63      +9
ar_main                                              533     542      +9
refresh                                              767     773      +6
vi_main                                              242     243      +1
text_yank                                             56      54      -2
get_terminal_width_height                            180     135     -45
------------------------------------------------------------------------------
(add/remove: 1/0 grow/shrink: 5/2 up/down: 172/-47)           Total: 125 bytes

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
14 years agovi: remove superfluous check on filename == ""
Denys Vlasenko [Mon, 19 Apr 2010 03:39:41 +0000 (20:39 -0700)]
vi: remove superfluous check on filename == ""

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
14 years agoremove stdio from allnoconfig build
Denys Vlasenko [Mon, 19 Apr 2010 03:16:11 +0000 (20:16 -0700)]
remove stdio from allnoconfig build

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
14 years agovi: code shrink
Denys Vlasenko [Sat, 17 Apr 2010 05:13:55 +0000 (22:13 -0700)]
vi: code shrink

function                                             old     new   delta
vi_main                                              250     242      -8
colon                                               2980    2970     -10
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 0/2 up/down: 0/-18)             Total: -18 bytes

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
14 years agovi: code shrink; save/restore errno in signal handlers
Denys Vlasenko [Sat, 17 Apr 2010 03:55:52 +0000 (20:55 -0700)]
vi: code shrink; save/restore errno in signal handlers

function                                             old     new   delta
query_screen_dimensions                                -      54     +54
suspend_sig                                           50      64     +14
cont_sig                                              65      66      +1
catch_sig                                             42      32     -10
winch_sig                                             88      60     -28
edit_file                                            719     671     -48
refresh                                              848     767     -81
------------------------------------------------------------------------------
(add/remove: 1/0 grow/shrink: 2/4 up/down: 69/-167)           Total: -98 bytes

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
14 years agoadd a file which shows what builds on ancient RH9 image
Denys Vlasenko [Sat, 17 Apr 2010 02:32:12 +0000 (19:32 -0700)]
add a file which shows what builds on ancient RH9 image

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
14 years agoread_key: fix buffer length calculation
Tomas Heinrich [Fri, 16 Apr 2010 21:59:51 +0000 (23:59 +0200)]
read_key: fix buffer length calculation

Signed-off-by: Tomas Heinrich <heinrich.tomas@gmail.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
14 years agoar: fix a regression: "ar t arch.a" stopped shoting files
Nguyễn Thái Ngọc Duy [Thu, 15 Apr 2010 23:55:04 +0000 (16:55 -0700)]
ar: fix a regression: "ar t arch.a" stopped shoting files

Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
14 years agohttpd_indexcgi example: trivial fix
Denys Vlasenko [Thu, 15 Apr 2010 15:37:59 +0000 (08:37 -0700)]
httpd_indexcgi example: trivial fix

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
14 years agoudhcpc: make help text better
Denys Vlasenko [Wed, 14 Apr 2010 21:04:26 +0000 (14:04 -0700)]
udhcpc: make help text better

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
14 years agoloop: correct minor device number limit
Denys Vlasenko [Wed, 14 Apr 2010 20:52:41 +0000 (13:52 -0700)]
loop: correct minor device number limit

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
14 years agodevmem: map two pages only if it is necessary
Denys Vlasenko [Wed, 14 Apr 2010 20:37:25 +0000 (13:37 -0700)]
devmem: map two pages only if it is necessary

function                                             old     new   delta
devmem_main                                          463     469      +6

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
14 years agomount: add an optional capability to create new /dev/loopN as needed
Lauri Kasanen [Wed, 14 Apr 2010 19:31:26 +0000 (12:31 -0700)]
mount: add an optional capability to create new /dev/loopN as needed

Signed-off-by: Lauri Kasanen <curaga@operamail.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
14 years agodnsd: enforce alignment on packet buffer
Denys Vlasenko [Wed, 14 Apr 2010 17:14:25 +0000 (10:14 -0700)]
dnsd: enforce alignment on packet buffer

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
14 years agomodutils-24: [mips] modutlis-24 segfault fix for 2.4 kernel modules
Ralf Rösch [Wed, 14 Apr 2010 16:45:37 +0000 (09:45 -0700)]
modutils-24: [mips] modutlis-24 segfault fix for 2.4 kernel modules

handling DWARF sections solves the problem.

This seems to be a long outstanding bug:
http://permalink.gmane.org/gmane.linux.busybox/4533
http://www.linux-mips.org/archives/linux-mips/2004-08/msg00072.html

Signed-off-by: Ralf Rösch <ralf.roesch@rw-gmbh.de>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
14 years agohwclock: improve, and then disable clever sync code: it's bloat
Denys Vlasenko [Wed, 14 Apr 2010 16:19:20 +0000 (09:19 -0700)]
hwclock: improve, and then disable clever sync code: it's bloat

...and hardware is too stupid to benefit from it anyway

function                                             old     new   delta
hwclock_main                                         439     319    -120

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
14 years agoxargs: do not decrease orig_arg_max to negative values
Denys Vlasenko [Fri, 9 Apr 2010 12:58:40 +0000 (14:58 +0200)]
xargs: do not decrease orig_arg_max to negative values

Based on patch by Nguyễn Thái Ngọc Duy <pclouds@gmail.com>

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
14 years agoExclude syslog code if FEATURE_SYSLOG is not set
Nguyễn Thái Ngọc Duy [Fri, 9 Apr 2010 12:34:28 +0000 (14:34 +0200)]
Exclude syslog code if FEATURE_SYSLOG is not set

syslog.h and syslog(...) may not exist in such configuration

Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
14 years agotar: fix "hardlinks to symlinks chown" bug 1519.
Denys Vlasenko [Fri, 9 Apr 2010 12:11:45 +0000 (14:11 +0200)]
tar: fix "hardlinks to symlinks chown" bug 1519.

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
14 years agotar: fix mishandling of repeated hardlink in tarball; expand tests
Denys Vlasenko [Fri, 9 Apr 2010 08:52:52 +0000 (10:52 +0200)]
tar: fix mishandling of repeated hardlink in tarball; expand tests

function                                             old     new   delta
data_extract_all                                     727     767     +40
get_header_tar                                      1576    1572      -4

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
14 years agoipcalc: more correct checking for proper number of arguments
Steve Bennett [Wed, 7 Apr 2010 17:16:12 +0000 (19:16 +0200)]
ipcalc: more correct checking for proper number of arguments

function                                             old     new   delta
ipcalc_main                                          581     569     -12

Signed-off-by: Steve Bennett <steveb@workware.net.au>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
14 years agops: fix non-DESKTOP option handling code
Denys Vlasenko [Wed, 7 Apr 2010 16:03:34 +0000 (18:03 +0200)]
ps: fix non-DESKTOP option handling code

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
14 years agohexdump: make -s 0xNNNNN work
Denys Vlasenko [Tue, 6 Apr 2010 21:33:28 +0000 (23:33 +0200)]
hexdump: make -s 0xNNNNN work

function                                             old     new   delta
hexdump_main                                         603     605      +2

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
14 years agofix typo
Denys Vlasenko [Tue, 6 Apr 2010 16:51:29 +0000 (18:51 +0200)]
fix typo

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
14 years agolibbb: add skip_dev_pfx()
Denys Vlasenko [Tue, 6 Apr 2010 16:50:05 +0000 (18:50 +0200)]
libbb: add skip_dev_pfx()

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
14 years agoinit: clear utmp entries for dead processes, if they (entries) exist
Denys Vlasenko [Tue, 6 Apr 2010 16:49:28 +0000 (18:49 +0200)]
init: clear utmp entries for dead processes, if they (entries) exist

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
14 years agoMove utmp/wtmp support to "General configuration" section
Denys Vlasenko [Tue, 6 Apr 2010 16:48:32 +0000 (18:48 +0200)]
Move utmp/wtmp support to "General configuration" section

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
14 years agotelnetd: fill hostname field in utmp/wtmp records
Denys Vlasenko [Tue, 6 Apr 2010 15:43:29 +0000 (17:43 +0200)]
telnetd: fill hostname field in utmp/wtmp records

function                                             old     new   delta
get_lsa                                                -     109    +109
make_new_session                                     438     504     +66
get_peer_lsa                                           -      10     +10
ftpd_main                                           2340    2267     -73
get_sock_lsa                                         101      10     -91
------------------------------------------------------------------------------
(add/remove: 2/0 grow/shrink: 1/2 up/down: 185/-164)           Total: 21 bytes

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
14 years agofdisk: make comment more clear
Denys Vlasenko [Tue, 6 Apr 2010 14:56:33 +0000 (16:56 +0200)]
fdisk: make comment more clear

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
14 years agoudhcp: s/sipservers/sipsrv/ to match other similar option names
Denys Vlasenko [Tue, 6 Apr 2010 14:52:59 +0000 (16:52 +0200)]
udhcp: s/sipservers/sipsrv/ to match other similar option names

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
14 years agofdisk: make 'b' command optionally adjust C/H/S; "fdisk IMAGE_FILE" sets cylinders
Denys Vlasenko [Tue, 6 Apr 2010 00:32:26 +0000 (02:32 +0200)]
fdisk: make 'b' command optionally adjust C/H/S; "fdisk IMAGE_FILE" sets cylinders

function                                             old     new   delta
set_hsc_start_end                                      -     189    +189
get_boot                                            1644    1713     +69
fdisk_main                                          2620    2652     +32
get_partition_start_from_dev_start                     -      15     +15
get_partition_start                                   15       -     -15
set_partition                                        286     120    -166
------------------------------------------------------------------------------
(add/remove: 2/1 grow/shrink: 2/1 up/down: 305/-181)          Total: 124 bytes

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
14 years agofdisk: code shrink without logic changes
Denys Vlasenko [Tue, 6 Apr 2010 00:31:43 +0000 (02:31 +0200)]
fdisk: code shrink without logic changes

function                                             old     new   delta
create_doslabel                                      113     110      -3
set_start_sect                                         8       4      -4
set_nr_sects                                           8       4      -4
get_start_sect                                         8       4      -4
get_nr_sects                                           8       4      -4
store4_little_endian                                  21       -     -21
read4_little_endian                                   33       -     -33
is_cleared_partition                                  84      21     -63
------------------------------------------------------------------------------
(add/remove: 0/2 grow/shrink: 0/6 up/down: 0/-136)           Total: -136 bytes

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
14 years agoremoved extra \n in fdisk help text
Denys Vlasenko [Mon, 5 Apr 2010 22:04:08 +0000 (00:04 +0200)]
removed extra \n in fdisk help text

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
14 years agotelnetd: write LOGIN/DEAD_PROCESS utmp records. Closes bug 1363
Denys Vlasenko [Mon, 5 Apr 2010 20:10:38 +0000 (22:10 +0200)]
telnetd: write LOGIN/DEAD_PROCESS utmp records. Closes bug 1363

function                                             old     new   delta
write_new_utmp                                         -     253    +253
skip_dev_pfx                                           -      30     +30
handle_sigchld                                        42      72     +30
telnetd_main                                        1650    1673     +23
make_new_session                                     415     438     +23
...
login_main                                          1140    1148      +8
update_utmp                                          337     313     -24
write_wtmp                                           220     154     -66
------------------------------------------------------------------------------
(add/remove: 2/0 grow/shrink: 11/6 up/down: 406/-115)         Total: ~291 bytes

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
14 years agolibbb: split update_utmp from login/getty in preparation to use it for telnetd
Denys Vlasenko [Mon, 5 Apr 2010 01:18:40 +0000 (03:18 +0200)]
libbb: split update_utmp from login/getty in preparation to use it for telnetd

function                                             old     new   delta
update_utent                                           -     339    +339
login_main                                          1498    1128    -370
------------------------------------------------------------------------------
(add/remove: 1/0 grow/shrink: 0/1 up/down: 339/-370)          Total: -31 bytes

function                                             old     new   delta
update_utmp                                          246     337     +91
login_main                                          1128    1140     +12
getty_main                                          1908    1918     +10
...
update_utent                                         339       -    -339
------------------------------------------------------------------------------
(add/remove: 1/1 grow/shrink: 5/6 up/down: 119/-368)         Total: -249 bytes

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
14 years agowho: fix attempts to open '/dev/dev/ttyX'; make columns a bit wider, add -H
Denys Vlasenko [Sun, 4 Apr 2010 21:45:09 +0000 (23:45 +0200)]
who: fix attempts to open '/dev/dev/ttyX'; make columns a bit wider, add -H

function                                             old     new   delta
who_main                                             292     363     +71

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
14 years agoudhcpd: note missing sanity checks on INFORM message handling
Denys Vlasenko [Sun, 4 Apr 2010 20:36:34 +0000 (22:36 +0200)]
udhcpd: note missing sanity checks on INFORM message handling

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
14 years agoupdate examples/udhcp/udhcpd.conf
Denys Vlasenko [Sun, 4 Apr 2010 13:38:22 +0000 (15:38 +0200)]
update examples/udhcp/udhcpd.conf

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
14 years agoudhcp: implement "raw" binary options. Closes bug 735
Denys Vlasenko [Sun, 4 Apr 2010 13:31:12 +0000 (15:31 +0200)]
udhcp: implement "raw" binary options. Closes bug 735

function                                             old     new   delta
allocate_tempopt_if_needed                             -      76     +76
udhcp_str2optset                                     351     415     +64
attach_option                                        380     398     +18
len_of_option_as_string                               11      12      +1
dhcp_option_lengths                                   11      12      +1
------------------------------------------------------------------------------
(add/remove: 1/0 grow/shrink: 4/0 up/down: 160/0)             Total: 160 bytes

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
14 years agolibbb: factor out hex2bin() for infiniband address parser
Denys Vlasenko [Sun, 4 Apr 2010 13:29:32 +0000 (15:29 +0200)]
libbb: factor out hex2bin() for infiniband address parser

function                                             old     new   delta
hex2bin                                                -     149    +149
in_ib                                                172      27    -145

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
14 years agoudhcp: s/dhcp_option/dhcp_optflag/g
Denys Vlasenko [Sun, 4 Apr 2010 13:28:49 +0000 (15:28 +0200)]
udhcp: s/dhcp_option/dhcp_optflag/g

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
14 years agoudhcpc: trivial shrink
Denys Vlasenko [Sun, 4 Apr 2010 00:12:03 +0000 (02:12 +0200)]
udhcpc: trivial shrink

function                                             old     new   delta
udhcpc_main                                         2801    2785     -16

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
14 years agoawk: add comment about fixing bug 1333
Denys Vlasenko [Sat, 3 Apr 2010 23:48:12 +0000 (01:48 +0200)]
awk: add comment about fixing bug 1333

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
14 years agoawk: don't append bogus data after NUL in sub(); shrink
Denys Vlasenko [Sat, 3 Apr 2010 23:17:30 +0000 (01:17 +0200)]
awk: don't append bogus data after NUL in sub(); shrink

also renamed variables to more sensible names

function                                             old     new   delta
mk_re_node                                            56      49      -7
awk_sub                                              601     591     -10

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
14 years agoudhcpd: support decoding of option 120 "SIP servers". Closes bug 737
Denys Vlasenko [Sat, 3 Apr 2010 15:34:52 +0000 (17:34 +0200)]
udhcpd: support decoding of option 120 "SIP servers". Closes bug 737

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
14 years agocosmetic fixes, no code changed
Denys Vlasenko [Sat, 3 Apr 2010 13:39:47 +0000 (15:39 +0200)]
cosmetic fixes, no code changed

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
14 years agoftpd: shrink by 33 bytes
Denys Vlasenko [Sat, 3 Apr 2010 12:59:12 +0000 (14:59 +0200)]
ftpd: shrink by 33 bytes

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
14 years agolibbb: make index_in_substrings return -1 on ambiguous matches
Denys Vlasenko [Fri, 2 Apr 2010 22:52:16 +0000 (00:52 +0200)]
libbb: make index_in_substrings return -1 on ambiguous matches

function                                             old     new   delta
index_in_substrings                                   67      93     +26

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
14 years agolibpwdgrp: comment out unused data
Denys Vlasenko [Fri, 2 Apr 2010 10:12:43 +0000 (12:12 +0200)]
libpwdgrp: comment out unused data

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
14 years agohttpd: fix proxy mode bug (annoying but harmless), better help text
Denys Vlasenko [Fri, 2 Apr 2010 08:40:58 +0000 (10:40 +0200)]
httpd: fix proxy mode bug (annoying but harmless), better help text

function                                             old     new   delta
cgi_io_loop_and_exit                                 594     635     +41
packed_usage                                       26815   26841     +26
handle_incoming_and_exit                            2745    2739      -6

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
14 years agotestsuite fixes
Chris Metcalf [Fri, 2 Apr 2010 07:57:27 +0000 (09:57 +0200)]
testsuite fixes

Signed-off-by: Chris Metcalf <cmetcalf@tilera.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
14 years agoifplugd: more robust interface name match check
Denys Vlasenko [Fri, 2 Apr 2010 05:04:44 +0000 (07:04 +0200)]
ifplugd: more robust interface name match check

function                                             old     new   delta
check_existence_through_netlink                      278     308     +30

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
14 years agomdev: add "!" syntax support
Denys Vlasenko [Fri, 2 Apr 2010 04:47:14 +0000 (06:47 +0200)]
mdev: add "!" syntax support

Based on the patch by Steve Bennett <steveb@workware.net.au>

function                                             old     new   delta
make_device                                         1640    1673     +33

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
14 years agoclean up redundant, commented-out and misplaced includes
Denys Vlasenko [Thu, 1 Apr 2010 13:09:44 +0000 (15:09 +0200)]
clean up redundant, commented-out and misplaced includes

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
14 years agofix Config.in tab usage
Denys Vlasenko [Wed, 31 Mar 2010 14:03:56 +0000 (16:03 +0200)]
fix Config.in tab usage

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
14 years agosyslogd: make maximum message length configurable
Janne Kiviluoto [Wed, 31 Mar 2010 13:58:58 +0000 (15:58 +0200)]
syslogd: make maximum message length configurable

Signed-off-by: Janne Kiviluoto <janne.kiviluoto@bluegiga.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
14 years agolibpwdgrp: comment out more unused functions
Denys Vlasenko [Wed, 31 Mar 2010 12:43:58 +0000 (14:43 +0200)]
libpwdgrp: comment out more unused functions

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
14 years agolibpwdgrp: comment out functions with UNUSED_SINCE_WE_AVOID_STATIC_BUFS
Denys Vlasenko [Wed, 31 Mar 2010 10:38:17 +0000 (12:38 +0200)]
libpwdgrp: comment out functions with UNUSED_SINCE_WE_AVOID_STATIC_BUFS

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
14 years agolibpwdgrp: style cleanups
Denys Vlasenko [Wed, 31 Mar 2010 10:37:43 +0000 (12:37 +0200)]
libpwdgrp: style cleanups

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
14 years agolibpwdgrp: code style fixes, no real code changes
Denys Vlasenko [Wed, 31 Mar 2010 08:31:51 +0000 (10:31 +0200)]
libpwdgrp: code style fixes, no real code changes

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
14 years agolibpwdgrp: can't depend on strlen(line_buff) != 0
Denys Vlasenko [Wed, 31 Mar 2010 08:24:37 +0000 (10:24 +0200)]
libpwdgrp: can't depend on strlen(line_buff) != 0

function                                             old     new   delta
bb__pgsreader                                        188     202     +14

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
14 years agodpkg: remove redundant check
Denys Vlasenko [Tue, 30 Mar 2010 14:20:34 +0000 (16:20 +0200)]
dpkg: remove redundant check

function                                             old     new   delta
dpkg_main                                           4008    3991     -17

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
14 years agoifplugd: code shrink; expanded comments
Maxim Kryzhanovsky [Tue, 30 Mar 2010 13:49:57 +0000 (15:49 +0200)]
ifplugd: code shrink; expanded comments

Signed-off-by: Maxim Kryzhanovsky <xmaks@email.cz>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
14 years agodpkg: better check for validity of options
Denys Vlasenko [Tue, 30 Mar 2010 13:03:26 +0000 (15:03 +0200)]
dpkg: better check for validity of options

function                                             old     new   delta
dpkg_main                                           3980    4008     +28

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
14 years agodpkg: support config file overwrite options
Kim B. Heino [Mon, 29 Mar 2010 12:18:27 +0000 (14:18 +0200)]
dpkg: support config file overwrite options

function                                             old     new   delta
filter_rename_config                                   -     244    +244
static.dpkg_longopts                                   -     112    +112
dpkg_main                                           3901    3980     +79
unpack_package                                       515     587     +72
append_control_file_to_llist                           -      72     +72
data_extract_all_prefix                               88     116     +28
------------------------------------------------------------------------------
(add/remove: 3/0 grow/shrink: 3/0 up/down: 607/0)             Total: 607 bytes

Signed-off-by: Kim B. Heino <Kim.Heino@bluegiga.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
14 years agoprovide safe_gethostname() for non-linux systems
Denys Vlasenko [Mon, 29 Mar 2010 09:20:00 +0000 (11:20 +0200)]
provide safe_gethostname() for non-linux systems

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
14 years agolibbb: locate PAGE_SIZE on Hurd
Denys Vlasenko [Mon, 29 Mar 2010 09:02:00 +0000 (11:02 +0200)]
libbb: locate PAGE_SIZE on Hurd

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
14 years agoifplugd: code shrink
Maxim Kryzhanovsky [Mon, 29 Mar 2010 07:09:05 +0000 (09:09 +0200)]
ifplugd: code shrink

   text    data     bss     dec     hex filename
 840048     453    6828  847329   cede1 busybox_old
 839915     453    6828  847196   ced5c busybox_unstripped

Signed-off-by: Maxim Kryzhanovsky <xmaks@email.cz>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
14 years ago"make release" should delete .git directory too
Denys Vlasenko [Sun, 28 Mar 2010 18:26:40 +0000 (20:26 +0200)]
"make release" should delete .git directory too

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>