oweals/busybox.git
13 years agomodinfo: trivial optimizations
Denys Vlasenko [Tue, 15 Feb 2011 00:45:14 +0000 (01:45 +0100)]
modinfo: trivial optimizations

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
13 years agomodinfo: show firmware and depends fields
Lauri Kasanen [Mon, 14 Feb 2011 17:50:30 +0000 (19:50 +0200)]
modinfo: show firmware and depends fields

Signed-off-by: Lauri Kasanen <curaga@operamail.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
13 years agowget: make "wget -O FILE URL1 URL2" concatenate output
Denys Vlasenko [Mon, 14 Feb 2011 23:58:36 +0000 (00:58 +0100)]
wget: make "wget -O FILE URL1 URL2" concatenate output

Also fixes a few cases where URL1's data (like start pos)
was leaking into URL2

function                                             old     new   delta
wget_main                                           2303    2321     +18
progress_meter                                       140     152     +12
retrieve_file_data                                   397     396      -1
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 2/1 up/down: 30/-1)              Total: 29 bytes

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
13 years agowget: fix SEGV with multiple urls and redirection
Pere Orga [Mon, 14 Feb 2011 22:56:07 +0000 (23:56 +0100)]
wget: fix SEGV with multiple urls and redirection

Signed-off-by: Pere Orga <gotrunks@gmail.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
13 years agohush: do not print killer signal's name for SIGPIPE
Denys Vlasenko [Mon, 14 Feb 2011 16:17:10 +0000 (17:17 +0100)]
hush: do not print killer signal's name for SIGPIPE

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
13 years agoecho: fix ENOSPC detection and some iffy code in \NNN handling
Denys Vlasenko [Mon, 14 Feb 2011 14:42:18 +0000 (15:42 +0100)]
echo: fix ENOSPC detection and some iffy code in \NNN handling

function                                             old     new   delta
echo_main                                            330     302     -28

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
13 years agoudhcpc: use more correct, and more importantly, more understandable BPF code
Vladislav Grishenko [Mon, 14 Feb 2011 03:50:30 +0000 (04:50 +0100)]
udhcpc: use more correct, and more importantly, more understandable BPF code

Signed-off-by: Vladislav Grishenko <themiron@mail.ru>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
13 years agoreverted LINHIB0001 swap signature addition
Denys Vlasenko [Mon, 14 Feb 2011 02:52:16 +0000 (03:52 +0100)]
reverted LINHIB0001 swap signature addition

see:

https://bugs.launchpad.net/ubuntu/+source/util-linux/+bug/683605

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
13 years agoMove stpcpy replacement function into libbb
Dan Fandrich [Sun, 13 Feb 2011 06:26:57 +0000 (22:26 -0800)]
Move stpcpy replacement function into libbb

Signed-off-by: Dan Fandrich <dan@coneharvesters.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
13 years agomktemp: make it more compatible with GNU coreutils 8.4
Denys Vlasenko [Sun, 13 Feb 2011 16:38:34 +0000 (17:38 +0100)]
mktemp: make it more compatible with GNU coreutils 8.4

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
13 years agofix bug 3223 (parameter loading problem for 2.4 kernels)
Denys Vlasenko [Sun, 13 Feb 2011 03:17:35 +0000 (04:17 +0100)]
fix bug 3223 (parameter loading problem for 2.4 kernels)

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
13 years agowget: support multiple URLs on command line even without -O :)
Denys Vlasenko [Sun, 13 Feb 2011 01:49:43 +0000 (02:49 +0100)]
wget: support multiple URLs on command line even without -O :)

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
13 years agowget: support multiple URLs on command line
Denys Vlasenko [Sun, 13 Feb 2011 01:33:11 +0000 (02:33 +0100)]
wget: support multiple URLs on command line

function                                             old     new   delta
wget_main                                           2190    2310    +120
progress_meter                                       124     140     +16
parse_url                                            288     304     +16
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 3/0 up/down: 152/0)             Total: 152 bytes

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
13 years agotypo fix in comment
Denys Vlasenko [Sat, 12 Feb 2011 22:40:31 +0000 (23:40 +0100)]
typo fix in comment

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
13 years agofind: trim help text a bit
Denys Vlasenko [Sat, 12 Feb 2011 19:37:41 +0000 (20:37 +0100)]
find: trim help text a bit

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
13 years agofind: remove the hack we use to parse options first, replace with simpler code
Denys Vlasenko [Sat, 12 Feb 2011 19:27:13 +0000 (20:27 +0100)]
find: remove the hack we use to parse options first, replace with simpler code

   text    data     bss     dec     hex filename
 867764     438    7552  875754   d5cea busybox_old
 867629     438    7552  875619   d5c63 busybox_unstripped

function                                             old     new   delta
parse_params                                        1377    1440     +63
static.params                                        151     192     +41
static.options                                        42      57     +15
fileAction                                           151     153      +2
find_main                                            466     267    -199
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 4/1 up/down: 121/-199)          Total: -78 bytes

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
13 years agofind: print/print0/prune _can_ be inverted, fix it
Denys Vlasenko [Sat, 12 Feb 2011 19:26:14 +0000 (20:26 +0100)]
find: print/print0/prune _can_ be inverted, fix it

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
13 years agofind: document ! (not) operator
Denys Vlasenko [Sat, 12 Feb 2011 17:49:48 +0000 (18:49 +0100)]
find: document ! (not) operator

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
13 years agofind: help text: PATH must be first
Denys Vlasenko [Sat, 12 Feb 2011 17:24:15 +0000 (18:24 +0100)]
find: help text: PATH must be first

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
13 years agofind: yet another tweak to help text
Denys Vlasenko [Sat, 12 Feb 2011 16:13:03 +0000 (17:13 +0100)]
find: yet another tweak to help text

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
13 years agofind: fix help text about -prune: it also does assume -print
Denys Vlasenko [Sat, 12 Feb 2011 16:08:16 +0000 (17:08 +0100)]
find: fix help text about -prune: it also does assume -print

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
13 years agofind: significantly improve hext text. +116 bytes
Denys Vlasenko [Sat, 12 Feb 2011 15:35:24 +0000 (16:35 +0100)]
find: significantly improve hext text. +116 bytes

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
13 years agotypo fix
Denys Vlasenko [Sat, 12 Feb 2011 00:56:25 +0000 (01:56 +0100)]
typo fix

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
13 years agowget: display 100% at the _end_ of chunked download
Denys Vlasenko [Fri, 11 Feb 2011 22:06:21 +0000 (23:06 +0100)]
wget: display 100% at the _end_ of chunked download

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
13 years agowget: chunked mode fix. Closes bug 3229
Denys Vlasenko [Fri, 11 Feb 2011 21:23:23 +0000 (22:23 +0100)]
wget: chunked mode fix. Closes bug 3229

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
13 years agowget: explain clearerr more clearly
Denys Vlasenko [Fri, 11 Feb 2011 21:01:33 +0000 (22:01 +0100)]
wget: explain clearerr more clearly

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
13 years agowget: correctly handle rare case when we get EAGAIN _on first_ read
Denys Vlasenko [Fri, 11 Feb 2011 20:42:00 +0000 (21:42 +0100)]
wget: correctly handle rare case when we get EAGAIN _on first_ read

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
13 years agoprogress meter: fix bugs found in stall detection and unknown size logic
Denys Vlasenko [Fri, 11 Feb 2011 18:09:30 +0000 (19:09 +0100)]
progress meter: fix bugs found in stall detection and unknown size logic

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
13 years agoprogress meter: move file name to bb_progress_t. +20 bytes
Denys Vlasenko [Fri, 11 Feb 2011 17:56:13 +0000 (18:56 +0100)]
progress meter: move file name to bb_progress_t. +20 bytes

We were doing expensive unicode conversion on every update

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
13 years agolibbb/progress.c: make sure we never get negative ETA
Denys Vlasenko [Fri, 11 Feb 2011 11:59:11 +0000 (12:59 +0100)]
libbb/progress.c: make sure we never get negative ETA

function                                             old     new   delta
bb_progress_update                                   738     733      -5

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
13 years agoprogress meter: display >999 hours ETA correctly
Denys Vlasenko [Thu, 10 Feb 2011 22:35:52 +0000 (23:35 +0100)]
progress meter: display >999 hours ETA correctly

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
13 years agowget: shrink progress meter code; strink wget and add debug logging
Denys Vlasenko [Thu, 10 Feb 2011 22:02:28 +0000 (23:02 +0100)]
wget: shrink progress meter code; strink wget and add debug logging

function                                             old     new   delta
fgets_and_trim                                         -      73     +73
retrieve_file_data                                   367     349     -18
bb_progress_update                                   723     699     -24
wget_main                                           2220    2190     -30
ftpcmd                                               133      87     -46
gethdr                                               200     153     -47
------------------------------------------------------------------------------
(add/remove: 1/0 grow/shrink: 0/5 up/down: 73/-165)           Total: -92 bytes

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
13 years agoprogress bar: better overflow protection; more precise bar
Denys Vlasenko [Thu, 10 Feb 2011 13:25:51 +0000 (14:25 +0100)]
progress bar: better overflow protection; more precise bar

function                                             old     new   delta
bb_progress_update                                   639     749    +110

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
13 years agowget: use closed HTTP/1.1 connection, stop when we dl'ed $content_len bytes
Denys Vlasenko [Thu, 10 Feb 2011 12:23:45 +0000 (13:23 +0100)]
wget: use closed HTTP/1.1 connection, stop when we dl'ed $content_len bytes

function                                             old     new   delta
retrieve_file_data                                   353     367     +14

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
13 years agoremve erroneous dependensies on INSTALLER
Denys Vlasenko [Thu, 10 Feb 2011 10:18:31 +0000 (11:18 +0100)]
remve erroneous dependensies on INSTALLER

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
13 years agogetty config help: fix example script
Denys Vlasenko [Thu, 10 Feb 2011 09:38:13 +0000 (10:38 +0100)]
getty config help: fix example script

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
13 years agogetty: extend its config help
Denys Vlasenko [Thu, 10 Feb 2011 09:24:51 +0000 (10:24 +0100)]
getty: extend its config help

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
13 years agoreset: "ESC(K" selects German, why do we use THAT? Change to "ESC(B" (US)
Denys Vlasenko [Thu, 10 Feb 2011 09:18:22 +0000 (10:18 +0100)]
reset: "ESC(K" selects German, why do we use THAT? Change to "ESC(B" (US)

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
13 years agosave 10 bytes on strings
Denys Vlasenko [Thu, 10 Feb 2011 09:01:49 +0000 (10:01 +0100)]
save 10 bytes on strings

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
13 years agowget: remove functions which retry on EINTR
Denys Vlasenko [Thu, 10 Feb 2011 08:55:05 +0000 (09:55 +0100)]
wget: remove functions which retry on EINTR

function                                             old     new   delta
retrieve_file_data                                   392     353     -39
safe_fgets                                            58       -     -58
------------------------------------------------------------------------------
(add/remove: 0/1 grow/shrink: 0/1 up/down: 0/-97)             Total: -97 bytes

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
13 years agofix trivial build failure
Denys Vlasenko [Thu, 10 Feb 2011 08:50:07 +0000 (09:50 +0100)]
fix trivial build failure

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
13 years agowget: use FEATURE_COPYBUF_KB-sized buffer. Much faster for local transfers
Denys Vlasenko [Thu, 10 Feb 2011 05:29:06 +0000 (06:29 +0100)]
wget: use FEATURE_COPYBUF_KB-sized buffer. Much faster for local transfers

function                                             old     new   delta
base64enc                                              -      53     +53
gethdr                                               190     200     +10
ftpcmd                                               129     133      +4
progress_meter                                       160     122     -38
retrieve_file_data                                   431     392     -39
base64enc_512                                         46       -     -46
wget_main                                           2456    2220    -236
------------------------------------------------------------------------------
(add/remove: 1/1 grow/shrink: 2/3 up/down: 67/-359)          Total: -292 bytes

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
13 years agotc: less ugly check for bad sizeof(G)
Denys Vlasenko [Thu, 10 Feb 2011 05:28:09 +0000 (06:28 +0100)]
tc: less ugly check for bad sizeof(G)

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
13 years agoiproute: fix handling of "dev IFACE" selector
Denys Vlasenko [Wed, 9 Feb 2011 03:39:09 +0000 (04:39 +0100)]
iproute: fix handling of "dev IFACE" selector

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
13 years agoscripts/mkconfigs: don't use invalid basic regexp
Denys Vlasenko [Wed, 9 Feb 2011 00:33:41 +0000 (01:33 +0100)]
scripts/mkconfigs: don't use invalid basic regexp

\? are GNU extension and thus are non-standard

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
13 years agouse unistd.h before _POSIX_VERSION
Denys Vlasenko [Tue, 8 Feb 2011 04:35:04 +0000 (05:35 +0100)]
use unistd.h before _POSIX_VERSION

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
13 years agoash: fix TMOUT not restoring tty attributes
Denys Vlasenko [Tue, 8 Feb 2011 04:07:02 +0000 (05:07 +0100)]
ash: fix TMOUT not restoring tty attributes

function                                             old     new   delta
pgetc                                                420     500     +80
readtoken1                                          3202    3239     +37
read_line_input                                     3316    3337     +21
udhcpc_main                                         2610    2630     +20
file_get                                             266     272      +6
expandarg                                            958     963      +5
localcmd                                             257     259      +2
addLines                                              85      87      +2
read_line                                             94      95      +1
ed_main                                             2540    2541      +1
timed_out                                              1       -      -1
lineedit_read_key                                    256     255      -1
alrm_sighandler                                       44       -     -44
cmdloop                                              539     434    -105
------------------------------------------------------------------------------
(add/remove: 0/2 grow/shrink: 10/2 up/down: 175/-151)          Total: 24 bytes
   text    data     bss     dec     hex filename
 887379     936   17200  905515   dd12b busybox_old
 887411     936   17192  905539   dd143 busybox_unstripped

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
13 years agoincorporate header fixes proposed in bug 3097
Denys Vlasenko [Mon, 7 Feb 2011 13:58:57 +0000 (14:58 +0100)]
incorporate header fixes proposed in bug 3097

Not sure these are *really* needed, but I suppose they don't hurt

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
13 years agoscripts/kconfig/mconf.c: stop-gap fix for buffer overflow
Denys Vlasenko [Mon, 7 Feb 2011 01:19:02 +0000 (02:19 +0100)]
scripts/kconfig/mconf.c: stop-gap fix for buffer overflow

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
13 years agoecho: do not retry on write errors
Denys Vlasenko [Mon, 7 Feb 2011 01:03:51 +0000 (02:03 +0100)]
echo: do not retry on write errors

function                                             old     new   delta
echo_main                                            297     336     +39
stpcpy                                                 -      22     +22
run_pipe                                            1561    1566      +5
pseudo_exec_argv                                     187     192      +5
hush_exit                                             75      80      +5
------------------------------------------------------------------------------
(add/remove: 3/0 grow/shrink: 4/0 up/down: 98/0)               Total: 76 bytes

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
13 years agotypo fix
Denys Vlasenko [Sun, 6 Feb 2011 19:02:15 +0000 (20:02 +0100)]
typo fix

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
13 years agotar: fix a bug where autodetection messes up -z on extract
Denys Vlasenko [Sun, 6 Feb 2011 19:01:11 +0000 (20:01 +0100)]
tar: fix a bug where autodetection messes up -z on extract

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
13 years agorunlevel/wall: depend on utmp feature
Mike Frysinger [Sun, 6 Feb 2011 17:29:25 +0000 (12:29 -0500)]
runlevel/wall: depend on utmp feature

These utils use funcs from utmp.h (like setutent), but utmp.h is only
included when FEATURE_UTMP is enabled.  Otherwise we get build failures
due to missing defines/prototypes.  So depend on this option.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
13 years agoudhcpc: fix a problem with binary-encoded options
Denys Vlasenko [Sun, 6 Feb 2011 17:00:58 +0000 (18:00 +0100)]
udhcpc: fix a problem with binary-encoded options

function                                             old     new   delta
attach_option                                        395     413     +18

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
13 years agoping: trivial simplification. -2 bytes
Denys Vlasenko [Sun, 6 Feb 2011 16:51:45 +0000 (17:51 +0100)]
ping: trivial simplification. -2 bytes

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
13 years agoping: fix IPv6 pinging. Closes bug 3187
Denys Vlasenko [Sat, 5 Feb 2011 02:58:43 +0000 (03:58 +0100)]
ping: fix IPv6 pinging. Closes bug 3187

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
13 years agoLet fbsplash display images even when a second buffer is active
Dan Fandrich [Wed, 26 Jan 2011 19:30:34 +0000 (11:30 -0800)]
Let fbsplash display images even when a second buffer is active

If a previous application uses double buffering and makes the
second buffer visible, fbsplash's images (written to the first
buffer) otherwise won't be visible.

Signed-off-by: Dan Fandrich <dan@coneharvesters.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
13 years agoubimkvol,ubirmvol,ubirsvol: new applets
Reuben Dowle [Sat, 5 Feb 2011 02:18:08 +0000 (03:18 +0100)]
ubimkvol,ubirmvol,ubirsvol: new applets

function                                             old     new   delta
ubi_tools_main                                         -     658    +658
packed_usage                                       28269   28376    +107
bbconfig_config_bz2                                 4968    5007     +39
applet_names                                        2407    2434     +27
applet_main                                         1396    1408     +12
applet_nameofs                                       698     704      +6
applet_install_loc                                   175     176      +1
ubi_attach_detach_main                               175       -    -175
------------------------------------------------------------------------------
(add/remove: 1/1 grow/shrink: 6/0 up/down: 850/-175)          Total: 675 bytes

Signed-off-by: Reuben Dowle <reuben.dowle at navico.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
13 years agoash: optional support for $TMOUT variable
Denys Vlasenko [Fri, 4 Feb 2011 16:53:59 +0000 (17:53 +0100)]
ash: optional support for $TMOUT variable

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
13 years agoash: cosmetic cleanups
Denys Vlasenko [Fri, 4 Feb 2011 16:36:21 +0000 (17:36 +0100)]
ash: cosmetic cleanups

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
13 years agolibbb: spawn should remove child which failed to exec
Denys Vlasenko [Thu, 3 Feb 2011 13:14:09 +0000 (14:14 +0100)]
libbb: spawn should remove child which failed to exec

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
13 years agotar: support -T - and -X -
Denys Vlasenko [Thu, 3 Feb 2011 03:00:23 +0000 (04:00 +0100)]
tar: support -T - and -X -

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
13 years agowhitespace fixes
Denys Vlasenko [Wed, 2 Feb 2011 23:05:48 +0000 (00:05 +0100)]
whitespace fixes

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
13 years agomove nofork_save_area from libbb.h to vfork_daemon_rexec.c
Denys Vlasenko [Wed, 2 Feb 2011 18:05:25 +0000 (19:05 +0100)]
move nofork_save_area from libbb.h to vfork_daemon_rexec.c

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
13 years agohush: use FEATURE_SH_NOFORK to enable NOFORK trick
Denys Vlasenko [Wed, 2 Feb 2011 17:38:57 +0000 (18:38 +0100)]
hush: use FEATURE_SH_NOFORK to enable NOFORK trick

Also expands docs

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
13 years agolibbb: make BB_EXECVP/LP try to exec real binary if there's no /proc/self/exe
Denys Vlasenko [Wed, 2 Feb 2011 02:28:56 +0000 (03:28 +0100)]
libbb: make BB_EXECVP/LP try to exec real binary if there's no /proc/self/exe

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
13 years agops: implement -o stat
Denys Vlasenko [Tue, 1 Feb 2011 23:59:35 +0000 (00:59 +0100)]
ps: implement -o stat

function                                             old     new   delta
func_stat                                              -      24     +24
out_spec                                             300     320     +20

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
13 years agomodprobe/insmod: fix parameter quoting
Denys Vlasenko [Tue, 1 Feb 2011 23:00:36 +0000 (00:00 +0100)]
modprobe/insmod: fix parameter quoting

function                                             old     new   delta
parse_cmdline_module_options                         102     157     +55
modprobe_main                                        657     662      +5
insmod_main                                           68      70      +2
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 3/0 up/down: 62/0)               Total: 62 bytes

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
13 years agorevert commit 1396221d5a741ef8e1e8abca88836b341a3cab84
Denys Vlasenko [Tue, 1 Feb 2011 22:24:25 +0000 (23:24 +0100)]
revert commit 1396221d5a741ef8e1e8abca88836b341a3cab84

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
13 years agodf,find_mount_point: optionally don't ignore rootfs
Lauri Kasanen [Mon, 31 Jan 2011 05:27:35 +0000 (06:27 +0100)]
df,find_mount_point: optionally don't ignore rootfs

Signed-off-by: Lauri Kasanen <curaga@operamail.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
13 years agofdisk_osf: simplify ifdef (incidentally, adds support for Microblaze)
Denys Vlasenko [Mon, 31 Jan 2011 04:55:52 +0000 (05:55 +0100)]
fdisk_osf: simplify ifdef (incidentally, adds support for Microblaze)

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
13 years agotar: add -h and -T to help text
Denys Vlasenko [Mon, 31 Jan 2011 04:35:23 +0000 (05:35 +0100)]
tar: add -h and -T to help text

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
13 years agolibbb/copy_file.c: use smallints instead of signed chars
Denys Vlasenko [Fri, 28 Jan 2011 18:14:17 +0000 (19:14 +0100)]
libbb/copy_file.c: use smallints instead of signed chars

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
13 years agogetty: fix "ifdef CMSPAR"
Denys Vlasenko [Wed, 26 Jan 2011 15:20:54 +0000 (16:20 +0100)]
getty: fix "ifdef CMSPAR"

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
13 years agogetty: restore CRTSCTS comment
Denys Vlasenko [Wed, 26 Jan 2011 15:14:47 +0000 (16:14 +0100)]
getty: restore CRTSCTS comment

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
13 years agoid: fix inverted if (!ENABLE_DESKTOP)
Denys Vlasenko [Wed, 26 Jan 2011 15:11:19 +0000 (16:11 +0100)]
id: fix inverted if (!ENABLE_DESKTOP)

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
13 years agogetty: do clear CLOCAL and CRTSCTS unless told otherwise
Denys Vlasenko [Wed, 26 Jan 2011 15:06:16 +0000 (16:06 +0100)]
getty: do clear CLOCAL and CRTSCTS unless told otherwise

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
13 years agogetty: do not clear all c_cflag's (we were clearing baud bits!)
Denys Vlasenko [Wed, 26 Jan 2011 14:56:51 +0000 (15:56 +0100)]
getty: do not clear all c_cflag's (we were clearing baud bits!)

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
13 years agogetty: wait up to 5 seconds for the output buffer to drain
Peter Korsgaard [Wed, 26 Jan 2011 14:15:19 +0000 (15:15 +0100)]
getty: wait up to 5 seconds for the output buffer to drain

Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
13 years agostty: cosmetic fix to settings table; no code changes
Denys Vlasenko [Wed, 26 Jan 2011 10:58:37 +0000 (11:58 +0100)]
stty: cosmetic fix to settings table; no code changes

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
13 years agogetty: document bits we don't set - maybe we should set some of them?
Denys Vlasenko [Wed, 26 Jan 2011 10:28:43 +0000 (11:28 +0100)]
getty: document bits we don't set - maybe we should set some of them?

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
13 years agogetty: add ECHOE explanation
Denys Vlasenko [Wed, 26 Jan 2011 02:31:23 +0000 (03:31 +0100)]
getty: add ECHOE explanation

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
13 years agogetty: explain every bit in termios; remove redundant stuff in termios_final
Denys Vlasenko [Wed, 26 Jan 2011 02:26:38 +0000 (03:26 +0100)]
getty: explain every bit in termios; remove redundant stuff in termios_final

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
13 years agodisable length applet. ${#var} and echo -n "$var" | wc -c are portable equivalents
Denys Vlasenko [Wed, 26 Jan 2011 00:21:20 +0000 (01:21 +0100)]
disable length applet. ${#var} and echo -n "$var" | wc -c are portable equivalents

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
13 years agodiff: return 1 when skipping directories with -r, but without -N
Alexander Shishkin [Tue, 25 Jan 2011 16:03:46 +0000 (18:03 +0200)]
diff: return 1 when skipping directories with -r, but without -N

Diff in diffutils will return 1 in case -r option is specified without
-N something exists only in one of the directories.

Signed-off-by: Alexander Shishkin <virtuoso@slind.org>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
13 years agomove utmp.h include to libbb.h
Denys Vlasenko [Tue, 25 Jan 2011 22:21:46 +0000 (23:21 +0100)]
move utmp.h include to libbb.h

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
13 years agotop: replace %MEM with %VSZ in header text
Denys Vlasenko [Tue, 25 Jan 2011 11:48:47 +0000 (12:48 +0100)]
top: replace %MEM with %VSZ in header text

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
13 years agoadd ENABLE_FEATURE_SYSTEMD and use it in syslogd
Davide Cavalca [Tue, 25 Jan 2011 01:26:03 +0000 (02:26 +0100)]
add ENABLE_FEATURE_SYSTEMD and use it in syslogd

Signed-off-by: Davide Cavalca <davide@geexbox.org>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
13 years agotop: document a debugging script
Denys Vlasenko [Tue, 25 Jan 2011 00:57:31 +0000 (01:57 +0100)]
top: document a debugging script

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
13 years agonicer looking ifdef in libbb/makedev.c
Denys Vlasenko [Mon, 24 Jan 2011 22:53:12 +0000 (23:53 +0100)]
nicer looking ifdef in libbb/makedev.c

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
13 years agogetty: flush _only_ input after switching to the next baud rate
Denys Vlasenko [Mon, 24 Jan 2011 22:45:22 +0000 (23:45 +0100)]
getty: flush _only_ input after switching to the next baud rate

It was originally like this, but at some point TCIFLUSH was
inadvertently changed to TCIOFLUSH.

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
13 years agostty: enable line discipline display and change code if __linix__
Denys Vlasenko [Mon, 24 Jan 2011 17:30:35 +0000 (18:30 +0100)]
stty: enable line discipline display and change code if __linix__

function                                             old     new   delta
stty_main                                           1242    1276     +34
do_display                                           419     431     +12
display_speed                                         90      81      -9
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 2/1 up/down: 46/-9)              Total: 37 bytes

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
13 years agogetty: simplify macros; improve VSWTC[H] compat
Denys Vlasenko [Mon, 24 Jan 2011 17:17:19 +0000 (18:17 +0100)]
getty: simplify macros; improve VSWTC[H] compat

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
13 years agoFreeBSD compat for match_fstype
Chris Rees [Mon, 24 Jan 2011 16:10:02 +0000 (17:10 +0100)]
FreeBSD compat for match_fstype

Signed-off-by: Chris Rees <utisoft@gmail.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
13 years agoFreeBSD compat for makedev
Chris Rees [Mon, 24 Jan 2011 16:07:40 +0000 (17:07 +0100)]
FreeBSD compat for makedev

Signed-off-by: Chris Rees <utisoft@gmail.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
13 years agoFreeBSD compat
Chris Rees [Mon, 24 Jan 2011 16:07:06 +0000 (17:07 +0100)]
FreeBSD compat

Signed-off-by: Chris Rees <utisoft@gmail.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
13 years agoFreeBSD compat
Chris Rees [Mon, 24 Jan 2011 16:03:36 +0000 (17:03 +0100)]
FreeBSD compat

Signed-off-by: Chris Rees <utisoft@gmail.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
13 years agostty: make swtch and iutf8 visible/settable
Denys Vlasenko [Mon, 24 Jan 2011 15:36:15 +0000 (16:36 +0100)]
stty: make swtch and iutf8 visible/settable

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
13 years agogetty: more simplifications; explain how we treat parity now
Denys Vlasenko [Mon, 24 Jan 2011 13:35:09 +0000 (14:35 +0100)]
getty: more simplifications; explain how we treat parity now

function                                             old     new   delta
getty_main                                          1471    1434     -37

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
13 years agogetty: simplify code by going to more straignforward G trick
Denys Vlasenko [Mon, 24 Jan 2011 03:43:04 +0000 (04:43 +0100)]
getty: simplify code by going to more straignforward G trick

function                                             old     new   delta
getty_main                                          1615    1475    -140

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