Commit Graph

1725 Commits

Author SHA1 Message Date
Denys Vlasenko
4f731ce30e findutils/*: move usage and applet bits to *.c files
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-06-15 15:40:16 +02:00
Denys Vlasenko
729ecb87bf bbconfig: make it independent from printf functions
function                                             old     new   delta
full_write2_str                                        -      25     +25
full_write1_str                                        -      25     +25
clear_main                                            21      20      -1
telnet_main                                         1488    1477     -11
getty_main                                          1932    1918     -14
full_write22_str                                      25       -     -25
------------------------------------------------------------------------------
(add/remove: 2/1 grow/shrink: 0/3 up/down: 50/-51)             Total: -1 bytes

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-06-07 14:14:26 +02:00
Denys Vlasenko
838e0dbda1 small fix in usage text
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-06-07 03:04:46 +02:00
Pascal Bellard
b82b34e06d modprobe: add support for -l and -s. Remove some unsupported options
Fixed some goofs in help text

function                                             old     new   delta
modprobe_main                                        494     653    +159
packed_usage                                       27129   27145     +16
insmod_main                                           98      95      -3

Signed-off-by: Pascal Bellard <pascal.bellard@ads-lu.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-06-07 01:18:53 +02:00
Denys Vlasenko
19ced5c425 pipe_progress: make it independent of printf machinery
function                                             old     new   delta
bb_putchar_stderr                                      -      24     +24
ParseField                                           494     471     -23
progress_meter                                       212     188     -24
xargs_main                                           888     842     -46
pipe_progress_main                                   151     105     -46
------------------------------------------------------------------------------
(add/remove: 2/0 grow/shrink: 0/4 up/down: 24/-139)          Total: -115 bytes

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-06-06 21:53:09 +02:00
Denys Vlasenko
f2177abe1d yes: this applet doesn't have options, don't lie that it does.
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-06-06 05:23:09 +02:00
Denys Vlasenko
f0f9470061 make it possible to keep usage texts in .c files
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-06-06 01:53:38 +02:00
Denys Vlasenko
6c5bf0d347 make it possible to have include/applets.h-esque entries in .c files
As an example, bunzip2 and bzcat is changed to use it.

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-06-06 00:53:45 +02:00
Denys Vlasenko
0e5ba0843b Remove requirement that include/applets.h must be sorted
First, I _again_ violated it - two xz-related applets are in wrong positions.
Second, planned in-applet help text thing will be so much easier without
this requirement...

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-06-05 23:11:07 +02:00
Denys Vlasenko
26b6ccf340 *: simplify checks for gz/bz2/xz magic
function                                             old     new   delta
send_tree                                            360     355      -5
rpm2cpio_main                                        249     220     -29
setup_unzip_on_fd                                    150     118     -32
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 0/3 up/down: 0/-66)             Total: -66 bytes

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-06-02 14:14:48 +02:00
Tomas Heinrich
11bcf4b224 lineedit: fix column display for wide and combining chars in TAB completion
function                                             old     new   delta
unicode_strwidth                                       -      20     +20
read_line_input                                     4945    4953      +8
unicode_strlen                                        31       -     -31
------------------------------------------------------------------------------
(add/remove: 1/1 grow/shrink: 1/0 up/down: 28/-31)             Total: -3 bytes

Signed-off-by: Tomas Heinrich <heinrich.tomas@gmail.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-06-01 08:33:18 +02:00
Denys Vlasenko
39a04f71ca archival/*: shrink by reusing sufficiently similar functions
function                                             old     new   delta
append_ext                                             -      16     +16
unxz_main                                             77      83      +6
unlzma_main                                           77      83      +6
uncompress_main                                       42      48      +6
gzip_main                                            184     190      +6
bzip2_main                                           114     120      +6
bunzip2_main                                          61      67      +6
bbunpack                                             469     475      +6
send_tree                                            355     360      +5
lzop_main                                             89      92      +3
gunzip_main                                           61      64      +3
make_new_name_lzop                                    84      82      -2
make_new_name_gunzip                                 114     112      -2
make_new_name_unxz                                    14       -     -14
make_new_name_unlzma                                  14       -     -14
make_new_name_uncompress                              14       -     -14
make_new_name_bunzip2                                 14       -     -14
make_new_name_gzip                                    17       -     -17
make_new_name_bzip2                                   17       -     -17
------------------------------------------------------------------------------
(add/remove: 1/6 grow/shrink: 10/2 up/down: 69/-94)           Total: -25 bytes

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-05-31 14:18:57 +02:00
Denys Vlasenko
6948f210ed *: teach tar et. al. to understand .xz by heart
function                                             old     new   delta
unpack_xz_stream                                       -    4126   +4126
setup_unzip_on_fd                                     80     150     +70
open_zipped                                          113     131     +18
unpack_unxz                                            5      12      +7
send_tree                                            360     353      -7
unpack_xz_stream_stdin                              3953       -   -3953
------------------------------------------------------------------------------
(add/remove: 1/1 grow/shrink: 3/1 up/down: 4221/-3960)        Total: 261 bytes

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-05-30 04:18:13 +02:00
Denys Vlasenko
602ce69afb unxz: new applet, complete with xzcat and xz -d aliases
function                                             old     new   delta
unpack_xz_stream_stdin                                 -    3953   +3953
lzma_main                                              -    2601   +2601
lzma_len                                               -     516    +516
dec_vli                                                -     165    +165
dict_repeat                                            -     103    +103
lzma_reset                                             -      98     +98
fill_temp                                              -      98     +98
crc32_validate                                         -      93     +93
xz_dec_reset                                           -      77     +77
unxz_main                                              -      77     +77
index_update                                           -      47     +47
xz_crc32                                               -      40     +40
packed_usage                                       27044   27060     +16
make_new_name_unxz                                     -      14     +14
applet_names                                        2240    2254     +14
applet_main                                         1312    1324     +12
applet_nameofs                                       656     662      +6
unpack_unxz                                            -       5      +5
send_tree                                            355     360      +5
applet_install_loc                                   164     166      +2
------------------------------------------------------------------------------
(add/remove: 15/0 grow/shrink: 6/0 up/down: 7942/0)          Total: 7942 bytes
   text    data     bss     dec     hex filename
 844032     453    6812  851297   cfd61 busybox_old
 852063     453    6812  859328   d1cc0 busybox_unstripped

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-05-30 03:35:18 +02:00
Denys Vlasenko
e04c867a21 rename FEATURE_LZMA_ALIAS to just LZMA
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-05-30 03:33:50 +02:00
Denys Vlasenko
a3581409c2 trim help text. -29 bytes
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-05-27 02:30:04 +02:00
Denys Vlasenko
ccb88a689e unlzma: add "lzma -d" alias, add -t support, rename lzmacat->lzcat
Also coalesce some common strings

   text    data     bss     dec     hex filename
 844110     453    6812  851375   cfdaf busybox_old
 844061     453    6812  851326   cfd7e busybox_unstripped

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-05-27 02:22:54 +02:00
Grigory Batalov
ad7a5d436c fgconsole: new applet by Grigory Batalov <bga@altlinux.org>
function                                             old     new   delta
fgconsole_main                                         -      51     +51
applet_names                                        2227    2237     +10
applet_main                                         1304    1308      +4
applet_nameofs                                       652     654      +2
applet_install_loc                                   163     164      +1
packed_usage                                       27079   27073      -6
------------------------------------------------------------------------------
(add/remove: 2/0 grow/shrink: 4/1 up/down: 68/-6)              Total: 62 bytes

Signed-off-by: Grigory Batalov <bga@altlinux.org>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-05-23 23:22:10 +02:00
Denys Vlasenko
9e07219c78 ps: make "ps -o BAD" emit list of good -o params
also make ps help more informative

function                                             old     new   delta
find_out_spec                                         58     103     +45
packed_usage                                       27039   27079     +40

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-05-23 00:34:42 +02:00
Maksym Kryzhanovskyy
fef9ee7072 fuser: code shrink, fixing default signal, exitcode and PID display
Defult signal is KILL, not TERM.
We used to not display PIDs with -k but without -s, but
upstream (fuser from PSmisc 22.7) still shows PIDs.
Filtering out of our own PID was buggy.

function                                             old     new   delta
fuser_main                                           669     918    +249
search_dev_inode                                      67      74      +7
add_pid                                               38      39      +1
scan_pid_maps                                        225     222      -3
add_inode                                             91      88      -3
packed_usage                                       27047   27039      -8
scan_dir_links                                       102      76     -26
scan_link                                             78      46     -32
file_to_dev_inode                                     64       -     -64
scan_proc_net                                        307       -    -307
------------------------------------------------------------------------------
(add/remove: 0/2 grow/shrink: 3/5 up/down: 257/-443)         Total: -186 bytes

Signed-off-by: Maksym Kryzhanovskyy <xmaks@email.cz>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-05-22 20:41:08 +02:00
Denys Vlasenko
40477e2fdb shell: make it possible to alias one of shells to "bash"
function                                             old     new   delta
packed_usage                                       27047   27054      +7
applet_names                                        2227    2232      +5
applet_main                                         1304    1308      +4
applet_nameofs                                       652     654      +2
applet_install_loc                                   163     164      +1
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 5/0 up/down: 19/0)               Total: 19 bytes

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-05-20 02:09:45 +02:00
Denys Vlasenko
ef215558fa typo fix
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-05-17 09:55:13 +02:00
Denys Vlasenko
26e2c1db0d stop using LAST_SUPPORTED_WCHAR and CONFIG_LAST_SUPPORTED_WCHAR, it's confusing
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-05-16 21:15:03 +02:00
Tomas Heinrich
b8909c52fe lineedit: partially fix wide and combining chars editing
Signed-off-by: Tomas Heinrich <heinrich.tomas@gmail.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-05-16 20:46:53 +02:00
Denys Vlasenko
b367bb2a62 cttyhack: document the need to setsid
function                                             old     new   delta
packed_usage                                       26988   27057     +69

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-05-15 20:43:07 +02:00
Denys Vlasenko
65ebbc54d3 trim help text
function                                             old     new   delta
packed_usage                                       27006   26988     -18

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-05-09 04:38:22 +02:00
Denys Vlasenko
6774386d95 tune2fs: move to e2fsprogs
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-05-09 00:13:40 +02:00
Gustavo Zacarias
c7efd6441d 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>
2010-05-06 18:30:48 +02:00
Denys Vlasenko
5dfd9c4dbc 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>
2010-05-06 16:56:38 +02:00
Denys Vlasenko
27653adc8b 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>
2010-05-06 14:19:19 +00:00
Denys Vlasenko
ff027d6f50 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>
2010-05-04 15:45:25 +02:00
Souf Oued
43afd75ea8 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>
2010-05-02 18:45:02 +02:00
Denys Vlasenko
05273daf6f grep: makw -w support unconditional
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-04-26 08:45:44 +02:00
Denys Vlasenko
e6080a4d7e udhcpc: make help text better
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-04-14 14:04:26 -07:00
Denys Vlasenko
0ecc116592 dnsd: enforce alignment on packet buffer
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-04-14 10:14:25 -07:00
Denys Vlasenko
f8d8aa1cea libbb: add skip_dev_pfx()
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-04-06 18:50:05 +02:00
Denys Vlasenko
f6916dbed4 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>
2010-04-06 17:43:29 +02:00
Denys Vlasenko
37bc1eb5cd removed extra \n in fdisk help text
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-04-06 00:04:08 +02:00
Denys Vlasenko
3a41611bc5 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>
2010-04-05 22:10:38 +02:00
Denys Vlasenko
37f5bef63c 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>
2010-04-05 03:18:40 +02:00
Denys Vlasenko
4836331924 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>
2010-04-04 15:29:32 +02:00
Denys Vlasenko
8fc9e6a15d 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>
2010-04-02 10:40:58 +02:00
Denys Vlasenko
8d22ca81c3 libpwdgrp: comment out more unused functions
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-03-31 14:43:58 +02:00
Denys Vlasenko
55301297d3 libpwdgrp: comment out functions with UNUSED_SINCE_WE_AVOID_STATIC_BUFS
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-03-31 12:38:17 +02:00
Kim B. Heino
3d43aed10c 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>
2010-03-29 14:18:27 +02:00
Denys Vlasenko
4816fe9179 usage: random tweaks to help texts
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-03-28 00:30:35 +01:00
Denys Vlasenko
c8a2ab1023 dumpleases: better help text
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-03-28 00:02:20 +01:00
Jérémie Koenig
fbedacfc8c Hurd compat fixes. Mostly dealing with absent PATH_MAX
Signed-off-by: Jérémie Koenig <jk@jk.fr.eu.org>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-03-26 19:08:53 +01:00
Denys Vlasenko
19158a837d unicode: s/FEATURE_ASSUME_UNICODE/UNICODE_SUPPORT, add UNICODE_USING_LOCALE
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-03-26 14:06:56 +01:00
Tomas Heinrich
aa167556cd unicode: optional table for better handling of neutral bidi chars
Off:
function                                             old     new   delta
unicode_bidi_isrtl                                     -      55     +55
isrtl_str                                             51      65     +14
unicode_isrtl                                         55       -     -55
read_line_input                                     5003    4937     -66
------------------------------------------------------------------------------
(add/remove: 1/4 grow/shrink: 1/1 up/down: 69/-121)           Total: -52 bytes

On:
function                                             old     new   delta
static.neutral_b                                       -     320    +320
static.neutral_p                                       -     142    +142
unicode_bidi_isrtl                                     -      55     +55
unicode_bidi_is_neutral_wchar                          -      55     +55
isrtl_str                                             51      59      +8
unicode_isrtl                                         55       -     -55
read_line_input                                     5003    4937     -66
------------------------------------------------------------------------------
(add/remove: 4/4 grow/shrink: 1/1 up/down: 580/-121)          Total: 459 bytes

Signed-off-by: Tomas Heinrich <heinrich.tomas@gmail.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-03-26 13:13:24 +01:00