Commit Graph

1712 Commits

Author SHA1 Message Date
Denys Vlasenko
666e1d3978 tweak sendmail and makemime help texts
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-07-05 21:46:37 +02:00
Denys Vlasenko
09e63bb81f df: fix "df /"
also, clean up mount checks in mkfs/fsck.

function                                             old     new   delta
find_mount_point                                     243     261     +18
sha1_process_block64                                 497     510     +13
find_main                                            436     444      +8
display_speed                                         85      90      +5
df_main                                              795     793      -2
parse_command                                       1463    1460      -3
static.ignored_mounts                                  8       -      -8
mkfs_minix_main                                     2962    2937     -25
fsck_minix_main                                     3065    2970     -95
------------------------------------------------------------------------------
(add/remove: 0/1 grow/shrink: 4/4 up/down: 44/-133)           Total: -89 bytes

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-07-05 04:50:36 +02:00
Denys Vlasenko
9b1b62adc4 Patches to enable FreeBSD build
platform.h: fix wrong check for endianness, fix lchown
aliasing to chown on uclibc.

Code seems to not be affected in my testing.

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-07-05 03:34:12 +02:00
Denys Vlasenko
fca70a8cce ps: conditionally support additional -o FIELDs
function                                             old     new   delta
procps_scan                                         1409    1642    +233
out_spec                                             220     300     +80
func_ruser                                             -      36     +36
func_rgroup                                            -      36     +36
func_group                                            13      49     +36
func_nice                                              -      29     +29
buffer_fill_and_print                                179     196     +17
send_tree                                            355     360      +5
mkfs_vfat_main                                      1604    1609      +5
display_speed                                         85      90      +5
scriptreplay_main                                    194     197      +3
find_out_spec                                         55      58      +3
changepath                                           192     195      +3
sha1_process_block64                                 497     484     -13
------------------------------------------------------------------------------
(add/remove: 3/0 grow/shrink: 10/1 up/down: 491/-13)          Total: 478 bytes

Signed-off-by: David Krakov <krakov@gmail.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-07-03 22:16:17 +02:00
Denys Vlasenko
d30b89c7ee updates for supporting Linux kernel build and initrd utilities
cpio: --verbose, --quiet, --to-stdout
test: make 64-bit math enable-able for hush too
dnsdomainname: alias to hostname -d
hostname: support --fqdn, --domain, --file

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-06-26 01:55:45 +02:00
Denys Vlasenko
b0bee2b0da trim/regularize usage texts. -92 bytes
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-06-20 03:59:02 +02:00
Denys Vlasenko
f3b92d3856 getopt: FEATURE_GETOPT_LONG for -l; rename GETOPT_LONG to LONG_OPTS
Signed-off-by: Colin Watson <cjwatson@ubuntu.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-06-19 12:10:38 +02:00
Denys Vlasenko
e2e4cc249d mount: support -i; pass through -f and -n to helpers as necessary
function                                             old     new   delta
mount_it_now                                         298     345     +47
singlemount                                          776     772      -4

Signed-off-by: Colin Watson <cjwatson@ubuntu.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-06-19 11:48:29 +02:00
Denys Vlasenko
14f6f0ad4a fsync: new applet by Pekka Pessi (Pekka.Pessi AT nokia.com)
function                                             old     new   delta
fsync_main                                             -     128    +128
fdatasync                                              -      39     +39
packed_usage                                       26596   26622     +26
applet_names                                        2098    2104      +6
applet_main                                         1240    1244      +4
applet_nameofs                                       620     622      +2
applet_install_loc                                   155     156      +1
------------------------------------------------------------------------------
(add/remove: 2/0 grow/shrink: 5/0 up/down: 206/0)             Total: 206 bytes

Signed-off-by: Alexander Shishkin <virtuoso@slind.org>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-06-18 08:20:02 +02:00
Denys Vlasenko
a99aa6e9c4 readlink: support -n, -v, -s and -q too if support for -f is requested
function                                             old     new   delta
readlink_main                                        104     135     +31
packed_usage                                       26322   26321      -1
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 1/1 up/down: 31/-1)              Total: 30 bytes

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-06-12 13:16:21 +02:00
Denys Vlasenko
8f24f9812d stop using non-standard macro, use WEXITSTATUS instead
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-06-07 16:02:00 +02:00
Denys Vlasenko
4b7db4f2ca read_key: drop optimization where we read 3 bytes at once
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-05-29 10:39:06 +02:00
Denys Vlasenko
bf2af9acb2 flash_lock, flash_unlock: new applets
By Thierry Reding (thierry.reding AT avionic-design.de)

Signed-off-by: Thierry Reding <thierry.reding@avionic-design.de>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-05-25 04:15:37 +02:00
Denys Vlasenko
5e61115ea4 scriptreplay: new applet. +423 bytes
Signed-off-by: Pascal Bellard <pascal.bellard@ads-lu.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-05-19 17:36:16 +02:00
Denys Vlasenko
5a49d284a6 add platform tweaks
login: consider platforms having no domainname field in the utsname struct
include/platform.h: define IUCLC to 0 on platforms where it is not defined

Signed-off-by: Luca Favatella <slackydeb@gmail.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-05-19 13:18:45 +02:00
Denys Vlasenko
020f40693a line editing: add an option to emit ESC [ 6 n and use results
This makes line editing able to recognize case when
cursor was not at the beginning of the line. It may also
be adapted later to find out display size (serial line users
would love it).

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-05-17 16:44:54 +02:00
Denys Vlasenko
071ede1e5d xmalloc_[open_]read[_close]: do not ignore xrealloc return value
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-05-15 23:23:23 +02:00
Denys Vlasenko
c15f40c3e7 lineedit: use read_key to recognize ESC sequence.
This fixes several vi mode bugs and prepares for further fixes.

function                                             old     new   delta
read_line_input                                     3287    5511   +2224
remember_in_history                                    -     499    +499
lineedit_read_key                                      -      70     +70
read_key                                             321     332     +11
input_tab                                           2823       -   -2823
------------------------------------------------------------------------------
(add/remove: 2/1 grow/shrink: 2/0 up/down: 2804/-2823)        Total: -19 bytes

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-05-15 03:27:53 +02:00
Mike Frysinger
3322351724 add .gitignore files
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2009-05-05 09:05:30 -04:00
Denis Vlasenko
052ad9a568 lzop: new applet. Busyboxed by Alain Knaff. +7700 bytes. 2009-04-29 12:01:51 +00:00
Denis Vlasenko
71c165780a ifplugd: new applet by Maksym Kryzhanovskyy (xmaks AT email.cz)
+3k code and 0.5k in messages. Most of the bloat due to compat :(
2009-04-26 01:08:51 +00:00
Denis Vlasenko
c2931aa2df adduser/addgroup: support specifying uid/gid, add system
account creation mode. By Tito.

function                                             old     new   delta
adduser_main                                         650     726     +76
addgroup_main                                        341     402     +61
addgroup_longopts                                      -      16     +16
adduser_longopts                                      97     103      +6
packed_usage                                       26161   26163      +2
------------------------------------------------------------------------------
(add/remove: 1/0 grow/shrink: 4/0 up/down: 161/0)             Total: 161 bytes
2009-04-22 21:35:52 +00:00
Denis Vlasenko
1cf4a0eb81 httpd: simplify insane conf file parser
function                                             old     new   delta
bb_simplify_abs_path_inplace                           -      98     +98
parse_expr                                           824     832      +8
passwd_main                                         1025    1027      +2
evalvar                                             1374    1376      +2
parse_command                                       1463    1460      -3
bb_simplify_path                                     137      55     -82
parse_conf                                          1572    1422    -150
------------------------------------------------------------------------------
(add/remove: 3/2 grow/shrink: 3/3 up/down: 126/-251)         Total: -125 bytes
2009-04-22 13:49:16 +00:00
Denis Vlasenko
b029154a2a httpd: improve help text 2009-04-22 00:26:39 +00:00
Denis Vlasenko
f9d4fc3cf8 switch_root: improve behavior on error; improve help text
*: make "can't execute '%s'" message uniform
2009-04-21 20:40:51 +00:00
Denis Vlasenko
5e34ff29bc *: mass renaming of USE_XXXX to IF_XXXX
and SKIP_XXXX to IF_NOT_XXXX - the second one was especially
badly named. It was not skipping anything!
2009-04-21 11:09:40 +00:00
Denis Vlasenko
8b814b4a34 tar: support for tar --numeric-owner. By Natanael Copa.
function                                             old     new   delta
tar_longopts                                         221     237     +16
data_extract_all                                     692     705     +13
tar_main                                             690     702     +12
2009-04-21 00:52:21 +00:00
Denis Vlasenko
3be2308676 fix move_to_unaligned32 2009-04-17 22:20:44 +00:00
Denis Vlasenko
829bbd3b57 *: unify concurrent-safe update of /etc/{passwd,group,[g]shadow}
by Tito (farmatito AT tiscali.it)

function                                             old     new   delta
update_passwd                                        743    1171    +428
bb_perror_nomsg                                        -       9      +9
find_main                                            436     444      +8
passwd_main                                         1023    1027      +4
nameval                                              202     206      +4
chpasswd_main                                        315     319      +4
bb__parsespent                                       119     117      -2
adduser_main                                         654     650      -4
addgroup_main                                        345     341      -4
sv_main                                             1228    1222      -6
deluser_main                                         173     160     -13
bb_internal_putpwent                                  69       -     -69
add_user_to_group                                    231       -    -231
del_line_matching                                    460      31    -429
------------------------------------------------------------------------------
(add/remove: 1/2 grow/shrink: 5/6 up/down: 457/-758)         Total: -301 bytes
2009-04-14 00:51:05 +00:00
Denis Vlasenko
f2b39e088d mdev: add support for - "dont stop here" char
function                                             old     new   delta
make_device                                         1340    1362     +22
packed_usage                                       26291   26299      +8
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 2/0 up/down: 30/0)               Total: 30 bytes
2009-04-13 23:18:52 +00:00
Denis Vlasenko
0b791d9a97 move llist_find_str from modutils to libbb 2009-04-13 20:52:00 +00:00
Denis Vlasenko
aafbae6181 mdev: make usage text more useful
function                                             old     new   delta
packed_usage                                       26235   26291     +56
2009-04-13 13:33:02 +00:00
Denis Vlasenko
e8a796828e dhcprelay: fix usage text. Simplify and make code more readable.
Add TODOs.
2009-04-13 03:33:46 +00:00
Denis Vlasenko
f81e8dbc74 *: make "pragma GCC visibility push(hidden)" less ugly 2009-04-09 12:35:13 +00:00
Denis Vlasenko
551ffdccea more of pointless whitespace fixes 2009-04-01 19:48:05 +00:00
Denis Vlasenko
3266aa9ec2 trailing whitespace removal 2009-04-01 11:24:04 +00:00
Denis Vlasenko
88b8f0a347 sendmail: update by Vladimir
build system: tweak for rare case where include/autoconf.h
  does not get updated

function                                             old     new   delta
packed_usage                                       26238   26242      +4
sendmail_main                                       1353     897    -456
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 1/1 up/down: 4/-456)           Total: -452 bytes
2009-03-31 23:41:53 +00:00
Denis Vlasenko
a6eb7f4ddf sendmail: add more example in usage text 2009-03-29 16:53:25 +00:00
Denis Vlasenko
9d04b6b630 mkdosfs (aka mkfs.vfat): new applet by Vladimir
text    data     bss     dec     hex filename
 821202     476    7616  829294   ca76e busybox_old
 823577     476    7616  831669   cb0b5 busybox_unstripped
2009-03-28 02:13:01 +00:00
Denis Vlasenko
c0ea82a457 libbb: revent previous version of "concurrent history updating"
and replace it with one which does not "snoop" history written
by others. (1) it is what bug 185 needs, and (2) it is less bloaty:

function                                             old     new   delta
load_history                                           -     252    +252
read_line_input                                     3155    3287    +132
next_token                                           914     918      +4
qrealloc                                              36      33      -3
getoptscmd                                           713     708      -5
------------------------------------------------------------------------------
(add/remove: 1/0 grow/shrink: 2/2 up/down: 388/-8)            Total: 380 bytes
2009-03-23 06:33:37 +00:00
Denis Vlasenko
57abf9e947 libbb: make history saving/loading concurrent-safe
* all history writers always append (not overwrite) history files
* they reload history if they detect that file length has changed since last
write
* they trim history file only when it grows 4 times longer than MAXLINES
* they do this atomically by creating new file and renaming it to old

Unfortunately, this comes at a price:

function                                             old     new   delta
load_history                                           -     346    +346
read_line_input                                     3155    3358    +203
new_line_input_t                                      17      31     +14
...irrelevant small jitter...
------------------------------------------------------------------------------
(add/remove: 1/0 grow/shrink: 5/5 up/down: 573/-13)           Total: 560 bytes
2009-03-22 19:00:05 +00:00
Denis Vlasenko
83518d18a3 Compatibility fixes:
grep: support -z
find: support --mindepth
  together +45 bytes
cpio: support -p (configurable, +230 bytes)
libbb: tweaks for cpio
2009-03-20 22:17:13 +00:00
Denis Vlasenko
9f57cf6604 ftpd: fix command fetching to not do it in 1-byte reads;
fix command de-escaping. Tested to download files with embeeded \xff and LF.
libbb: tweaks for the above

function                                             old     new   delta
ftpd_main                                           2231    2321     +90
xmalloc_fgets_internal                               190     222     +32
xmalloc_fgets_str_len                                  -      27     +27
xmalloc_fgets_str                                      7      23     +16
xmalloc_fgetline_str                                  10      26     +16
------------------------------------------------------------------------------
(add/remove: 1/0 grow/shrink: 4/0 up/down: 181/0)             Total: 181 bytes
2009-03-18 17:32:44 +00:00
Denis Vlasenko
20c8216897 ftpd: add idle and absolute timeouts. This is a security issue,
otherwise ftpd may end up hanging indefinitely.

function                                             old     new   delta
timeout_handler                                        -     110    +110
ftpd_main                                           2019    2115     +96
packed_usage                                       25662   25685     +23
handle_upload_common                                 306     322     +16
------------------------------------------------------------------------------
(add/remove: 1/0 grow/shrink: 3/0 up/down: 245/0)             Total: 245 bytes
2009-03-16 16:19:53 +00:00
Denis Vlasenko
8ec8d5e3db sha: fix thinko in sha512; add FAST_FUNC to sha1/sha256
function                                             old     new   delta
sha512_process_block128                             1334    1336      +2
sha1_hash                                            112     111      -1
sha256_process_block64                               446     440      -6
sha1_process_block64                                 494     484     -10
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 1/3 up/down: 2/-17)             Total: -15 bytes
2009-03-15 02:56:00 +00:00
Denis Vlasenko
e9afc468fa sha: merge sha1/sha256 handling (they are similar enough for this),
shrink sha215 code

function                                             old     new   delta
sha1_end                                             129     142     +13
sha1_process_block64                                 486     494      +8
sha256_begin                                          37      44      +7
sha1_begin                                            49      56      +7
sha1_hash                                            108     112      +4
...
sha512_end                                           204     184     -20
sha512_process_block128                             1405    1334     -71
sha256_process_block64                               520     446     -74
sha256_end                                           147       -    -147
sha512_hash                                          297     130    -167
sha256_hash                                          260       -    -260
------------------------------------------------------------------------------
(add/remove: 0/2 grow/shrink: 11/9 up/down: 59/-752)         Total: -693 bytes
2009-03-15 02:28:05 +00:00
Denis Vlasenko
7aaedcf21e mount: support "-O option"; stop trying to mount swap partitions
function                                             old     new   delta
mount_main                                           975    1152    +177
umount_main                                          640     636      -4
packed_usage                                       25666   25662      -4
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 1/2 up/down: 177/-8)            Total: 169 bytes
2009-03-14 22:57:20 +00:00
Denis Vlasenko
c8329c9568 sha: reduce sha256/512 context size. Make sha1/sha256 code more similar
function                                             old     new   delta
sha512_end                                           182     204     +22
sha256_end                                           137     147     +10
sha1_hash                                            113     108      -5
sha1_end                                             143     129     -14
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 2/2 up/down: 32/-19)             Total: 13 bytes
2009-03-12 19:06:18 +00:00
Denis Vlasenko
cd2cd312b7 shrink sha hashing a bit more (remove wbuflen field from ctx),
remove the requirement for aligned buffer

function                                             old     new   delta
sha512_hash                                          262     297     +35
sha1_end                                             136     143      +7
passwd_main                                         1019    1023      +4
sha256_end                                           135     137      +2
count_lines                                           72      74      +2
sha256_hash                                          259     260      +1
popstring                                            164     158      -6
sha512_begin                                          88      81      -7
sha256_begin                                          44      37      -7
parse_expr                                           832     824      -8
bbunpack                                             446     438      -8
sha256_process_block64                               529     520      -9
md5_end                                              166     151     -15
evaltreenr                                           817     802     -15
evaltree                                             817     802     -15
sha512_end                                           204     182     -22
sha512_process_block128                             1444    1405     -39
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 6/11 up/down: 51/-151)         Total: -100 bytes
2009-03-12 15:40:27 +00:00
Denis Vlasenko
98c87f7575 sha256/512: code shrink. Run-tested.
function                                             old     new   delta
sha512_process_block128                                -    1444   +1444
sha1_process_block64                                   -     542    +542
sha256_process_block64                                 -     529    +529
K512_lo                                                -     320    +320
K256                                                   -     320    +320
init512_lo                                             -      32     +32
init256                                                -      32     +32
sha1_hash                                             99     128     +29
sha256_end                                           160     135     -25
sha1_end                                             189     160     -29
sha512_end                                           237     204     -33
sha256_begin                                          77      44     -33
sha512_begin                                         154      88     -66
sha256_hash                                          338     259     -79
sha512_hash                                          358     262     -96
sha1_compile                                         542       -    -542
sha256_process_block                                 594       -    -594
static.K                                             896       -    -896
sha512_process_block                                1861       -   -1861
------------------------------------------------------------------------------
(add/remove: 7/4 grow/shrink: 1/7 up/down: 3248/-4254)      Total: -1006 bytes
   text    data     bss     dec     hex filename
 808013     468    7856  816337   c74d1 busybox_old
 807007     468    7856  815331   c70e3 busybox_unstripped
2009-03-11 21:15:51 +00:00
Denis Vlasenko
4221e90ae4 ftpd: stop unconditional logging to syslog. This was the only applet
which was doing it. Added option -S to enable it when desired.

function                                             old     new   delta
packed_usage                                       25647   25666     +19
ftpd_main                                           1826    1825      -1
2009-03-11 15:07:44 +00:00
Denis Vlasenko
9257671c76 fix typo in help text 2009-03-09 16:25:33 +00:00
Denis Vlasenko
c41cba5a57 ftpd: reuse ls applet for LIST/NLST/STAT generation
function                                             old     new   delta
popen_ls                                               -     211    +211
ftpd_main                                           1760    1826     +66
handle_dir_common                                    199     228     +29
get_remote_transfer_fd                                89     104     +15
replace_char                                          30      34      +4
handle_upload_common                                 263     265      +2
bind_for_passive_mode                                129     121      -8
cmdio_write                                           84      62     -22
escape_text                                          166     136     -30
init_data_sock_params                                 81       -     -81
ftpdataio_dispose_transfer_fd                         87       -     -87
write_dirstats                                       149       -    -149
write_filestats                                      603       -    -603
------------------------------------------------------------------------------
(add/remove: 1/4 grow/shrink: 11/5 up/down: 384/-986)        Total: -602 bytes
   text    data     bss     dec     hex filename
 808804     476    7864  817144   c77f8 busybox_old
 808156     476    7864  816496   c7570 busybox_unstripped
2009-03-09 15:46:07 +00:00
Denis Vlasenko
73c571a5ff *: move get_sock_lsa and xwrite_str to libbb, use where appropriate
function                                             old     new   delta
get_sock_lsa                                           -      72     +72
buffer_fill_and_print                                179     196     +17
parse_expr                                           824     832      +8
read_base64                                          343     348      +5
nameval                                              202     206      +4
fbset_main                                          1694    1698      +4
expand                                              1849    1853      +4
udhcp_send_kernel_packet                             249     252      +3
udhcp_get_option                                     223     222      -1
chat_main                                           1246    1245      -1
pack_gzip                                           1661    1659      -2
doset                                                299     297      -2
bb__parsespent                                       119     117      -2
test_main                                            260     257      -3
qgravechar                                           109     106      -3
tcpudpsvd_main                                      1834    1830      -4
sysctl_display_all                                   589     580      -9
xopen_xwrite_close                                    44      33     -11
prs                                                   30      18     -12
find_main                                            418     406     -12
full_write2_str                                       25      12     -13
adduser_main                                         667     654     -13
evaltreenr                                           817     802     -15
evaltree                                             817     802     -15
tftpd_main                                           526     493     -33
ftpd_main                                           2050    1990     -60
------------------------------------------------------------------------------
(add/remove: 1/0 grow/shrink: 7/18 up/down: 117/-211)         Total: -94 bytes
2009-03-09 00:12:37 +00:00
Denis Vlasenko
5e4fda0aff ftpd: code chrink, fixed some minor bugs
ls: update comment
*: openlog fixes (added LOG_PID, set LOG_DAEMON as appropriate)

function                                             old     new   delta
xwrite_str                                             -      26     +26
cmdio_write_ok                                         -      15     +15
handle_cwd                                            40      45      +5
packed_usage                                       25668   25670      +2
cmdio_write_raw                                        7       9      +2
handle_upload_common                                 322     320      -2
udhcpd_main                                         1375    1372      -3
udhcpc_main                                         2362    2359      -3
port_cleanup                                          27      23      -4
handle_dir_common                                    221     209     -12
str_netfd_write                                       26       -     -26
cmdio_get_cmd_and_arg                                122       -    -122
ftpd_main                                           2208    2050    -158
------------------------------------------------------------------------------
   text    data     bss     dec     hex filename
 809933     476    7864  818273   c7c61 busybox_old
 809199     476    7864  817539   c7983 busybox_unstripped
2009-03-08 23:46:48 +00:00
Denis Vlasenko
16b4a2de97 ftpd: new applet by Adam Tkac
$ size ftpd.o
   text    data     bss     dec     hex filename
   5703       0       0    5703    1647 ftpd.o
2009-03-08 09:30:56 +00:00
Denis Vlasenko
fb1a23d73b halt/reboot/poweroff: improve error reporting
function                                             old     new   delta
halt_main                                            207     185     -22
2009-03-07 01:54:24 +00:00
Denis Vlasenko
021de3f029 sendmail: document and fix usage of fd #4, fix check for helper failure.
function                                             old     new   delta
packed_usage                                       25663   25694     +31
signal_handler                                       191     215     +24
kill_helper                                           22      31      +9
launch_helper                                        194     184     -10
get_cred_or_die                                      142     129     -13
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 3/2 up/down: 64/-23)             Total: 41 bytes
2009-03-04 17:56:00 +00:00
Denis Vlasenko
7e0c243ad5 sendmail: improve help text 2009-03-02 16:12:00 +00:00
Bernhard Reutner-Fischer
12aca796ba - improve wording 2009-02-24 10:03:22 +00:00
Bernhard Reutner-Fischer
0d22d1755c - add flash_eraseall
This is the result after converting mtd-utils' flash_eraseall to BB.
The functionality given by this patch almost the same except that this
one does not support long options.
I needed this tool a system which does not have a lot of flash for RFS
and merging this into BB as the only way out.

[bigeasy@]$ ./scripts/bloat-o-meter bb_wo_fl bb_w_fl
function                                             old     new   delta
flash_eraseall_main                                    -    1072   +1072
show_progress                                          -      62     +62
packed_usage                                       25156   25176     +20
applet_names                                        1958    1973     +15
applet_main                                         2352    2360      +8
target_endian                                          -       4      +4
applet_nameofs                                       588     590      +2
applet_install_loc                                   147     148      +1
------------------------------------------------------------------------------
(add/remove: 3/0 grow/shrink: 5/0 up/down: 1184/0)           Total: 1184 bytes
[bigeasy@]$ size miscutils/flash_eraseall.o
   text    data     bss     dec     hex filename
   1586       4       0    1590     636 miscutils/flash_eraseall.o

Signed-off-by: Benedigt Spranger <b.spranger@linutronix.de>
Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
2009-02-18 13:23:46 +00:00
Denis Vlasenko
9f00e05781 killall and sestatus also need ARGVN scanning 2009-02-14 01:36:11 +00:00
Denis Vlasenko
a0ab943492 function old new delta
kill_main                                            706     884    +178
2009-02-07 22:30:39 +00:00
Denis Vlasenko
6d5590f9d0 sendmail: remove erroneous usage lines 2009-02-04 00:01:07 +00:00
Denis Vlasenko
4acdb46ff1 ionice: new applet, adapted from Linux kernel' example by Walter Harms
text    data     bss     dec     hex filename
1050316     924   10952 1062192  103530 busybox_old
1050758     924   10952 1062634  1036ea busybox_unstripped
2009-01-31 21:45:57 +00:00
Denis Vlasenko
cab28aa7de init: preparatory patch, no code changes 2009-01-31 01:02:07 +00:00
Denis Vlasenko
39b681343b tunctl: new applet by Vladimir
function                                             old     new   delta
tunctl_main                                            -     371    +371
packed_usage                                       25669   25799    +130
applet_names                                        1981    1988      +7
applet_main                                         1192    1196      +4
applet_nameofs                                       596     598      +2
applet_install_loc                                   149     150      +1
------------------------------------------------------------------------------
(add/remove: 1/0 grow/shrink: 5/0 up/down: 515/0)             Total: 515 bytes
2009-01-23 02:07:14 +00:00
Denis Vlasenko
76ddc2e3e4 libbb: add bb_unsetenv (taken from hush).
udhcpc: stop filtering environment passed to the script.
crond: fix uncovered potential bug (failing unsetenv)
mdev: fix uncovered potential bug (failing unsetenv)
tcp, udpsvd: fix uncovered potential bug (failing unsetenv)

function                                             old     new   delta
safe_setenv                                            -      58     +58
bb_unsetenv                                            -      55     +55
builtin_unset                                        139     138      -1
tcpudpsvd_main                                      1843    1830     -13
free_strings_and_unsetenv                             87      53     -34
udhcp_run_script                                    1186    1133     -53
safe_setenv4                                          62       -     -62
------------------------------------------------------------------------------
(add/remove: 2/1 grow/shrink: 0/4 up/down: 113/-163)          Total: -50 bytes
2008-12-30 05:05:31 +00:00
Denis Vlasenko
73ac056f50 s/an user/a user/ 2008-12-25 01:01:23 +00:00
Denis Vlasenko
4e12b1a2a9 libbb: introduce and use xmalloc_ttyname (-32 in bss).
ash: small code shrink

   text    data     bss     dec     hex filename
 793669     504    7524  801697   c3ba1 busybox_old
 793659     504    7492  801655   c3b77 busybox_unstripped
2008-12-23 23:36:47 +00:00
Denis Vlasenko
e53738558f *: fix SO_BINDTODEVICE. Kernel wants at least IFNAMSIZ bytes there. 2008-12-10 11:12:16 +00:00
Denis Vlasenko
efb545b9bd optimize 16- and 32-bit moves
function                                             old     new   delta
udhcpd_main                                         1239    1257     +18
udhcp_add_simple_option                               93      92      -1
buffer_read_le_u32                                    19      18      -1
unpack_gz_stream_with_info                           526     520      -6
dnsd_main                                           1470    1463      -7
udhcp_run_script                                    1208    1186     -22
send_ACK                                             255     229     -26
arping_main                                         1661    1623     -38
send_offer                                           470     428     -42
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 1/8 up/down: 18/-143)          Total: -125 bytes
2008-12-08 22:56:18 +00:00
Denis Vlasenko
15437e3e2a libbb: add xgetgrnam too. ~0 code size change 2008-12-05 16:23:06 +00:00
Denis Vlasenko
e45930e890 Fold mkpasswd applet into cryptpw.
mkpasswd is in Debian, OTOH cryptpw was added to busybox earlier.
Trying to make both camps happy by making those two applets just aliases.
They are command-line compatible. We can decide whether we want to drop one
(and which one) later.

function                                             old     new   delta
cryptpw_main                                         183     314    +131
static.methods                                        21       -     -21
packed_usage                                       25707   25648     -59
mkpasswd_main                                        307       -    -307
------------------------------------------------------------------------------
(add/remove: 0/2 grow/shrink: 1/1 up/down: 131/-387)         Total: -256 bytes
2008-12-04 12:05:26 +00:00
Denis Vlasenko
d7a805efaf libbb: introduce and use xgetpwnam. ~ -150 bytes. 2008-12-03 19:05:55 +00:00
Bernhard Reutner-Fischer
ac1c96f673 - remove superfluous comment from previous commit 2008-12-03 18:49:44 +00:00
Bernhard Reutner-Fischer
82b1429966 - add new applet mkpasswd(1)
function                                             old     new   delta
bb_ask                                                 -     355    +355
mkpasswd_main                                          -     296    +296
.rodata                                           121746  121847    +101
packed_usage                                       24632   24689     +57
static.methods                                         -      21     +21
gmatch                                               229     248     +19
bb_ask_stdin                                           -      11     +11
applet_names                                        1949    1958      +9
applet_main                                         1172    1176      +4
sulogin_main                                         503     505      +2
applet_nameofs                                       586     588      +2
sha256_hash                                          329     327      -2
correct_password                                     208     206      -2
parse_command                                       1442    1439      -3
get_cred_or_die                                      145     141      -4
passwd_main                                         1054    1044     -10
bb_askpass                                           348       -    -348
------------------------------------------------------------------------------
(add/remove: 4/1 grow/shrink: 7/5 up/down: 877/-369)          Total: 508 bytes
2008-12-03 18:48:39 +00:00
Denis Vlasenko
6ebb2f56d5 crond: use bb_setpgrp, not setpgrp
platform.h: make a bit more readable
2008-12-03 10:46:12 +00:00
Denis Vlasenko
0c68a874e7 libbb: password/group function helpers rewritten by Tito:
function                                             old     new   delta
xgetpwuid                                              -      27     +27
uid2uname_utoa                                         -      22     +22
gid2group_utoa                                         -      22     +22
uid2uname                                              -      18     +18
gid2group                                              -      18     +18
buffer_fill_and_print                                179     196     +17
print_user                                            12      24     +12
print_group                                           12      24     +12
get_cached                                            89      99     +10
...
print_common                                         134     120     -14
vlock_main                                           415     396     -19
logger_main                                          410     387     -23
crontab_main                                         642     609     -33
bb_getpwuid                                           42       -     -42
bb_getgrgid                                           42       -     -42
bb_getug                                              80       -     -80
------------------------------------------------------------------------------
(add/remove: 6/3 grow/shrink: 9/11 up/down: 187/-296)        Total: -109 bytes
2008-12-02 22:56:59 +00:00
Denis Vlasenko
360d9661b6 libbb: add strncpy_IFNAMSIZ
function                                             old     new   delta
...
udhcp_read_interface                                 225     220      -5
brctl_main                                          1151    1146      -5
add_interface                                        109     104      -5
ipaddr_list_or_flush                                2174    2167      -7
do_add_ioctl                                          88      80      -8
vconfig_main                                         249     240      -9
do_del_ioctl                                          78      68     -10
do_iplink                                           1186    1173     -13
do_if_fetch                                          766     753     -13
buffer_fill_and_print                                196     179     -17
parse_args                                          1709    1684     -25
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 2/20 up/down: 11/-140)         Total: -129 bytes
2008-12-02 18:18:50 +00:00
Denis Vlasenko
7a1ddf20f3 mountpoint: add -n option (by Vladimir)
text    data     bss     dec     hex filename
 799859     560    7748  808167   c54e7 busybox_old
 799845     560    7748  808153   c54d9 busybox_unstripped
2008-11-29 12:54:16 +00:00
Denis Vlasenko
d16950ded9 acpid: new applet by Vladimir. +737 bytes 2008-11-29 09:05:50 +00:00
Denis Vlasenko
4240408b70 trim help text a bit 2008-11-24 13:42:24 +00:00
Denis Vlasenko
a9acbe6cad timeout: new applet. 370 bytes. by Roberto Foglietta. 2008-11-24 13:25:20 +00:00
Denis Vlasenko
36309cf3f4 insmod: clarify module_name / file_name distinction 2008-11-22 18:29:01 +00:00
Denis Vlasenko
9a4c0d59a7 inotifyd: exit if x event happened for all files
fix FIONREAD parameter type
 fix default mask code
 shrink help text

function                                             old     new   delta
inotifyd_main                                        497     506      +9
packed_usage                                       25446   25431     -15
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 1/1 up/down: 9/-15)              Total: -6 bytes
2008-11-20 01:24:39 +00:00
Denis Vlasenko
a09a42cd83 inotify: add x, o, and u events 2008-11-17 22:19:18 +00:00
Denis Vlasenko
2479cd4a5d inotifyd: fix "inotifyd with no params" case 2008-11-14 22:14:12 +00:00
Denis Vlasenko
289ff0e341 inotify: document waiting behavior 2008-11-14 21:52:16 +00:00
Denis Vlasenko
4d47692fb8 arp: stop using globals
function                                             old     new   delta
hw_set                                                 1       -      -1
arp_main                                            1559    1558      -1
sockfd                                                 8       4      -4
hw                                                     4       -      -4
device                                                 4       -      -4
ap                                                     4       -      -4
packed_usage                                       25402   25393      -9
------------------------------------------------------------------------------
(add/remove: 0/4 grow/shrink: 0/3 up/down: 0/-27)             Total: -27 bytes
2008-11-13 00:05:17 +00:00
Denis Vlasenko
cf3e05bbdb correct help texts 2008-11-12 21:18:58 +00:00
Bernhard Reutner-Fischer
c021cb08b5 - add support for seq -s <separator> 2008-11-12 13:22:24 +00:00
Bernhard Reutner-Fischer
2598f761bb - add seq -w support (Natanael Copa) 2008-11-12 12:59:56 +00:00
Denis Vlasenko
e9b9a19ad3 libbb: disable a second md5 implementation which managed to creep in :)
function                                             old     new   delta
sha512_end                                           239     237      -2
sha256_end                                           162     160      -2
sha1_end                                             191     189      -2
md5_end                                              168     166      -2
__md5__magic                                           4       -      -4
md5_crypt                                            627     621      -6
static.S                                              16       -     -16
__md5_Init                                            42       -     -42
static.P                                              64       -     -64
__md5_Final                                          131       -    -131
__md5_Update                                         153       -    -153
static.C                                             268      12    -256
__md5_Transform                                      293       -    -293
------------------------------------------------------------------------------
(add/remove: 0/7 grow/shrink: 0/6 up/down: 0/-973)           Total: -973 bytes
2008-11-11 01:38:04 +00:00
Denis Vlasenko
2211d5268c libbb: add optionl support for SHA256/512 encrypted passwords
function                                             old     new   delta
sha_crypt                                              -    2423   +2423
cryptpw_main                                         128     183     +55
to64                                                   -      29     +29
pw_encrypt                                           974    1000     +26
str_rounds                                             -      11     +11
login_main                                          1532    1541      +9
packed_usage                                       25215   25200     -15
__md5_to64                                            29       -     -29
------------------------------------------------------------------------------
(add/remove: 3/1 grow/shrink: 3/1 up/down: 2553/-44)         Total: 2509 bytes
2008-11-10 18:52:35 +00:00
Denis Vlasenko
56dceb9b77 sha256,sha512: new applets. +4.9kb
we will require sha256/512 code for new $5$ and $6$ style
 password hashes anyway, they are showing up already
 in people's /etc/passwd...
2008-11-10 13:32:50 +00:00
Denis Vlasenko
c028ec280a Typo fixes 2008-11-10 10:47:47 +00:00
Denis Vlasenko
dc70069a46 kbd_mode: support -C TTY option
function                                             old     new   delta
packed_usage                                       25334   25361     +27
kbd_mode_main                                        146     173     +27
2008-11-08 21:39:06 +00:00
Denis Vlasenko
b9d572a273 total overhaul of mail applets. again. Vladimir as usual. 2008-11-06 23:41:38 +00:00
Denis Vlasenko
f10bc3964f correction in comment 2008-11-06 23:28:42 +00:00
Denis Vlasenko
3854c5ddf4 runsvdir: alternative methon of supporting runsvdir-as-init. +66 bytes.
*: s/int/pid_t where appropriate
2008-11-06 22:39:57 +00:00
Denis Vlasenko
35a064b67f build system: tidying up CONFIG_xxx names (suggested by Rob) 2008-11-06 00:49:59 +00:00
Denis Vlasenko
202ac504e1 *: code shrink by adding a wrapper around very common tcsetattr(0, TCSANOW, xx) op
function                                             old     new   delta
tcsetattr_stdin_TCSANOW                                -      14     +14
set_sane_term                                        116     113      -3
top_main                                            1277    1273      -4
make_new_session                                     421     415      -6
rawmode                                              133     126      -7
reset_term                                            18      10      -8
die                                                   43      35      -8
cookmode                                              62      54      -8
vlock_main                                           425     415     -10
read_line_input                                     3165    3155     -10
bb_askpass                                           357     347     -10
fsck_minix_main                                     3079    3065     -14
getty_main                                          2375    2332     -43
------------------------------------------------------------------------------
(add/remove: 1/0 grow/shrink: 0/12 up/down: 14/-131)         Total: -117 bytes
2008-11-05 13:20:58 +00:00
Denis Vlasenko
9b0f6e1142 add comment, no code changes 2008-11-01 13:40:32 +00:00
Denis Vlasenko
1a9e9bdd93 gunzip: restore mtime. approx +80 bytes of code
rpm: make code more robust
lsmod: small code shrink
2008-11-01 12:54:56 +00:00
Denis Vlasenko
b9b344aa44 kill[all[5]]: accept -s SIG too. kill_main: +29 bytes
by Steve Bennett (steveb AT workware.net.au)
2008-10-31 00:30:48 +00:00
Denis Vlasenko
91f8f82bfb tftpd: be less cryptic in help text 2008-10-30 23:42:37 +00:00
Denis Vlasenko
de5f645dff ls: trim help text 2008-10-27 12:37:22 +00:00
Denis Vlasenko
c94fa5651a devmem: new applet 2008-10-26 11:08:14 +00:00
Denis Vlasenko
5f6aaf39cf less: reuse former vi's key reading code. Improve SIGWINCH handling.
function                                             old     new   delta
less_main                                           2056    2097     +41
getch_nowait                                         248     273     +25
read_key                                             310     321     +11
static.esccmds                                        61      69      +8
count_lines                                           72      74      +2
less_gets                                            166     142     -24
less_getch                                           172      43    -129
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 6/5 up/down: 91/-170)           Total: -79 bytes
   text    data     bss     dec     hex filename
2008-10-25 23:27:29 +00:00
Denis Vlasenko
0112ff5203 vi: move key reading routine out of vi into llbbb
function                                             old     new   delta
read_key                                               -     310    +310
....
static.esccmds                                       170      61    -109
readit                                               286      60    -226
------------------------------------------------------------------------------
(add/remove: 1/0 grow/shrink: 9/10 up/down: 349/-367)         Total: -18 bytes
2008-10-25 23:23:00 +00:00
Denis Vlasenko
2d5bd807c0 build system cleanup: rename FEATURE_AWK_MATH to FEATURE_AWK_LIBM;
disable parsing test applet.
2008-10-24 10:49:49 +00:00
Denis Vlasenko
b730474bda ash: fix NOEXEC mode - we were forgetting to pass environment!
env: promote to NOEXEC
hd: promote to NOEXEC, as hexdump is NOEXEC already
2008-10-20 08:15:51 +00:00
Denis Vlasenko
1e19afd38a blkid: new applet. We almost had everything needed for it already
function                                             old     new   delta
display_uuid_cache                                     -      89     +89
blkid_main                                             -       8      +8
applet_names                                        1871    1877      +6
applet_main                                         1140    1144      +4
applet_nameofs                                       570     572      +2
packed_usage                                       24737   24735      -2
------------------------------------------------------------------------------
(add/remove: 2/0 grow/shrink: 3/1 up/down: 109/-2)            Total: 107 bytes
2008-10-12 11:20:08 +00:00
Denis Vlasenko
cdd1f732bc zcip: code size optimizations, improved help text and comments
function                                             old     new   delta
packed_usage                                       24750   24787     +37
run                                                  658     655      -3
pick                                                  40      34      -6
arp                                                  186     177      -9
zcip_main                                           1402    1356     -46
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 1/4 up/down: 37/-64)            Total: -27 bytes
2008-10-10 11:28:39 +00:00
Bernhard Reutner-Fischer
578de8644c - route metric support (Natanael Copa)
Adds about 75b
2008-10-07 17:00:58 +00:00
Denis Vlasenko
2b2d977057 sendmail: update by Vladimir 2008-09-28 13:50:57 +00:00
Denis Vlasenko
bed22a01fb sendmail: compat update by Vladimir
function                                             old     new   delta
sendgetmail_main                                    1889    2091    +202
putchar_unlocked                                       -      43     +43
putchar                                                -      43     +43
packed_usage                                       24868   24910     +42
smtp_checkp                                          102     111      +9
uuencode                                             235     227      -8
------------------------------------------------------------------------------
(add/remove: 2/0 grow/shrink: 3/1 up/down: 339/-8)            Total: 331 bytes
2008-09-27 14:01:22 +00:00
Bernhard Reutner-Fischer
1a89133caf Markus Heidelberg writes:
* document --nicelevel in Config.in
* usage: --verbose is the fancy option, not --quiet
2008-09-26 15:14:56 +00:00
Bernhard Reutner-Fischer
48a6773b3a - add less -I to be able to search case-insensitively
+17b, but the helptext is quite elaborate, thus:
function                                             old     new   delta
.rodata                                           118995  119032     +37
packed_usage                                       24731   24767     +36
regex_process                                        284     300     +16
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 3/0 up/down: 89/0)               Total: 89 bytes
2008-09-26 14:10:17 +00:00
Bernhard Reutner-Fischer
fd3552dff9 - commentary typo fix 2008-09-26 11:23:22 +00:00
Denis Vlasenko
ee5dce3365 libpwdgrp: make it coexist with <pwd.h>, <grp.h> and <shadow.h>.
allows to get rid of hacks in libbb.h (extra declaration of setgroups -
 now it comes from grp.h as intended).
2008-09-26 10:35:55 +00:00
Denis Vlasenko
b46d5f9a93 fix usage text - s/USE_GETOPT_LONG/USE_FEATURE_xxxLONG_OPTIONS/
by Markus Heidelberg (markus.heidelberg AT web.de)
2008-09-25 21:06:24 +00:00
Bernhard Reutner-Fischer
6c4dadefb6 - update my name. No obj-code changes ;) 2008-09-25 12:13:34 +00:00
Denis Vlasenko
42cc6bab16 top: don't lie in help screen about "-d 1" being valid 2008-09-25 11:17:10 +00:00
Denis Vlasenko
17e7f04c8d top: optional SMP support by Vineet Gupta (vineetg76 AT gmail.com) 2008-09-25 10:48:06 +00:00
Denis Vlasenko
cac0f5b7e5 return setgroups() decl to libbb, it is needed if we use libpwdgrp. 2008-09-25 10:20:46 +00:00
Mike Frysinger
f6cad924b1 we dont provide setgroups() replacement, so dont provide the prototype either ... especially since it conflicts on some systems (like Darwin) 2008-09-25 00:41:49 +00:00
Denis Vlasenko
53f219ebbe setfont: support -m and -C, support -m TEXTUAL_MAP (by Vladimir)
build system: fixlet for echo applet config

function                                             old     new   delta
setfont_main                                         157     387    +230
ctoi                                                   -      75     +75
packed_usage                                       24921   24950     +29
2008-09-16 19:35:42 +00:00
Denis Vlasenko
ba1315d0fb modutils/*: rewrite by Timo Teras <timo.teras AT iki.fi>
- a lot faster (linear algorithmic complexity, smaller memory foot print)
- a lot smaller (the old code was overly complicated)
- loading of aliases is now module-init-tools compliant
- blacklisting is done correctly (-b option added)
- module argument quoting done right
- depmod now correctly generates modules.symbols and modules.alias

add/remove: 16/21 grow/shrink: 4/6 up/down: 6930/-9316 Total: -2386 bytes
   text    data     bss     dec     hex filename
 806039     592    6680  813311   c68ff busybox_old
 803498     592    6676  810766   c5f0e busybox_unstripped
2008-09-13 14:59:38 +00:00
Denis Vlasenko
4f3209b9d4 id: code shrink
function                                             old     new   delta
id_main                                              494     462     -32
2008-09-13 12:51:10 +00:00
Bernhard Reutner-Fischer
0ee1cb0084 - implement id -G (Tito Ragusa) 2008-09-12 09:58:11 +00:00
Denis Vlasenko
08ea11ab07 runsvd: shrink by Vladimir
*: use unified trivial signal handler

function                                             old     new   delta
record_signo                                           -      10     +10
process_stdin                                        433     443     +10
bbunpack                                             383     391      +8
wc_main                                              598     605      +7
conescape                                            293     296      +3
nmeter_main                                          670     672      +2
fallbackSort                                        1717    1719      +2
bb_got_signal                                          -       1      +1
microcom_main                                        713     712      -1
signalled                                              2       -      -2
pack_gzip                                           1661    1659      -2
evalvar                                             1376    1374      -2
compare_keys                                         737     735      -2
parse_command                                       1460    1456      -4
expand                                              1748    1744      -4
s_term                                                37      29      -8
s_hangup                                               8       -      -8
fgotsig                                               10       -     -10
find_pair                                            187     169     -18
signal_handler                                       190     170     -20
runsvdir_main                                       1701    1583    -118
------------------------------------------------------------------------------
(add/remove: 2/3 grow/shrink: 6/10 up/down: 43/-199)         Total: -156 bytes
2008-09-11 19:51:11 +00:00
Denis Vlasenko
8d89bed840 watchdog: add -T option
function                                             old     new   delta
 watchdog_main                                        159     219     +60
mdev: support match by major,minor. See bug 4714.
 +100 bytes.
2008-09-07 23:22:08 +00:00
Bernhard Reutner-Fischer
fd6b5ad137 - uncomment tc for now 2008-09-04 16:16:47 +00:00
Bernhard Reutner-Fischer
0901c51518 - add WIP stub for tc.
Printing worked at some point. Modify/Delete needs some refacturing.
2008-09-04 13:22:58 +00:00
Bernhard Reutner-Fischer
161931efa5 - mention that we ignore -v, -b, -c 2008-09-04 09:33:23 +00:00
Denis Vlasenko
d4b719878f kbd_mode: fix non-ASCII letters in comments
install: support -D
2008-09-03 21:54:46 +00:00
Bernhard Reutner-Fischer
d93179fd5b - halt's -w depends on FEATURE_WTMP (Vladimir Dronnikov) 2008-09-01 15:24:52 +00:00
Denis Vlasenko
d66aa3c701 df: add support for more options, add some coreutils 6.10 compat.
by Bernhard Reutner-Fischer

function                                             old     new   delta
df_main                                              664     795    +131
packed_usage                                       24812   24862     +50
make_human_readable_str                              213     262     +49
static.ignored_mounts                                  -       8      +8
static.unit_chars                                      -       7      +7
static.zero_and_units                                  6       -      -6
------------------------------------------------------------------------------
(add/remove: 2/1 grow/shrink: 3/0 up/down: 245/-6)            Total: 239 bytes
2008-08-28 22:42:52 +00:00
Bernhard Reutner-Fischer
99ecc46d93 - document rmdir args 2008-08-21 20:52:55 +00:00
Bernhard Reutner-Fischer
6375853cd8 - document rmmod -w and -f arguments 2008-08-21 20:18:55 +00:00
Denis Vlasenko
e82da4dfee fix xargs -e help text 2008-08-21 19:59:30 +00:00
Denis Vlasenko
99b4083647 findfs: make it use setuid-ness of busybox binary 2008-08-20 08:50:02 +00:00
Bernhard Reutner-Fischer
c77e843c09 - add new applet rdev (Grant Erickson)
- fixes and shrink (me)
2008-08-19 11:28:52 +00:00
Denis Vlasenko
d7cc2e601d showkey: new applet by Vladimir 2008-08-17 14:17:48 +00:00
Denis Vlasenko
c8d02aa959 setfont: new applet by Vladimir 2008-08-17 14:12:26 +00:00
Denis Vlasenko
69f4f9a6f4 optimize config_read() (by Timo Teras <timo.teras AT iki.fi>)
function                                             old     new   delta
bb_get_chunk_with_continuation                         -     176    +176
find_pair                                            169     187     +18
...
process_stdin                                        443     433     -10
config_read                                          549     456     -93
bb_get_chunk_from_file                               139       7    -132
------------------------------------------------------------------------------
(add/remove: 1/0 grow/shrink: 7/7 up/down: 215/-254)          Total: -39 bytes
2008-08-09 17:16:40 +00:00
Bernhard Reutner-Fischer
fb5902ca5c - support relatime / norelatime 2008-08-06 18:14:38 +00:00
Denis Vlasenko
2afd5ab62c *: use get_console_fd() as appropriate, and make it fail on open error -
get_console_fd_or_die().

function                                             old     new   delta
get_console_fd_or_die                                  -     163    +163
loadkmap_main                                        211     201     -10
loadfont_main                                        440     430     -10
dumpkmap_main                                        218     208     -10
kbd_mode_main                                        158     146     -12
setkeycodes_main                                     156     143     -13
get_console_fd                                       163       -    -163
------------------------------------------------------------------------------
(add/remove: 1/1 grow/shrink: 0/5 up/down: 163/-218)          Total: -55 bytes
2008-08-05 23:32:27 +00:00
Denis Vlasenko
e9ad84dfd4 *: refactor handling of archived files. "tar f file.tar.lzma" now works too.
function                                             old     new   delta
unpack_Z_stream                                        -    1229   +1229
open_zipped                                            -     176    +176
unpack_bz2_stream_prime                                -      60     +60
tar_main                                             642     677     +35
find_main                                            406     418     +12
sv_main                                             1222    1233     +11
decode_format_string                                 829     837      +8
cmp_main                                             641     649      +8
popstring                                            134     140      +6
filter_accept_list_reassign                          120     125      +5
parse_and_put_prompt                                 800     804      +4
passwd_main                                         1053    1049      -4
make_new_name_gunzip                                 119     114      -5
rpm_main                                            1688    1670     -18
prepare                                              302     283     -19
xmalloc_open_zipped_read_close                       135      61     -74
uncompress                                          1229       -   -1229
------------------------------------------------------------------------------
(add/remove: 3/1 grow/shrink: 8/5 up/down: 1554/-1349)        Total: 205 bytes
2008-08-05 13:10:34 +00:00
Bernhard Reutner-Fischer
9b44613202 - don't free user-supplied string (via -e)
- fix helptext

function                                             old     new   delta
chpasswd_main                                        300     319     +19
packed_usage                                       24352   24344      -8
.rodata                                           122227  122195     -32
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 1/2 up/down: 19/-40)            Total: -21 bytes
2008-08-05 09:56:56 +00:00
Denis Vlasenko
855ff6f503 modprobe: use buffering line reads (fgets) instead of reads().
libbb: remove reads()

function                                             old     new   delta
include_conf_file_act                                961     980     +19
localcmd                                             282     284      +2
already_loaded                                       155     151      -4
in_cksum                                              58      53      -5
modprobe_main                                       1630    1624      -6
reads                                                129       -    -129
------------------------------------------------------------------------------
(add/remove: 0/1 grow/shrink: 2/3 up/down: 21/-144)          Total: -123 bytes
2008-08-04 21:16:46 +00:00
Denis Vlasenko
27842288b3 libbb: make xrealloc_vector zero out the realloc'ed tail
function                                             old     new   delta
xrealloc_vector_helper                                51      76     +25
man_main                                             712     705      -7
act                                                  250     234     -16
create_list                                           91      70     -21
getopt_main                                          695     664     -31
load_dep_bb                                          281     248     -33
fileAction                                           744     709     -35
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 1/6 up/down: 25/-143)          Total: -118 bytes
2008-08-04 13:20:36 +00:00
Denis Vlasenko
7ce47e698e ssd: fix -K/-S mixup in help text 2008-08-03 19:23:30 +00:00
Denis Vlasenko
c45b53940a xargs: update help text 2008-08-03 19:20:25 +00:00
Denis Vlasenko
9ef1a5ddc1 makedevs: fix help text discrepancies 2008-08-01 02:15:51 +00:00
Denis Vlasenko
b357149867 chpst: large code shrink by Vladimir
function                                             old     new   delta
chpst_main                                          1058    1357    +299
euidgid                                               56       -     -56
suidgid                                               59       -     -59
slimit                                               208       -    -208
packed_usage                                       24638   24420    -218
edir                                                 375       -    -375
------------------------------------------------------------------------------
(add/remove: 0/4 grow/shrink: 1/1 up/down: 299/-916)         Total: -617 bytes
2008-07-30 21:23:26 +00:00
Denis Vlasenko
6e69e4237d netstat: optional -p support by L. Gabriel Somlo <somlo AT cmu.edu>
Without FEATURE_NETSTAT_PRG:
function                                             old     new   delta
recursive_action                                     416     425      +9
tcp_do_one                                           420     428      +8
udp_do_one                                           492     499      +7
raw_do_one                                           472     479      +7
expand                                              1697    1701      +4
netstat_main                                         489     492      +3
unix_do_one                                          486     488      +2
flags                                                  1       -      -1
qgravechar                                           109     106      -3
net_conn_line                                          4       -      -4
bbunpack                                             391     383      -8
------------------------------------------------------------------------------
(add/remove: 0/2 grow/shrink: 7/2 up/down: 40/-16)             Total: 24 bytes

With FEATURE_NETSTAT_PRG:
file_act                                               -     213    +213
dir_act                                                -     192    +192
netstat_main                                         489     601    +112
prg_cache_get                                          -      50     +50
tcp_do_one                                           420     462     +42
udp_do_one                                           492     533     +41
raw_do_one                                           472     513     +41
unix_do_one                                          486     519     +33
recursive_action                                     416     425      +9
expand                                              1697    1701      +4
flags                                                  1       -      -1
qgravechar                                           109     106      -3
net_conn_line                                          4       -      -4
bbunpack                                             391     383      -8
packed_usage                                       24586   24572     -14
------------------------------------------------------------------------------
(add/remove: 3/2 grow/shrink: 7/3 up/down: 737/-30)           Total: 707 bytes
2008-07-27 12:10:07 +00:00
Denis Vlasenko
084266ed52 fix several problems with config parser:
a bug where it underflows the string
 a bug where it never frees parser_t struct
make read_config() return 0 if parser is NULL,
 make config_close() accept and ignore NULL parser -
 eliminates many if() blocks
reverse the sense of parser bit flags - negative flags
 are harder to grok.
hexdump: revert the change to use config parser, it is BIGGER
 and also requires additional quirks in parser
*: explicitly use PARSER_NORMAL instead of 0

function                                             old     new   delta
login_main                                          1575    1596     +21
config_close                                          18      29     +11
bbunpack                                             383     391      +8
qgravechar                                           106     109      +3
rtnl_tab_initialize                                  121     117      -4
expand                                              1697    1693      -4
man_main                                             717     712      -5
nameif_main                                          674     668      -6
hexdump_main                                         597     591      -6
read_config                                          217     209      -8
dnsd_main                                           1478    1470      -8
sysctl_main                                          203     189     -14
config_open2                                          44      25     -19
make_device                                         1177    1141     -36
config_read                                          597     549     -48
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 4/11 up/down: 43/-158)         Total: -115 bytes
2008-07-26 23:08:31 +00:00
Denis Vlasenko
0f99d49ae6 *: conversion to config parser
function                                             old     new   delta
config_read                                          540     597     +57
config_open2                                          41      44      +3
rtnl_rtprot_initialize                                70      66      -4
rtnl_rttable_initialize                               78      73      -5
rtnl_rtscope_initialize                               88      83      -5
rtnl_rtrealm_initialize                               48      43      -5
rtnl_rtdsfield_initialize                             48      43      -5
process_module                                       566     560      -6
bbunpack                                             391     383      -8
rtnl_tab_initialize                                  279     121    -158
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 2/8 up/down: 60/-196)          Total: -136 bytes
2008-07-24 23:38:04 +00:00
Denis Vlasenko
49a5eba9ae s/othervise/otherwise/g 2008-07-23 08:41:08 +00:00
Denis Vlasenko
040e32f84c lpd: extend help text
function                                             old     new   delta
packed_usage                                       24466   24612    +146
2008-07-23 08:39:19 +00:00
Denis Vlasenko
0f293b96dc fix all cases of strcpy on overlapping strings. 2008-07-22 20:16:55 +00:00
Denis Vlasenko
5415c856ea libbb: [x]fopen_for_{read,write} introduced and used.
(by Valdimir)

function                                             old     new   delta
config_open2                                           -      41     +41
config_read                                          507     542     +35
find_pair                                            169     187     +18
fopen_for_write                                        -      14     +14
fopen_for_read                                         -      14     +14
find_main                                            406     418     +12
xfopen_for_write                                       -      10     +10
xfopen_for_read                                        -      10     +10
popstring                                            134     140      +6
parse_inittab                                        396     401      +5
next_token                                           923     928      +5
pack_gzip                                           1659    1661      +2
bb__parsespent                                       117     119      +2
fallbackSort                                        1719    1717      -2
evalvar                                             1376    1374      -2
qrealloc                                              36      33      -3
...
...
...
...
singlemount                                         4579    4569     -10
process_stdin                                        443     433     -10
patch_main                                          1111    1101     -10
ifupdown_main                                       2175    2165     -10
file_action_grep                                      90      80     -10
uuidcache_init                                       649     637     -12
hush_main                                            797     785     -12
read_config                                          230     217     -13
dpkg_main                                           3835    3820     -15
read_line_input                                     3134    3110     -24
sysctl_main                                          232     203     -29
config_open                                           40      10     -30
WARN_BAD_LINE                                         44       -     -44
login_main                                          1714    1575    -139
------------------------------------------------------------------------------
(add/remove: 5/1 grow/shrink: 8/74 up/down: 174/-737)        Total: -563 bytes
2008-07-21 23:05:26 +00:00
Bernhard Reutner-Fischer
d73cbd31a2 - first pass to unify/cleanup uid handling (-236b)
This needs further love, alot of love.. Tito?
2008-07-21 14:41:33 +00:00
Bernhard Reutner-Fischer
e1e5174942 - s/super.block/superblock/g; # for consistency; -1b 2008-07-21 13:33:22 +00:00
Denis Vlasenko
1101d1c980 telnet: shrink
telnetd: shrink, and fix issue file printing
test: better and shorter usage text

function                                             old     new   delta
putiac2                                               51      50      -1
putiac                                                24      20      -4
handlenetoutput                                       95      91      -4
telnet_main                                         1480    1475      -5
iacflush                                              37      32      -5
make_new_session                                     436     421     -15
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 0/6 up/down: 0/-34)             Total: -34 bytes
2008-07-21 09:22:28 +00:00
Denis Vlasenko
84c8daa11f help text: test --help doesnt print it (by design),
so do not account for it
2008-07-21 08:37:13 +00:00
Denis Vlasenko
dcb3fcb042 libbb: config_read() update 2008-07-19 22:57:00 +00:00
Denis Vlasenko
2e157ddf9e libbb: updated config_parse() from Vladimir
function                                             old     new   delta
config_read                                          385     460     +75
runsvdir_main                                       1701    1716     +15
readit                                               331     338      +7
passwd_main                                         1049    1053      +4
parse_command                                       1504    1507      +3
decode_format_string                                 822     824      +2
bb__parsespent                                       117     119      +2
udhcp_get_option                                     221     222      +1
changepath                                           196     194      -2
parse_inittab                                        400     396      -4
nameif_main                                          683     679      -4
make_device                                         1176    1172      -4
config_open                                           48      40      -8
expand_main                                          698     689      -9
readcmd                                             1012    1002     -10
config_free_data                                      37      21     -16
SynchronizeFile                                      683     643     -40
sleep_main                                           474     362    -112
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 8/10 up/down: 109/-209)        Total: -100 bytes
2008-07-19 09:27:19 +00:00
Denis Vlasenko
3b3ca113ed pidof/killall: allow find_pid_by_name to find running
processes started as scripts_with_name_longer_than_15_bytes.sh
 closes bug 4054 (and is generally neat)
2008-07-17 18:39:36 +00:00
Bernhard Reutner-Fischer
679212836a - fix segfault in nameif with mactab file
(by fixing and shrink config parser)

function                                             old     new   delta
config_free_data                                       -      37     +37
config_open                                           43      48      +5
pack_gzip                                           1658    1660      +2
nameif_main                                          527     525      -2
SynchronizeFile                                      629     623      -6
make_device                                         1184    1176      -8
config_close                                          31      18     -13
config_read                                          431     393     -38
------------------------------------------------------------------------------
(add/remove: 1/0 grow/shrink: 2/5 up/down: 44/-67)            Total: -23 bytes
2008-07-17 11:59:13 +00:00
Denis Vlasenko
c01340fe26 update of config file parser from Vladimir 2008-07-16 22:12:18 +00:00
Denis Vlasenko
55f7912dda libbb: get rid of statics in dump.c; code shrinks a lot too
function                                             old     new   delta
alloc_dumper                                           -      26     +26
hexdump_main                                         600     601      +1
static.done                                            1       -      -1
static.ateof                                           1       -      -1
bb_dump_vflag                                          1       -      -1
static.savp                                            4       -      -4
static.nextfs                                          4       -      -4
static.curp                                            4       -      -4
exitval                                                4       -      -4
endfu                                                  4       -      -4
bb_dump_length                                         4       -      -4
bb_dump_fshead                                         4       -      -4
bb_dump_blocksize                                      4       -      -4
_argv                                                  4       -      -4
bb_dump_add                                          365     358      -7
savaddress                                             8       -      -8
eaddress                                               8       -      -8
bb_dump_skip                                           8       -      -8
address                                                8       -      -8
bb_dump_dump                                        2748    2672     -76
next                                                 538     445     -93
------------------------------------------------------------------------------
(add/remove: 1/16 grow/shrink: 1/3 up/down: 27/-247)         Total: -220 bytes
   text	   data	    bss	    dec	    hex	filename
 789458	    607	   6764	 796829	  c289d	busybox_old
 789309	    601	   6696	 796606	  c27be	busybox_unstripped
2008-07-16 11:00:16 +00:00
Denis Vlasenko
bd9874db74 od,hexdump: fix bug where xrealloc may move pointer,
leaving other pointers dangling (bug 4104).
 + many style fixes in libbb/dump.c.
2008-07-16 07:22:14 +00:00
Denis Vlasenko
5e476bab9c libbb: document plans to speed up line-based input 2008-07-15 21:29:44 +00:00
Denis Vlasenko
e559e0a757 libbb: unified config parser (By Vladimir Dronnikov)
mdev: use it

function                                             old     new   delta
config_read                                            -     400    +400
config_open                                            -      43     +43
config_close                                           -       9      +9
qrealloc                                              33      36      +3
compare_keys                                         735     737      +2
xstrtoull_range_sfx                                  296     295      -1
qgravechar                                           109     106      -3
get_address                                          181     178      -3
next_token                                           928     923      -5
sv_main                                             1228    1222      -6
find_main                                            418     406     -12
next_field                                            32       -     -32
make_device                                         1269    1184     -85
------------------------------------------------------------------------------
(add/remove: 3/1 grow/shrink: 2/7 up/down: 457/-147)          Total: 310 bytes
2008-07-15 21:09:30 +00:00
Denis Vlasenko
2132e02213 libbb: experimental faster string reading routines. 2008-07-15 10:33:12 +00:00
Denis Vlasenko
adbb73bda7 sleep: if FANCY && DESKTOP, support fractional seconds, minutes,
hours and so on. It's coreutils compat. bloatcheck is atrocious :(

function                                             old     new   delta
sleep_main                                            71     362    +291
bb_strtod                                              -     127    +127
make_device                                         1269    1294     +25
getoptscmd                                           708     713      +5
switch_root_main                                     402     401      -1
display_speed                                         90      85      -5
show_entry                                           295     289      -6
parse_expr                                           841     833      -8
------------------------------------------------------------------------------
(add/remove: 1/0 grow/shrink: 3/4 up/down: 448/-20)           Total: 428 bytes
2008-07-12 17:05:14 +00:00
Denis Vlasenko
a46dd89e94 cpio: internalize archive_xread_all_eof. add a few paranoia checks
for corrupted cpio files.
modprobe-small: remove stray include
route: small code shrink

function                                             old     new   delta
get_header_cpio                                      958     980     +22
archive_xread_all_eof                                 33       -     -33
------------------------------------------------------------------------------
(add/remove: 0/1 grow/shrink: 1/0 up/down: 22/-33)            Total: -11 bytes
2008-07-12 09:20:44 +00:00
Denis Vlasenko
86090e2599 fix compile failures resulting from last few commits 2008-07-11 08:23:52 +00:00
Denis Vlasenko
0381d422d9 dpkg_deb: slight code shrink
ar: reuse existing ar unpacking code
get_header_tar: handle autodetection for tiny .tar.gz files too
unarchive.h: do not include CONFIGed out things

function                                             old     new   delta
get_header_tar                                      1521    1534     +13
dpkg_deb_main                                        400     380     -20
ar_main                                              260     196     -64
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 1/2 up/down: 13/-84)            Total: -71 bytes
2008-07-10 23:06:00 +00:00
Denis Vlasenko
b6052724ff open_transformer: do not return fd, it does not change
libbb: adopt zipped read from modprobe-small

function                                             old     new   delta
getoptscmd                                           708     713      +5
qgravechar                                           106     109      +3
huft_build                                          1165    1168      +3
tr_main                                              474     472      -2
open_transformer                                      91      89      -2
evalvar                                             1376    1374      -2
rpm_main                                            1691    1688      -3
qrealloc                                              36      33      -3
get_header_tar_lzma                                   55      52      -3
get_header_tar_gz                                    100      97      -3
get_header_tar_bz2                                    55      52      -3
get_header_tar_Z                                      89      86      -3
find_main                                            418     406     -12
prepare                                              302     283     -19
xmalloc_open_zipped_read_close                       161     135     -26
xmalloc_read                                         248     199     -49
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 3/13 up/down: 11/-130)         Total: -119 bytes
2008-07-10 17:43:01 +00:00
Denis Vlasenko
f62ab2d774 libbb: use improved xmalloc_read() from modprobe-small
who: fix compile breakage on some systems
modprobe-small: improve Config help text wording
2008-07-09 09:50:33 +00:00
Denis Vlasenko
deeed59de0 libbb: introduce and use xrealloc_vector
function                                             old     new   delta
xrealloc_vector_helper                                 -      51     +51
create_list                                           84      99     +15
getopt_main                                          690     695      +5
passwd_main                                         1049    1053      +4
get_cached                                            85      89      +4
msh_main                                            1377    1380      +3
add_match                                             42      41      -1
read_lines                                           720     718      -2
grave                                               1068    1066      -2
fill_match_lines                                     143     141      -2
add_to_dirlist                                        67      65      -2
add_input_file                                        49      47      -2
act                                                  252     250      -2
fsck_main                                           2252    2246      -6
man_main                                             765     757      -8
bb_internal_initgroups                               228     220      -8
cut_main                                            1052    1041     -11
add_edge_to_node                                      55      43     -12
dpkg_main                                           3851    3835     -16
ifupdown_main                                       2202    2178     -24
sort_main                                            838     812     -26
------------------------------------------------------------------------------
(add/remove: 1/0 grow/shrink: 5/15 up/down: 82/-124)          Total: -42 bytes
2008-07-08 05:14:36 +00:00
Denis Vlasenko
a60f84ebf0 *: rename ATTRIBUTE_XXX to just XXX. 2008-07-05 09:18:54 +00:00
Denis Vlasenko
671691cf21 modutils: optional modutils-small by Vladimir Dronnikov.
15kb smaller than standard one.
libbb/recursive_action.c: commented-out code for aborting the scan.
2008-07-04 10:25:44 +00:00
Denis Vlasenko
82604e9730 revert last two commits. vfork cannot be used in subroutine,
it trashes stack on return
2008-07-01 15:59:42 +00:00
Denis Vlasenko
58d60c3333 *: introduce and use xfork()
function                                             old     new   delta
xfork                                                  -      20     +20
msh_main                                            1377    1380      +3
mod_process                                          455     446      -9
forkexit_or_rexec                                     30      17     -13
expand_variables                                    1434    1421     -13
open_transformer                                      91      76     -15
------------------------------------------------------------------------------
(add/remove: 1/0 grow/shrink: 1/4 up/down: 23/-50)            Total: -27 bytes
2008-07-01 11:11:24 +00:00
Denis Vlasenko
3da5572bfa *: introduce and use xvfork()
function                                             old     new   delta
time_main                                           1052    1285    +233
crontab_main                                         623     856    +233
ifupdown_main                                       2202    2403    +201
xvfork                                                 -      20     +20
passwd_main                                         1049    1053      +4
grave                                               1068    1066      -2
script_main                                          935     921     -14
vfork_or_die                                          20       -     -20
vfork_compressor                                     206     175     -31
open_as_user                                         109       -    -109
popen2                                               218       -    -218
edit_file                                            910     690    -220
run_command                                          268       -    -268
------------------------------------------------------------------------------
(add/remove: 1/4 grow/shrink: 4/4 up/down: 691/-882)         Total: -191 bytes
2008-07-01 10:40:41 +00:00
Denis Vlasenko
7987a1844b ssd: do not stat -x EXECUTABLE, it is not needed anymore
ssd: use PATH
ssd: fix -a without -x case
ssd: fix help text
ssd: CLOSE_EXTRA_FDS in MMU case too
ssd: add testsuite
2008-07-01 10:00:46 +00:00
Denis Vlasenko
c94d3564c2 sendmail: from Vladimir:
Here comes the third part of compatibility patch for sendmail.
* Introduced new safe_getdomainname() -- will it be useful?
* Fixed SEGV if sender address is missed. Should snoop for sender address in mail headers?
* More compat: use HOSTNAME instead of HOST when no server is explicitly specified.
* crond: fixed mail recipient address.

function                                             old     new   delta
safe_getdomainname                                     -      56     +56
sendgetmail_main                                    1937    1946      +9
grep_file                                            846     850      +4
crond_main                                          1423    1425      +2
xstrtoull_range_sfx                                  295     296      +1
utoa_to_buf                                          110     108      -2
passwd_main                                         1053    1049      -4
sv_main                                             1234    1228      -6
parse_expr                                           841     833      -8
------------------------------------------------------------------------------
(add/remove: 1/0 grow/shrink: 4/4 up/down: 72/-20)             Total: 52 bytes
2008-06-30 13:30:21 +00:00
Denis Vlasenko
ce13b76002 libbb: shrink monotonic_XXX functions, introduce monotonic_ns
(unused for now)

function                                             old     new   delta
get_mono                                               -      31     +31
sv_main                                             1228    1234      +6
expand                                              1693    1697      +4
get_address                                          178     181      +3
utoa_to_buf                                          108     110      +2
builtin_exit                                          46      48      +2
qrealloc                                              36      33      -3
qgravechar                                           109     106      -3
ash_main                                            1383    1380      -3
grep_file                                            850     846      -4
popstring                                            140     134      -6
monotonic_us                                          85      60     -25
monotonic_sec                                         41      16     -25
------------------------------------------------------------------------------
(add/remove: 1/0 grow/shrink: 5/7 up/down: 48/-69)            Total: -21 bytes
2008-06-29 02:25:53 +00:00
Denis Vlasenko
6ea75e2f5d sendmail: another update from the maintainer
function                                             old     new   delta
sendgetmail_main                                    1894    1937     +43
crond_main                                          1416    1423      +7
packed_usage                                       24540   24470     -70
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 2/1 up/down: 50/-70)            Total: -20 bytes
2008-06-28 21:46:41 +00:00
Denis Vlasenko
a60936da06 libunarchive: stop using static data in archivers - archive_handle_t
can trivially provide space for that.
rpm: code shrink
tar: simplify autodetection of bz2/.gz


function                                             old     new   delta
static.not_first                                       1       -      -1
static.end                                             1       -      -1
bb_makedev                                            51      49      -2
static.saved_hardlinks_created                         4       -      -4
static.saved_hardlinks                                 4       -      -4
longname                                               4       -      -4
linkname                                               4       -      -4
hash_file                                            251     247      -4
get_header_tar                                      1528    1521      -7
rpm_main                                            1711    1697     -14
get_header_cpio                                      965     944     -21
------------------------------------------------------------------------------
(add/remove: 0/6 grow/shrink: 0/5 up/down: 0/-66)             Total: -66 bytes
   text    data     bss     dec     hex filename
 804926     611    6868  812405   c6575 busybox_old
 804878     611    6852  812341   c6535 busybox_unstripped
2008-06-28 05:04:09 +00:00
Denis Vlasenko
3dee8e2bac sendmail: update from maintainer 2008-06-27 21:24:08 +00:00
Denis Vlasenko
ac2b50ebea add stdcall to FAST_FUNC
text    data     bss     dec     hex filename
 804476     611    6868  811955   c63b3 busybox_old
 804373     611    6868  811852   c634c busybox_unstripped
2008-06-27 04:30:48 +00:00
Denis Vlasenko
42b8daf88a expand comment about FAST_FUNC 2008-06-27 03:55:18 +00:00
Denis Vlasenko
defc1ea340 *: introduce and use FAST_FUNC: regparm on i386, otherwise no-on
text    data     bss     dec     hex filename
 808035     611    6868  815514   c719a busybox_old
 804472     611    6868  811951   c63af busybox_unstripped
2008-06-27 02:52:20 +00:00
Denis Vlasenko
a80d0e4bf7 trim usage text 2008-06-22 20:14:00 +00:00
Denis Vlasenko
b4c5bf615e Specially for Bernhard Fischer introduce USE_BB_CRYPT
which selects between libc/custom crypt routines.
2008-06-15 18:35:34 +00:00
Denis Vlasenko
21765fa063 udhcpc: kill undocumented -W, it was a no-op.
fix option parsing in the case some CONFIG_x are off.
 disable -b on NOMMU, make backgrounding work correctly
 (if a bit differently from MMU case). Previously,
 it wasn't working at all.
 stop using global data for flags in main(), opt
 bitfield works as well.

function                                             old     new   delta
cryptpw_main                                         177     153     -24
packed_usage                                       24478   24452     -26
client_background                                     26       -     -26
udhcpc_main                                         2462    2372     -90
------------------------------------------------------------------------------
(add/remove: 0/1 grow/shrink: 0/3 up/down: 0/-166)           Total: -166 bytes
2008-06-13 20:44:05 +00:00
Denis Vlasenko
fdddab0c61 make pw_encrypt() return malloc'ed string.
text    data     bss     dec     hex filename
 759802     604    6684  767090   bb472 busybox_old
 759804     604    6676  767084   bb46c busybox_unstripped
2008-06-12 16:56:52 +00:00
Denis Vlasenko
4ea83bf562 uclibc insists on having 70k static buffer for crypt.
For bbox it's not acceptable. Roll our own des and md5 crypt
implementation. Against older uclibc:

   text    data     bss     dec     hex filename
 759945     604    6684  767233   bb501 busybox_old
 759766     604    6684  767054   bb44e busybox_unstripped

so, we still save on code size.
2008-06-12 16:55:59 +00:00
Denis Vlasenko
f2cccbce37 mktemp: make default tempfile template shorter;
make help text more understandable
2008-06-08 20:40:33 +00:00
Denis Vlasenko
53354ac47d libbb: introduce and use print_flags().
Mostly by Natanael Copa <natanael.copa AT gmail.com>

function                                             old     new   delta
print_e2flags                                          -     189    +189
print_flags_separated                                  -      86     +86
static.flag_labels                                     -      60     +60
static.dma_wmode_masks                                 -      32     +32
static.flag_masks                                      -      28     +28
static.arp_labels                                      -      16     +16
static.arp_masks                                       -      12     +12
ls_main                                              836     843      +7
...
popstring                                            140     134      -6
arp_show                                             740     708     -32
print_flags                                          189      25    -164
ipaddr_list_or_flush                                2396    2170    -226
process_dev                                         5306    4706    -600
------------------------------------------------------------------------------
(add/remove: 10/0 grow/shrink: 5/10 up/down: 458/-1043)      Total: -585 bytes
   text    data     bss     dec     hex filename
 810564     624    7060  818248   c7c48 busybox_old
 810002     624    7060  817686   c7a16 busybox_unstripped
2008-06-07 15:10:29 +00:00
Denis Vlasenko
7bdf0c82da klogd: make help text more understandable
klogd: by using a register instead of global variable, shrink code a bit

function                                             old     new   delta
klogd_main                                           372     362     -10
packed_usage                                       24504   24486     -18
   text    data     bss     dec     hex filename
 808464     642    7180  816286   c749e busybox_old
 808422     642    7180  816244   c7474 busybox_unstripped
2008-06-06 16:08:04 +00:00
Bernhard Reutner-Fischer
797c96d8ce - fix compilation on standard-conforming compilers 2008-06-06 10:31:39 +00:00
Denis Vlasenko
f592aa36f3 which: -a support (needed for bfin uclibc build script)
real support (with CONFIG_DESKTOP=y): 120+ bytes:
   text	   data	    bss	    dec	    hex	filename
 807958	    624	   7036	 815618	  c7202	busybox_old
 808085	    624	   7036	 815745	  c7281	busybox_unstripped

"fake" support (with CONFIG_DESKTOP unset): ~45 bytes:
   text	   data	    bss	    dec	    hex	filename
 797790	    611	   6996	 805397	  c4a15	busybox_old
 797834	    611	   6996	 805441	  c4a41	busybox_unstripped
2008-06-05 13:33:59 +00:00
Denis Vlasenko
c05b1684a0 mktemp: make argument optional (coreutil 6.12 compat)
function                                             old     new   delta
mktemp_main                                          157     174     +17
packed_usage                                       24508   24504      -4
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 1/1 up/down: 17/-4)              Total: 13 bytes
2008-06-05 12:06:00 +00:00
Mike Frysinger
1e93f3c585 change default rtcwake mode to match changed behavior in upstream util-linux 2008-06-04 10:33:33 +00:00
Denis Vlasenko
3b162ecdf6 networking/interface.c: fix indentation 2008-06-04 07:59:51 +00:00
Mike Frysinger
85571d8d01 make the help for rtcwake reflect the actual default behavior 2008-06-02 20:37:45 +00:00
Denis Vlasenko
cd2663f15e ash: optional printf builtin. +25 bytes if off, +35 if on.
by Cristian Ionescu-Idbohrn.
2008-06-01 22:36:39 +00:00
Bernhard Reutner-Fischer
17282292c2 - add strrchr 2008-05-28 14:19:27 +00:00
Bernhard Reutner-Fischer
55fb9da5b8 - remove duplicate helptext of dhcprelay and improve it 2008-05-27 12:42:39 +00:00
Denis Vlasenko
fc9e108032 udhcpc: shrink
udhcpc: guard against zero lease time

function                                             old     new   delta
timeout                                                4       -      -4
server_addr                                            4       -      -4
requested_ip                                           4       -      -4
perform_release                                      134     112     -22
udhcpc_main                                         2511    2485     -26
------------------------------------------------------------------------------
(add/remove: 0/3 grow/shrink: 0/2 up/down: 0/-60)             Total: -60 bytes
2008-05-26 17:32:35 +00:00
Bernhard Reutner-Fischer
55e547eb6f - add simple first-draft unoptimized depmod just to proove Vladimir Dronnikov wrong
text	   data	    bss	    dec	    hex	filename
    569	      0	      0	    569	    239	modutils/depmod.o
2008-05-26 12:01:49 +00:00
Denis Vlasenko
af6cca50af move setgroups definition to libbb.h so that it no longer inadvertently
get hidden attribute
2008-05-25 04:31:54 +00:00
Denis Vlasenko
8e2c9e1518 inotify: new applet by Vladimir Dronnikov <dronnikov AT gmail.com>
function                                             old     new   delta
inotifyd_main                                          -     453    +453
packed_usage                                       24246   24450    +204
inotify_add_watch                                      -      47     +47
inotify_init                                           -      29     +29
mask_names                                             -      13     +13
signal_handler                                       130     140     +10
applet_names                                        1859    1868      +9
applet_main                                         1132    1136      +4
applet_nameofs                                       566     568      +2
signalled                                              1       2      +1
2008-05-24 20:47:18 +00:00
Denis Vlasenko
b22a8059cb last: trim help text 2008-05-22 02:10:50 +00:00
Denis Vlasenko
869d3d318f last: optional alternative sysv-like implementation
(by Patricia Muscalu <patricia.muscalu AT axis.com>)

function                                             old     new   delta
last_main                                            448     917    +469
show_entry                                             -     319    +319
packed_usage                                       24216   24268     +52
------------------------------------------------------------------------------
(add/remove: 1/0 grow/shrink: 2/0 up/down: 840/0)             Total: 840 bytes
2008-05-22 02:07:58 +00:00
Bernhard Reutner-Fischer
ae4342ca3e - Rename getpty() to xgetpty() and adjust callers.
- Rewrite kbd_mode and setconsole
- Introduce and use console_make_active() and xopen_xwrite_close()
- honour buffer-reservation method as set by the user (dumpkmap, loadkmap)
- shrink rtcwake and some console-tools

  Saves about 270 Bytes
2008-05-19 08:18:50 +00:00
Denis Vlasenko
ee56e013cf swapon: optional -p PRIO support (by Francois Barel <frabar666 AT gmail.com>)
function                                             old     new   delta
swap_on_off_main                                     153     216     +63
packed_usage                                       24190   24214     +24
swap_enable_disable                                  127     131      +4
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 3/0 up/down: 91/0)               Total: 91 bytes
2008-05-18 23:05:34 +00:00
Denis Vlasenko
5599502a55 more -Wall warning fixes. -Wall is enabled now. 2008-05-18 22:28:26 +00:00
Denis Vlasenko
e125a683a7 start_stop_daemon: add -test, fix -x to not match by inode,
vastly improve hext text. (mostly by Roy Marples <roy AT marples.name>)

function                                             old     new   delta
packed_usage                                       24124   24190     +66
start_stop_daemon_main                               959     991     +32
start_stop_daemon_longopts                           149     156      +7
check                                               1632    1589     -43
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 3/1 up/down: 105/-43)            Total: 62 bytes
2008-05-18 21:17:52 +00:00
Bernhard Reutner-Fischer
f3b778a4dc - fix bug where we incorrectly rejected ifconfig eth0 hw ether $whatever
- add support for printing ipoib to ifconfig
2008-05-16 16:10:31 +00:00
Denis Vlasenko
6b06cb80be more of -Wall fixes from Cristian Ionescu-Idbohrn.
Some are fixing real bugs.

function                                             old     new   delta
syslogd_main                                         938     958     +20
get_signum                                           136     143      +7
obj_load                                             777     782      +5
recv_from_to                                         210     214      +4
get_next_block                                      1795    1799      +4
display_topmem_process_list                         1117    1121      +4
logread_main                                         484     487      +3
buffer_fill_and_print                                 73      76      +3
kill_main                                            687     689      +2
ll_remember_index                                    240     241      +1
do_stats                                             452     453      +1
if_readconf                                          166     165      -1
display_process_list                                1192    1191      -1
run_applet_and_exit                                  507     505      -2
print_signames                                        33      31      -2
parse_one_line                                      1092    1090      -2
find_out_spec                                         57      55      -2
add_ksymoops_symbols                                 421     419      -2
ash_main                                            1407    1402      -5
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 11/8 up/down: 54/-17)            Total: 37 bytes
2008-05-15 21:30:45 +00:00
Denis Vlasenko
98636eb08c Use intra-DSO calls when we build libbusybox. No-op for normal build.
This was Bernhard Fischer' idea.

   text    data     bss     dec     hex filename
 773549    7781    9740  791070   c121e busybox.t7/0_lib/libbusybox.so.1.11.0.svn_unstripped
 769683    7397    9740  786820   c0184 busybox.t9t/0_lib/libbusybox.so.1.11.0.svn_unstripped
2008-05-09 17:59:34 +00:00
Bernhard Reutner-Fischer
6253880450 - fix selinux stuff 2008-05-08 12:21:44 +00:00
Bernhard Reutner-Fischer
6e38d52120 - correct usage helptext of ifupdown 2008-05-08 10:40:34 +00:00
Denis Vlasenko
6bf05cf1ff httpd: fix several bugs triggering by realtive path in -h DIR.
function                                             old     new   delta
handle_incoming_and_exit                            2657    2659      +2
send_cgi_and_exit                                    869     862      -7
parse_conf                                          1647    1626     -21
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 1/2 up/down: 2/-28)             Total: -26 bytes
2008-05-07 12:18:48 +00:00
Denis Vlasenko
96b99b860c uniq: support -w. closes bug 3094.
function                                             old     new   delta
packed_usage                                       24136   24132      -4
uniq_main                                            399     384     -15
2008-05-03 07:21:27 +00:00
Denis Vlasenko
812870a2e7 remove stray semicolon 2008-04-30 13:56:32 +00:00
Denis Vlasenko
c0431ed455 cp: fix "cp -RL" to create regular files even if src is a symlink 2008-04-27 22:06:24 +00:00
Denis Vlasenko
4d89a8bd1d date: make it accept ISO date format. Fix help text.
make testsuite actually test something useful.

function                                             old     new   delta
date_main                                           1094    1149     +55
2008-04-25 02:14:07 +00:00
Denis Vlasenko
1f228985b2 whitespace fixes. no code changes 2008-04-22 00:16:29 +00:00
Denis Vlasenko
5bb2fc2dc1 tentative fix for ppc64 problems with ioctl.
Zero code size impact.
2008-04-21 03:23:59 +00:00
Denis Vlasenko
f3745ea489 libbb: introduce xmalloc_xopen_read_close and use where appropriate
instead of xmalloc_open_read_close.

function                                             old     new   delta
xmalloc_xopen_read_close                               -      34     +34
xmalloc_open_read_close                              163     171      +8
passwd_main                                         1070    1074      +4
rexecve                                              254     257      +3
handle_incoming_and_exit                            2657    2659      +2
parse_command                                       1509    1510      +1
buffer_fill_and_print                                 76      73      -3
evaltreenr                                           599     589     -10
evaltree                                             599     589     -10
------------------------------------------------------------------------------
(add/remove: 1/0 grow/shrink: 5/3 up/down: 52/-23)             Total: 29 bytes
2008-04-19 19:32:08 +00:00
Denis Vlasenko
e96dcb4dcf top: fix build failure 2008-04-17 18:04:38 +00:00
Denis Vlasenko
4f98e19382 make test, [ and [[ all NOFORK, for consistency.
Revamp handling of NOUSAGE applets.

function                                             old     new   delta
packed_usage                                       24122   24104     -18
2008-04-13 22:12:19 +00:00
Denis Vlasenko
ffa4499c9f man: new applet. ~600 bytes. 2008-04-13 08:20:00 +00:00
Denis Vlasenko
643dcf00e3 dd: update usage text 2008-04-07 21:11:23 +00:00
Denis Vlasenko
90c31b3d4b ping: add -w, -W support (James Simmons <jsimmons AT infradead.org>)
function                                             old     new   delta
print_stats_and_exit                                   -     282    +282
sendping_tail                                        151     231     +80
packed_usage                                       23976   24054     +78
ping_main                                            401     412     +11
arm_ioctl                                             13      20      +7
pingstats                                            259       -    -259
------------------------------------------------------------------------------
(add/remove: 1/1 grow/shrink: 4/0 up/down: 458/-259)          Total: 199 bytes
2008-04-07 00:46:29 +00:00
Denis Vlasenko
278a1c2264 brctl: optional support for "show" cmd (by L. Gabriel Somlo <somlo AT cmu.edu>)
function                                             old     new   delta
brctl_main                                           739    1186    +447
if_indextoname                                         -     104    +104
static.keywords                                      827     841     +14
static.ops                                             -       7      +7
packed_usage                                       23978   23976      -2
2008-04-06 07:17:02 +00:00
Denis Vlasenko
261f237024 cpio: optional support for writing cpio files in newc format.
by pascal.bellard AT ads-lu.com.

function                                             old     new   delta
cpio_main                                            247    1122    +875
cpio_pad4                                              -      58     +58
gnu_dev_major                                         66      99     +33
gnu_dev_minor                                         38      57     +19
packed_usage                                       23964   23978     +14
------------------------------------------------------------------------------
(add/remove: 1/0 grow/shrink: 4/0 up/down: 999/0)             Total: 999 bytes
2008-04-05 00:07:46 +00:00
Denis Vlasenko
2e4c3c4cc3 udhcpc: add -o "do not request options by default" switch
(by L. Gabriel Somlo <somlo AT cmu.edu>)

function                                             old     new   delta
udhcpc_main                                         2513    2554     +41
static.udhcpc_longopts                               226     247     +21
add_param_req_option                                 119     132     +13
packed_usage                                       23952   23964     +12
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 4/0 up/down: 87/0)               Total: 87 bytes
2008-04-02 13:04:19 +00:00
Denis Vlasenko
468aea2d88 shells: do not frocibly enable test, echo and kill _applets_,
just build relevant source and use xxx_main functions.
build system: add a special case when we have exactly one applet enabled
(makes "true", "false", "basename" REALLY tiny).
getopt32: do not use stdio.

function                                             old     new   delta
getopt32                                            1385    1412     +27
make_device                                         1187    1200     +13
basename_main                                        120     127      +7
tcpudpsvd_main                                      1922    1926      +4
testcmd                                                5       -      -5
echocmd                                                5       -      -5
fuser_main                                          1243    1231     -12
------------------------------------------------------------------------------
(add/remove: 0/2 grow/shrink: 4/1 up/down: 51/-22)             Total: 29 bytes
2008-04-01 14:47:57 +00:00
Denis Vlasenko
d943af058b libbb: preventive fix for SIGxxx >= 32 2008-03-30 15:56:38 +00:00