Denis Vlasenko
8195d20e36
sendmail: yet another maintainer's update
2008-02-27 09:39:04 +00:00
Denis Vlasenko
17db1a9ac1
sendmail: update from maintainer
2008-02-26 21:13:17 +00:00
Denis Vlasenko
be048f21e6
syslogd: optional support for dropping dups. closes bug 436.
2008-02-26 20:13:52 +00:00
Denis Vlasenko
06aed4316e
ifenslave: new applet. closes bug 115.
2008-02-26 18:25:24 +00:00
Denis Vlasenko
6f1713f216
*: intrduce and use safe_gethostname. By Tito <farmatito AT tiscali.it>
...
safe_gethostname - 48 +48
glob3 35 37 +2
timestamp_and_log 314 315 +1
udhcp_send_kernel_packet 234 231 -3
scan_tree 275 271 -4
passwd_main 1074 1070 -4
print_login_prompt 68 58 -10
obscure 392 377 -15
syslogd_main 882 866 -16
print_login_issue 516 478 -38
hostname_main 278 223 -55
parse_and_put_prompt 825 756 -69
------------------------------------------------------------------------------
(add/remove: 1/0 grow/shrink: 2/9 up/down: 51/-214) Total: -163 bytes
text data bss dec hex filename
798791 728 7484 807003 c505b busybox_old
798631 728 7484 806843 c4fbb busybox_unstripped
2008-02-25 23:23:58 +00:00
Denis Vlasenko
394eebed66
lpd: spool mode added by Vladimir
...
lpr: more robust error reporting
*: introduce and use xchroot
libbb: full_read/write now will report partial data counts prior to error
isdirectory.c: style fixes
lpd_main 249 486 +237
xchroot - 29 +29
get_response_or_say_and_die 110 139 +29
full_write 52 60 +8
full_read 55 63 +8
static.newline 1 - -1
switch_root_main 404 400 -4
chpst_main 1089 1079 -10
getopt32 1370 1359 -11
chroot_main 115 101 -14
------------------------------------------------------------------------------
(add/remove: 1/1 grow/shrink: 4/4 up/down: 311/-40) Total: 271 bytes
text data bss dec hex filename
798472 728 7484 806684 c4f1c busybox_old
798775 728 7484 806987 c504b busybox_unstripped
2008-02-25 20:30:24 +00:00
Denis Vlasenko
f99afb5dff
lpd: new applet by Vladimir Dronnikov <dronnikov AT gmail.com>
2008-02-24 23:32:36 +00:00
Denis Vlasenko
4f82bdb050
lpr,lpq: rework by dronnikov AT gmail.com
2008-02-24 18:44:20 +00:00
Denis Vlasenko
400d8bb45e
less,klogd,syslogd,nc,tcpudp: exit on signal by killing itself, not exit(1)
...
*: minor shrink
2008-02-24 13:36:01 +00:00
Denis Vlasenko
33196372be
less: update line input so that it doesn't interfere with
...
screen update. Makes "man bash", [enter], [/],
<enter search pattern>, [enter] more usable - manpage
draws as you enter the pattern! Yay!!
less: fix bug where backspace wasn't actually deleting chars
less: "examine file with empty name" doesn't abort anymore.
libbb: add "all fatal signals" mask.
getch_nowait - 207 +207
status_print - 105 +105
examine_file 64 87 +23
move_cursor - 16 +16
m_status_print 185 195 +10
less_main 1656 1663 +7
decode_format_string 790 795 +5
test_main 403 405 +2
process0_stdin 247 249 +2
passwd_main 1070 1072 +2
less_gets 196 178 -18
buffer_print 169 71 -98
less_getch 362 138 -224
------------------------------------------------------------------------------
(add/remove: 3/0 grow/shrink: 7/3 up/down: 379/-340) Total: 39 bytes
text data bss dec hex filename
798329 740 7484 806553 c4e99 busybox_old
798368 740 7484 806592 c4ec0 busybox_unstripped
2008-02-23 01:25:38 +00:00
Denis Vlasenko
68444b9f0c
lpr and lpq applets by Walter Harms.
...
text data bss dec hex filename
392 0 0 392 188 lpq.o
1378 0 0 1378 562 lpr.o
142 0 0 142 8e parse_prt.o
2008-02-22 22:24:48 +00:00
Denis Vlasenko
e376d454bb
libbb: introduce and use nonblock_safe_read(). Yay!
...
Our shells are immune from this nasty O_NONBLOCK now!
function old new delta
nonblock_safe_read - 78 +78
file_get 276 295 +19
generateMTFValues 428 435 +7
read_line_input 1776 1772 -4
preadbuffer 543 450 -93
------------------------------------------------------------------------------
(add/remove: 1/0 grow/shrink: 2/2 up/down: 104/-97) Total: 7 bytes
text data bss dec hex filename
615190 715 23924 639829 9c355 busybox_old
615168 715 23924 639807 9c33f busybox_unstripped
2008-02-20 22:23:24 +00:00
Denis Vlasenko
5233cd3800
chat: new applet by dronnikov AT gmail.com. With all options on:
...
function old new delta
chat_main - 1230 +1230
unescape - 135 +135
packed_usage 23802 23922 +120
signal_handler 123 131 +8
input_backward 123 128 +5
applet_names 1775 1780 +5
applet_main 1076 1080 +4
applet_nameofs 538 540 +2
exitcode - 1 +1
------------------------------------------------------------------------------
(add/remove: 3/0 grow/shrink: 6/0 up/down: 1510/0) Total: 1510 bytes
2008-02-18 23:24:46 +00:00
Denis Vlasenko
de7684a309
support for mount by label (not yet tested)
...
Also adds findfs applet. Closes bug 1143.
2008-02-18 21:08:49 +00:00
Denis Vlasenko
c9ca0a3274
mount: recognize "dirsync" (closes bug 835)
...
mount: sanitize environ if called by non-root
*: adjust for slightly different sanitize routine
2008-02-18 11:08:33 +00:00
Denis Vlasenko
cb448fe01b
libbb: introduce and use xrename and rename_or_warn.
2008-02-17 14:28:53 +00:00
Denis Vlasenko
b1d8e7db0f
mount: make -f work even without mtab support
...
(Cristian Ionescu-Idbohrn <cristian.ionescu-idbohrn at axis.com>)
2008-02-16 23:28:42 +00:00
Denis Vlasenko
25591c322c
libbb: introduce bb_signals and bb_signals_recursive,
...
which sets same handler for many signals. sig_catch is nuked
(bb_signals_recursive is more descriptive name).
*: use them as appropriate.
function old new delta
bb_signals_recursive - 95 +95
bb_signals - 52 +52
run_command 258 273 +15
svlogd_main 1368 1377 +9
runsv_main 1746 1752 +6
runsvdir_main 1643 1646 +3
UNSPEC_print 64 66 +2
time_main 1128 1127 -1
...
resize_main 246 210 -36
sig_catch 63 - -63
set_fatal_sighandler 85 14 -71
------------------------------------------------------------------------------
(add/remove: 2/1 grow/shrink: 5/24 up/down: 182/-548) Total: -366 bytes
2008-02-16 22:58:56 +00:00
Denis Vlasenko
3718832a15
*: more readable handling of pipe fds. No code changes.
2008-02-16 13:20:56 +00:00
Denis Vlasenko
284d0faed6
random s/short/int/
...
add_cmd 1189 1190 +1
xconnect_ftpdata 118 117 -1
data_align 86 84 -2
process_files 2101 2096 -5
forkexec 1345 1334 -11
2008-02-16 13:18:17 +00:00
Denis Vlasenko
069e347863
crontab: almost complete rewrite
...
crontab: make options consistent with other implementations
text data bss dec hex filename
2042 4 0 2046 7fe busybox.t1/miscutils/crontab.o
1331 0 0 1331 533 busybox.t2/miscutils/crontab.o
function old new delta
edit_file 733 956 +223
open_as_user - 171 +171
packed_usage 23652 23650 -2
CDir 8 4 -4
ChangeUser 139 - -139
crontab_main 1522 616 -906
------------------------------------------------------------------------------
(add/remove: 1/1 grow/shrink: 1/3 up/down: 394/-1051) Total: -657 bytes
2008-02-16 13:17:13 +00:00
Mike Frysinger
977bc6a137
we need to pass back the rtc device name that was actually used so that we can turn around and check its sysfs status
2008-02-15 07:19:03 +00:00
Mike Frysinger
6b160e490d
split some rtc funcs out of hwclock and into an rtc header/lib so that the new rtcwake applet as well as hwclock can utilize the same code
2008-02-15 02:27:19 +00:00
Mike Frysinger
be7d2a8ded
sendmail is lexically after selinux, so fix the order
2008-02-15 01:43:22 +00:00
Mike Frysinger
1e47c429bf
fix microcom usage
2008-02-15 01:34:14 +00:00
Denis Vlasenko
e00e5025ec
tar: real support for -p. +200 if selected.
...
By Natanael Copa <natanael.copa at gmail.com>
2008-02-14 20:37:54 +00:00
Denis Vlasenko
b2e578a1f2
umount: instead of non-standard -D, use -d with opposite meaning
...
(closes bug 1604)
umount: do not try to free loop device or erase mtab if remounted ro
umount: do not complain several times about the same mountpoint
function old new delta
umount_main 646 638 -8
packed_usage 23662 23652 -10
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 0/2 up/down: 0/-18) Total: -18 bytes
2008-02-14 12:00:21 +00:00
Denis Vlasenko
87cf2ee8ab
tar: move FNM_LEADING_DIR #define to tar.c - no other users.
...
Closes bug 1332.
2008-02-13 17:06:53 +00:00
Denis Vlasenko
9d96af2e83
mkswap: fix help text to not lie about supported options.
...
mkswap: use uint32, not int, to match kernel.
mkswap: optimization: use pre-zeroed buffer
2008-02-13 15:35:52 +00:00
Denis Vlasenko
05743d7949
hush: reinstate cmd
handling for NOMMU (with fat big warning).
...
hush: fix a case where none of pipe members could be started
because of fork failure
hush: rename functions: xxx_real -> xxx
hush: try to add a bit more of vfork-friendliness
hush: add rudimentary design docs
hush: add TODO (newly discovered bug with globbing)
2008-02-10 12:10:08 +00:00
Denis Vlasenko
d56e3ccf96
microcom: split -d (delay) option away from -t
2008-02-09 11:37:21 +00:00
Denis Vlasenko
761e1d1462
mktemp: don't advertise -q option
2008-02-09 06:29:32 +00:00
Denis Vlasenko
65581f3ed1
mktemp: support -p DIR (Timo Teras <timo.teras at iki.fi>)
...
packed_usage 23595 23660 +65
mktemp_main 139 157 +18
2008-02-09 06:26:53 +00:00
Denis Vlasenko
6d52c1ee24
sendmail: update from maintainer
2008-02-08 18:24:54 +00:00
Denis Vlasenko
97bd0e05cc
README: doccument the need of CONFIG_DESKTOP
...
od: fix help text to include -t
od: handle /proc files (which have filesize 0) correctly
od: fix comments to not lie about return value
od: "%u" is 1 byte less than "%zu"
cat: fix English
2008-02-08 15:41:01 +00:00
Bernhard Reutner-Fischer
afdad653ac
- add eject -s for SCSI- and USB-devices (Nico Erfurth)
2008-02-08 15:04:00 +00:00
Mike Frysinger
9412ec7555
some more fixes for cross-compiling on an OS X host: apple provides core types so dont redefine them, sys/statfs.h is not available, and only use some newer AF_* defines if they are actually available
2008-02-07 22:41:33 +00:00
Mike Frysinger
22876c797c
only include mntent.h according to HAVE_MNTENT_H and dont define this on OS X
2008-02-07 22:10:07 +00:00
Denis Vlasenko
d55fe3e595
udhcp: optional support for non-standard DHCP ports (+300 bytes when selected)
2008-02-04 13:12:16 +00:00
Denis Vlasenko
e8ef7ec7de
unzip: do not try to read entire compressed stream at once (it can be huge)
...
unzip: handle short reads correctly
2008-02-04 12:12:48 +00:00
Denis Vlasenko
80667e30fb
msh: fix Ctrl-C handling with line editing
2008-02-02 18:35:55 +00:00
Denis Vlasenko
a2980c6249
sendmail: fixes by Vladimir Dronnikov <dronnikov at gmail.com>
2008-02-02 17:54:35 +00:00
Bernhard Reutner-Fischer
8c69afd992
- be C99 friendly. Anonymous unions are a GNU extension. This change is
...
size-neutral WRT -std=gnu99 and fixes several compilation errors for strict
C99 mode.
2008-01-29 10:33:34 +00:00
Denis Vlasenko
73032ca04b
sendmail: new applet by dronnikov at gmail.com
2008-01-28 22:47:03 +00:00
Denis Vlasenko
847fa779af
*: tidy up usage of char **environ
2008-01-28 22:45:43 +00:00
Denis Vlasenko
1d290d1e24
halt: update help text
2008-01-24 02:27:30 +00:00
Denis Vlasenko
9e58921e7e
comment fix
2008-01-24 01:33:42 +00:00
Bernhard Reutner-Fischer
52432f2b06
- correct helptext of stat (Cristian Ionescu-Idbohrn)
2008-01-17 11:05:09 +00:00
Bernhard Reutner-Fischer
2b11fb483e
- implement brctl setpathcost, setportprio, setbridgeprio, stp
...
text data bss dec hex filename
907 20 0 927 39f networking/brctl.o
2008-01-14 16:10:11 +00:00
Bernhard Reutner-Fischer
1aac3ab49f
- shrink a bit and implement time related fancy features. Improve help texts.
...
text data bss dec hex filename
253 20 0 273 111 networking/brctl.o.bare
613 20 0 633 279 networking/brctl.o.fancy-time
2008-01-13 18:43:50 +00:00
Bernhard Reutner-Fischer
78e1d58d3a
- fix commentary typo
2008-01-13 17:52:53 +00:00
Bernhard Reutner-Fischer
d27d925a6d
- new applet brctl
...
text data bss dec hex filename
289 20 0 309 135 networking/brctl.o
335 23 0 358 166 networking/brctl-verbose-ops.o
2008-01-13 15:23:27 +00:00
Denis Vlasenko
d2c450ce81
hush: report [v]fork failures
...
hush: more correct handling of piping
config: add CONFIG_NOMMU
2008-01-08 20:32:12 +00:00
Denis Vlasenko
bcd5fc12ec
tac: new applet. ~240 bytes.
...
Copyright (C) 2003 Yang Xiaopeng <yxp at hanwang.com.cn>
Copyright (C) 2007 Natanael Copa <natanael.copa@gmail.com>
Copyright (C) 2007 Tito Ragusa <farmatito@tiscali.it>
2008-01-06 06:27:17 +00:00
Denis Vlasenko
56ea65ca5f
ps: fix overflow in USER and VSZ columns
...
function old new delta
smart_ulltoa4 - 280 +280
smart_ulltoa5 283 408 +125
ulltoa6_and_space - 25 +25
scale 28 38 +10
bbunpack 358 366 +8
ps_main 259 261 +2
glob3 35 37 +2
fill_bounds 172 174 +2
process_stdin 456 446 -10
smart_ulltoa6 406 - -406
------------------------------------------------------------------------------
(add/remove: 2/1 grow/shrink: 6/1 up/down: 454/-416) Total: 38 bytes
2008-01-06 03:26:53 +00:00
Denis Vlasenko
5fee2e1a79
ps: add conditional support for -o [e]time
2008-01-05 03:26:41 +00:00
Denis Vlasenko
fb0eba706c
libbb: introduce and use safe_waitpid (loops in EINTR)
...
*: use more approproate (shorter) versions of wait()
function old new delta
safe_waitpid - 48 +48
wait_any_nohang - 17 +17
send_tree 365 369 +4
processorstop 432 435 +3
text_yank 110 108 -2
make_human_readable_str 202 200 -2
crond_main 1368 1366 -2
handle_sigchld 49 43 -6
reapchild 166 159 -7
custom 260 250 -10
checkscript 191 177 -14
wait_nohang 17 - -17
wait_pid 43 - -43
------------------------------------------------------------------------------
(add/remove: 2/2 grow/shrink: 2/7 up/down: 72/-103) Total: -31 bytes
2008-01-02 19:55:04 +00:00
Denis Vlasenko
d3c042fc60
libbb: introduce fputc_printable (from ed)
...
netstat: print control chars as ^C etc
vi: style fixlet
function old new delta
fputc_printable - 100 +100
unix_do_one 451 487 +36
printLines 258 190 -68
------------------------------------------------------------------------------
(add/remove: 1/0 grow/shrink: 1/1 up/down: 136/-68) Total: 68 bytes
2007-12-30 01:59:53 +00:00
Denis Vlasenko
abee3d0e0d
Fix xmalloc_fgets_str so that it really does NOT strip terminator.
...
Add xmalloc_fgetline_str which does strip terminator,
and use it in dpkg instead of xmalloc_fgets_str.
netstat: use xmalloc_fgets_str - allows to eat strings with NULs
(this fixes bug with some weird /proc/net/unix input)
function old new delta
xmalloc_fgets_internal - 191 +191
xmalloc_fgetline_str - 18 +18
do_info 116 120 +4
unix_do_one 451 447 -4
tcp_do_one 423 419 -4
send_tree 369 365 -4
xmalloc_fgets_str 178 15 -163
------------------------------------------------------------------------------
(add/remove: 2/0 grow/shrink: 1/4 up/down: 213/-175) Total: 38 bytes
text data bss dec hex filename
778445 832 7344 786621 c00bd busybox_old
778483 832 7344 786659 c00e3 busybox_unstripped
2007-12-26 20:44:45 +00:00
Denis Vlasenko
191836845e
udhcpc: support for -O <option>.
...
Two important notes:
* nissrv and nisdomain are not requested by default anymore!
* inconsistency between "XXXsvr" and "XXsrv" in option names resolved,
all are "XXXsrv" now.
function old new delta
udhcpc_main 2494 2600 +106
packed_usage 23023 23067 +44
add_requests 91 119 +28
static.udhcpc_longopts 209 226 +17
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 4/0 up/down: 195/0) Total: 195 bytes
2007-12-10 07:03:38 +00:00
Denis Vlasenko
75aa615bef
find: add -iname support (Alexander Griesser <alexander.griesser@lkh-vil.or.at>)
2007-12-09 10:07:39 +00:00
Denis Vlasenko
6672c8e480
test: stop using lots of bss.
...
function old new delta
test_main 425 456 +31
t_lex 69 73 +4
syntax 100 104 +4
ptr_to_statics 8 12 +4
t_wp_op 4 - -4
t_wp 4 - -4
ngroups 4 - -4
group_array 4 - -4
binop 590 585 -5
oexpr 104 97 -7
aexpr 101 94 -7
nexpr 831 820 -11
leaving 156 - -156
------------------------------------------------------------------------------
(add/remove: 0/5 grow/shrink: 4/4 up/down: 43/-202) Total: -159 bytes
text data bss dec hex filename
775098 929 9084 785111 bfad7 busybox_old
775107 933 8908 784948 bfa34 busybox_unstripped
2007-11-30 07:29:05 +00:00
Denis Vlasenko
64309f8669
sysctl: add -e: supress warnings about invalid key (Jeremy Kerr <jk@ozlabs.org>)
...
code shrink:
text data bss dec hex filename
775565 929 9100 785594 bfcba busybox_old
775296 929 9100 785325 bfbad busybox_unstripped
2007-11-29 06:40:28 +00:00
Denis Vlasenko
745cd17926
Further optimize applet tables; prettify build output
...
text data bss dec hex filename
775923 929 9100 785952 bfe20 busybox_old
775565 929 9100 785594 bfcba busybox_unstripped
2007-11-29 03:31:20 +00:00
Denis Vlasenko
1aa7e477b1
reorganize applet table. Eliminates pointers to names.
...
Should be a big win for libbusybox. busybox wins too:
text data bss dec hex filename
776524 929 9100 786553 c0079 busybox_old
775903 929 9100 785932 bfe0c busybox_unstripped
2007-11-28 06:49:03 +00:00
Denis Vlasenko
7c9d533a85
cttyhack should be in /bin, not /usr/bin
2007-11-25 07:58:42 +00:00
Denis Vlasenko
fe5e23bf75
remove echo_main -> bb_echo indirection
2007-11-24 02:23:51 +00:00
Denis Vlasenko
96702ca945
kill lash. "lash" builtin still exists, but it runs hush.
2007-11-23 23:28:55 +00:00
Denis Vlasenko
f23c3f95e8
arping: fix help text (-i -> -I), and shorten it a bit
2007-11-23 09:27:05 +00:00
Denis Vlasenko
68af8e7a08
udhcpc: remove -W option, -A can be reused for that
...
help texts: trimmed a bit
static.udhcpc_longopts 227 209 -18
udhcpc_main 2633 2590 -43
packed_usage 22927 22871 -56
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 0/3 up/down: 0/-117) Total: -117 bytes
2007-11-22 21:41:14 +00:00
Denis Vlasenko
7d75a96b15
ash: fix bug where redirection of closed fd was leaving it open afterwards.
...
redirect 983 1024 +41
bb_echo 276 301 +25
popredir 118 132 +14
evalcommand 1163 1176 +13
bbunpack 358 366 +8
echocmd 13 5 -8
echo_main 13 5 -8
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 5/2 up/down: 101/-16) Total: 85 bytes
text data bss dec hex filename
774999 962 9236 785197 bfb2d busybox_old
775084 962 9236 785282 bfb82 busybox_unstripped
2007-11-22 08:16:57 +00:00
Denis Vlasenko
705eaf8b40
sestatus: new SELinux applet (KaiGai Kohei <kaigai@ak.jp.nec.com>)
2007-11-22 01:10:41 +00:00
Denis Vlasenko
223bc97f61
udhcpc: an option to perform ARP check (Jonas Danielsson <jonas.danielsson@axis.com>)
...
configurable, ~+300 bytes when on.
2007-11-22 00:58:49 +00:00
Denis Vlasenko
ed6a49c657
ip: stop propagating argc; optimize ip_parse_common_args
...
function old new delta
find_pair 167 187 +20
static.families - 17 +17
die_must_be_on_off - 11 +11
...
on_off 33 22 -11
do_ipaddr 103 90 -13
do_iptunnel 1001 986 -15
iproute_list_or_flush 1237 1217 -20
static.ip_common_commands 43 22 -21
do_iproute 2217 2193 -24
parse_args 1444 1414 -30
ip_do 47 16 -31
do_iprule 994 963 -31
ip_main 153 113 -40
ipaddr_modify 1357 1305 -52
ipaddr_list_or_flush 2543 2490 -53
ip_parse_common_args 294 159 -135
------------------------------------------------------------------------------
(add/remove: 4/1 grow/shrink: 4/24 up/down: 85/-563) Total: -478 bytes
text data bss dec hex filename
775561 966 9236 785763 bfd63 busybox_old
775073 962 9236 785271 bfb77 busybox_unstripped
2007-11-18 22:56:25 +00:00
Denis Vlasenko
fbe5f39f0f
hexdump: add hd alias, add -R option
2007-11-18 05:36:50 +00:00
Denis Vlasenko
7e3a5f58bc
dmesg,klogd: make code more readable
...
libbb: explain why we declare klogctl
libbb: move defs around so that order makes more sense
2007-11-16 20:18:54 +00:00
Denis Vlasenko
01cd9570c7
who: add -a (by Tito)
2007-11-16 05:24:43 +00:00
Denis Vlasenko
f430cdbf2e
df: add -i (conditional on CONFIG)
...
uasge: trim a bit
2007-11-15 07:02:55 +00:00
Denis Vlasenko
059c91711f
open_transformer: do not duplicate "<program> -cf -"
...
text data bss dec hex filename
677858 738 7236 685832 a7708 busybox_old
677804 738 7236 685778 a76d2 busybox_unstripped
2007-11-12 02:13:12 +00:00
Paul Fox
599bbfbd9b
xmalloc_follow_symlinks() -- fix ELOOP issue with absolute paths,
...
return full path in cases where path doesn't resolve to a link.
change name to better differentiate from xmalloc_readlink().
2007-11-08 20:00:36 +00:00
Paul Fox
459a2ba1ef
new xmalloc_readlink_follow() routine to fully expand trailing symlinks
...
to get to a "real" file (or directory).
2007-11-08 01:11:41 +00:00
Paul Fox
49cce2b838
add "-A N" / "--tryagain=N" option to client, to allow altering the
...
default 60 second wait after failure to get a lease.
2007-11-07 16:01:28 +00:00
Denis Vlasenko
5281630229
login: clear dangerous environment variables if started by non-root
2007-11-06 05:26:51 +00:00
Denis Vlasenko
bfc3d82256
ifconfig: code shrink
...
adjtimex: code shrink
libbb: move nth_string function into libbb
hdparm: nth_string was here
text data bss dec hex filename
730013 10334 12032 752379 b7afb busybox_old
730093 10134 12032 752259 b7a83 busybox_unstripped
2007-11-04 04:10:17 +00:00
Denis Vlasenko
15ca51e3e2
appletlib.c: make it actally follow _BB_SUID_ALWAYS rules
...
adduser: implement -S and code shrink / fix uid selection
*: sanitize getspnam_r use
text data bss dec hex filename
777042 974 9676 787692 c04ec busybox_old
776883 974 9676 787533 c044d busybox_unstripped
2007-10-29 19:25:45 +00:00
Denis Vlasenko
99014e8965
more fixes for help text wrt long options
2007-10-20 14:54:58 +00:00
Denis Vlasenko
2edbc2ab85
ping: fix breakage from -I fix
...
passwd: SELinux support by KaiGai Kohei <kaigai@ak.jp.nec.com>
2007-10-20 02:00:49 +00:00
Denis Vlasenko
aa7a888e42
kbd_mode: new applet by Loïc Grenié <loic.grenie@gmail.com>
...
kbd_mode_main - 189 +189
packed_usage 22745 22833 +88
applets 3132 3144 +12
static.opts 7 12 +5
------------------------------------------------------------------------------
(add/remove: 1/0 grow/shrink: 3/0 up/down: 294/0) Total: 294 bytes
text data bss dec hex filename
777210 1000 9532 787742 c051e busybox_old
777575 1000 9532 788107 c068b busybox_unstripped
2007-10-20 00:17:34 +00:00
Denis Vlasenko
f74194e942
xatonum.h: add comment
...
lineedit: fix typo in comment
httpd: support for proxying connection to other http server
(by Alex Landau <landau_alex@yahoo.com>)
2007-10-18 12:54:39 +00:00
Denis Vlasenko
0363078437
more of usage text fixes wrt long options
2007-10-18 11:11:12 +00:00
Denis Vlasenko
73e5ed2206
exclude --longopts from usage texts if those are disabled
2007-10-18 10:52:36 +00:00
Denis Vlasenko
2450c450ab
telnetd: at Alexander Kriegisch <Alexander@kriegisch.name> insistence
...
add an option to close sessions as soon as child exits.
Maybe it should be a CONFIG option. OTOH, maybe it should be always on,
as it mimics, say, getty's behaviour.
function old new delta
handle_sigchld - 49 +49
telnetd_main 1312 1355 +43
.rodata 123429 123466 +37
packed_usage 22770 22806 +36
make_new_session 525 532 +7
------------------------------------------------------------------------------
(add/remove: 1/0 grow/shrink: 4/0 up/down: 172/0) Total: 172 bytes
text data bss dec hex filename
676285 2538 12104 690927 a8aef busybox_old
676421 2538 12104 691063 a8b77 busybox_unstripped
2007-10-15 22:09:15 +00:00
Denis Vlasenko
d898b8600c
bzip2: update help text
2007-10-14 07:57:26 +00:00
Denis Vlasenko
be039374f3
setsebool: new applet (Yuichi Nakamura <ynakam@hitachisoft.jp>)
2007-10-14 04:48:44 +00:00
Denis Vlasenko
77f1ec1b9b
bzip2: port bzip2 1.0.4 to busybox. note: bzip2 code resides
...
in separate directory (archival/bz/*)
and is covered by BSD-style license.
code size: 13k
2007-10-13 03:36:03 +00:00
Denis Vlasenko
f9566d8c29
trim too verbose help texts
2007-10-11 10:07:24 +00:00
Denis Vlasenko
15cb4a4272
fix a problem with two different applet_name's
2007-10-11 10:06:26 +00:00
Denis Vlasenko
9b49a5ed85
add -fvisibility=hidden to CC flags, mark XXX_main functions
...
EXTERNALLY_VISIBLE. 5% size reduction of libbusybox.so
2007-10-11 10:05:36 +00:00
Denis Vlasenko
724d196c75
Move applets/applet.c into libbb, allows to get rid of --whole-archive
...
(smaller code). Tested in static and shared mode.
2007-10-10 14:41:07 +00:00
Denis Vlasenko
82d38dab91
get rid of global "struct bb_applet *current_applet"
2007-10-10 14:38:47 +00:00
Denis Vlasenko
88ce2748e4
typo fix in help text
2007-10-09 18:08:04 +00:00
Denis Vlasenko
642a52d65e
make --help work for "individual applets" too.
2007-10-07 21:00:41 +00:00
Denis Vlasenko
d62fd84d4b
libbusybox: move (possibly compressed) help stuff into libbusybox.
...
Makes individual binaries much smaller.
2007-10-07 20:46:34 +00:00
Denis Vlasenko
7930bcf736
trim too verbose help messages
2007-10-07 19:13:55 +00:00
Denis Vlasenko
f545be083d
reviving libbusybox, adding CONFIG_INDIVIDUAL part 4
2007-10-07 17:06:26 +00:00
Denis Vlasenko
5dd8a03665
gunzip: support concatenated gz files.
...
text data bss dec hex filename
770988 1029 9552 781569 bed01 busybox.t0/busybox
771105 1029 9552 781686 bed76 busybox.t3/busybox
2007-10-05 15:26:08 +00:00
Denis Vlasenko
0c97c9d437
'simple' error message functions by Loic Grenie <loic.grenie@gmail.com>.
...
263 bytes saved.
2007-10-01 11:58:38 +00:00
Denis Vlasenko
96e1b38586
introduce and use close_on_exec_on(fd). -50 bytes.
2007-09-30 23:50:48 +00:00
Denis Vlasenko
a4f4de9b7e
print_signames_and_exit -> print_signames (because of "ash calls kill_main")
2007-09-30 16:32:01 +00:00
Denis Vlasenko
72e1c89d97
pgrep,pkill: new applets by Loic Grenie <loic.grenie@gmail.com>
2007-09-29 22:26:01 +00:00
Denis Vlasenko
7c654ae9df
remove stray '/*' within comment
2007-09-27 10:26:59 +00:00
Denis Vlasenko
4daad9004d
introduce bb_putchar(). saves ~1800 on uclibc (less on glibc).
2007-09-27 10:20:47 +00:00
Denis Vlasenko
5d61e71c3a
introduce safe_poll (fixes a problem in top)
...
function old new delta
safe_poll - 77 +77
svlogd_main 1470 1466 -4
zcip_main 1530 1524 -6
forkexec 1345 1338 -7
decode_format_string 795 788 -7
collect_blk 474 467 -7
buffer_pread 540 532 -8
tftp 1182 1172 -10
microcom_main 763 749 -14
arpping 441 424 -17
------------------------------------------------------------------------------
(add/remove: 1/0 grow/shrink: 0/9 up/down: 77/-80) Total: -3 bytes
text data bss dec hex filename
770162 1034 10404 781600 bed20 busybox_old
770158 1034 10404 781596 bed1c busybox_unstripped
2007-09-27 10:09:59 +00:00
Denis Vlasenko
b042bd9514
load_policy: update (Yuichi Nakamura <ynakam@hitachisoft.jp>)
2007-09-26 18:01:32 +00:00
Denis Vlasenko
7ae209c019
losetup: support -f (Loic Grenie <loic.grenie@gmail.com>)
...
function old new delta
losetup_main 238 278 +40
packed_usage 23021 23027 +6
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 2/0 up/down: 46/0) Total: 46 bytes
2007-09-26 17:54:18 +00:00
Denis Vlasenko
6a5377ac14
documentation bits in comments, no code changes
2007-09-25 18:35:28 +00:00
Denis Vlasenko
a545726d2b
insmod: fix help text to not show options if only 2.6 was selected
2007-09-24 20:14:32 +00:00
Denis Vlasenko
818322b9b1
*: kill bb_get_last_path_component, replace with two functions
...
(one which strips trailing slash and one which does not)
wget: straighten out as a result of above change
text data bss dec hex filename
5056 1 0 5057 13c1 busybox.t4/networking/wget.o
5022 0 0 5022 139e busybox.t5/networking/wget.o
2007-09-24 18:27:04 +00:00
Denis Vlasenko
efd3f38f8c
microcom: new applet by Vladimir Dronnikov <dronnikov@gmail.ru>
2007-09-21 13:43:28 +00:00
Denis Vlasenko
a2f61012b6
setup_environment: code shrink
...
run_shell: mark as NORETURN
setup_environment, run_shell: add usage comments
login: add FIXME :(
function old new delta
UNSPEC_print 64 66 +2
sulogin_main 509 506 -3
mkfs_minix_main 3070 3067 -3
login_main 1615 1612 -3
su_main 461 448 -13
setup_environment 261 206 -55
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 1/5 up/down: 2/-77) Total: -75 bytes
text data bss dec hex filename
772578 1051 10724 784353 bf7e1 busybox_old
772502 1051 10724 784277 bf795 busybox_unstripped
2007-09-10 13:15:28 +00:00
Denis Vlasenko
4c1d88daff
top: get rid of on-stack variable buffers, use permanent one.
...
code shrank with and without TOPMEM:
top_main 828 844 +16
display_process_list 1525 1473 -52
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 1/1 up/down: 16/-52) Total: -36 bytes
top_main 1150 1171 +21
display_topmem_process_list 1150 1167 +17
display_process_list 1525 1473 -52
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 2/1 up/down: 38/-52) Total: -14 bytes
2007-09-08 17:34:05 +00:00
Denis Vlasenko
ff6e8e2974
top: TOPMEM feature - 's(how sizes)' command. +2.5k when enabled,
...
+80 bytes when disabled (mainly because of text wrapping fixes
in display_process_list).
2007-09-08 16:51:19 +00:00
Paul Fox
9382b3809b
overload the existing '-q' flag so that if '-l' and '-q' are used
...
together, a "short form" listing (just pathnames) is generated.
change a few flag variables to "smallint" as well.
2007-09-07 20:28:25 +00:00
Denis Vlasenko
cef23e0d8b
usage: trim a bit
...
function old new delta
packed_usage 23113 23011 -102
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 0/1 up/down: 0/-102) Total: -102 bytes
text data bss dec hex filename
770610 1051 10764 782425 bf059 busybox_old
770508 1051 10764 782323 beff3 busybox_unstripped
2007-09-05 15:45:51 +00:00
Denis Vlasenko
3638cc4462
watchdog: allow millisecond spec (-t 250ms)
...
function old new delta
packed_usage 23069 23113 +44
static.suffixes - 24 +24
watchdog_main 147 160 +13
static.V - 1 +1
------------------------------------------------------------------------------
(add/remove: 2/0 grow/shrink: 2/0 up/down: 82/0) Total: 82 bytes
2007-09-05 12:13:51 +00:00
Denis Vlasenko
211f7f88ae
tar + gzip/bzip2/etc: support NOMMU machines (by Alex Landau <landau_alex@yahoo.com>)
2007-09-05 11:48:32 +00:00
Denis Vlasenko
beffd43d8e
busybox --install -s: prevent puzzling "/bin/busybox: Invalid argument" message
...
libbb: comment out realpath, add readlink which doesn't warn
2007-09-05 11:30:34 +00:00
Denis Vlasenko
7e0fbf9c26
tar: conditionally don't wait for vforked child to exec, as it always
...
works right on Linux, and anyway mayresult only on less-than-clear error
message only, it will not cause tar to misbehave.
function old new delta
open_transformer 98 80 -18
writeTarFile 714 547 -167
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 0/2 up/down: 0/-185) Total: -185 bytes
text data bss dec hex filename
770651 1051 10764 782466 bf082 busybox_old
770463 1051 10764 782278 befc6 busybox_unstripped
2007-09-04 19:33:22 +00:00
Denis Vlasenko
fc1e9951c6
vsz and rss are unsigned longs (ulong ~= width of void* =>
...
suitable for expressing total RAM in system). We account
for "32 bit in 64 bit" systems by storing kbytes, not bytes
there. Should allow for up to ~2000 Gb RAM on 32 bits.
2007-08-29 18:23:36 +00:00
Denis Vlasenko
b308d81e92
top: use poll instead of select for waiting on one descriptor
...
smart_ulltoa5: make it more cryptic. -50 bytes.
function old new delta
passwd_main 1095 1103 +8
getNum 557 565 +8
buffer_fill_and_print 73 76 +3
udhcpc_main 2393 2395 +2
mkfs_minix_main 3071 3070 -1
dname_enc 377 373 -4
expmeta 480 472 -8
smart_ulltoa5 334 283 -51
top_main 911 815 -96
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 4/5 up/down: 21/-160) Total: -139 bytes
text data bss dec hex filename
770872 1063 10788 782723 bf183 busybox_old
770732 1063 10788 782583 bf0f7 busybox_unstripped
2007-08-28 19:35:34 +00:00
Denis Vlasenko
512499c8ca
ps: fix RSS parsing (rss field in /proc/PID/stat is in pages, not bytes)
2007-08-26 18:23:13 +00:00
Denis Vlasenko
d37f22225b
libbb,crond,lash: fix getopt32 (don't know how it managed to slip through)
...
*: fcntl(fd, F_GETFL) doesn't require third parameter at all.
2007-08-19 13:42:08 +00:00
Denis Vlasenko
367960ba9a
make standalone httpd work on NOMMU machines
2007-08-18 14:20:21 +00:00
Denis Vlasenko
a27a11bb2c
introduce and use xdup2(int, int)
...
stop checking whether setsockopt_reuseaddr(int fd) was successful (it always is)
remove second parameter (sockllen) from xmalloc_sockaddr2xxxxx functions
sockaddr2str 142 156 +14
collect_blk 467 474 +7
xdup2 28 33 +5
singlemount 4456 4454 -2
print_host 214 212 -2
nslookup_main 139 137 -2
ftpgetput_main 414 412 -2
udhcpd_main 1258 1255 -3
udhcpc_main 2405 2402 -3
traceroute_main 4125 4122 -3
nc_main 1072 1069 -3
buffer_fill_and_print 76 73 -3
xmalloc_sockaddr2hostonly_noport 18 14 -4
xmalloc_sockaddr2host_noport 18 14 -4
xmalloc_sockaddr2host 15 11 -4
xmalloc_sockaddr2dotted_noport 18 14 -4
xmalloc_sockaddr2dotted 18 14 -4
wget_main 2618 2614 -4
ping_main 393 389 -4
ip_port_str 120 115 -5
dhcprelay_main 1146 1141 -5
dnsd_main 1531 1525 -6
passwd_main 1110 1102 -8
udhcp_kernel_packet 206 197 -9
udhcp_listen_socket 154 144 -10
getty_main 2576 2566 -10
setup 655 640 -15
xmove_fd 51 34 -17
dolisten 759 742 -17
tcpudpsvd_main 1866 1836 -30
startservice 339 299 -40
2007-08-18 14:16:39 +00:00
Denis Vlasenko
1b97efd66a
httpd shring and logging update, part 1 or 7
...
text data bss dec hex filename
9836 0 0 9836 266c busybox.t1/networking/httpd.o.orig
9724 0 0 9724 25fc busybox.t2/networking/httpd.o
9657 0 0 9657 25b9 busybox.t3/networking/httpd.o
9342 0 0 9342 247e busybox.t4/networking/httpd.o
9342 0 0 9342 247e busybox.t5/networking/httpd.o
9262 0 0 9262 242e busybox.t6/networking/httpd.o
9283 0 0 9283 2443 busybox.t7/networking/httpd.o
9334 0 0 9334 2476 busybox.t8/networking/httpd.o
2007-08-17 19:18:06 +00:00
Denis Vlasenko
72d260dbda
remove stray newline from help text
2007-08-17 08:45:58 +00:00
Denis Vlasenko
7f175ccbc3
add comments regarding SO_REUSEADDR
2007-08-16 18:27:47 +00:00
Denis Vlasenko
06b064c28d
Comment out "#include <strings.h>" everywhere
2007-08-16 11:29:08 +00:00
Denis Vlasenko
ab9c44b1a4
v[hp]error_msg have 2-3 callsites only -> incorporate there.
2007-08-15 20:07:53 +00:00
Denis Vlasenko
bb23c06919
if pidfile turned out to be !regular file, do not unlink it.
...
It's most probably the /dev/null.
2007-08-15 20:05:37 +00:00
Denis Vlasenko
9f7b92a2e1
dhcpd: make -S and -f actually work
2007-08-15 20:03:36 +00:00
Denis Vlasenko
384b1d12f9
httpd: add -v[v]: prints client addresses, HTTP codes returned [and URLs]
...
get_line - 70 +70
packed_usage 22811 22863 +52
handle_incoming_and_exit 2246 2277 +31
httpd_main 1141 1155 +14
sendHeaders 489 482 -7
getLine 77 - -77
------------------------------------------------------------------------------
(add/remove: 1/1 grow/shrink: 3/1 up/down: 167/-84) Total: 83 bytes
text data bss dec hex filename
774335 1058 11092 786485 c0035 busybox_old
774447 1058 11092 786597 c00a5 busybox_unstripped
2007-08-14 16:55:01 +00:00
Denis Vlasenko
0372f0f199
httpd: extend -p PORT to -p [IP[v6]:]PORT
...
httpd: comment out strange code which "closes connection properly"
(isnt exit(0) good enough?)
handle_incoming_and_exit - 2246 +2246
httpd_main 1116 1141 +25
getLine 75 77 +2
packed_usage 22827 22811 -16
parse_conf 1303 1284 -19
shutdown 32 - -32
handleIncoming 2578 - -2578
------------------------------------------------------------------------------
(add/remove: 1/2 grow/shrink: 2/2 up/down: 2273/-2645) Total: -372 bytes
text data bss dec hex filename
774704 1058 11092 786854 c01a6 busybox_old
774335 1058 11092 786485 c0035 busybox_unstripped
2007-08-14 16:50:01 +00:00
Denis Vlasenko
3d17d2b430
udhcpd: add -f "foreground" and -S "syslog" options
...
udhcpc: add -S "syslog" options
remove CONFIG_FEATURE_UDHCP_SYSLOG
function old new delta
udhcpd_main 1168 1201 +33
udhcpc_main 2414 2425 +11
static.udhcpc_longopts 191 200 +9
qgravechar 112 108 -4
packed_usage 22843 22827 -16
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 3/2 up/down: 53/-20) Total: 33 bytes
2007-08-14 16:45:29 +00:00
Denis Vlasenko
dbe6e66d6a
trylink: automatically use custom link script if user provides one
...
vinfo_msg: one user (info_msg), incorporate in it
*: style fixes
2007-08-14 16:43:01 +00:00
Denis Vlasenko
3952f20c24
expand, unexpand: new applets from Tito <farmatito@tiscali.it>
2007-08-13 14:10:24 +00:00
Denis Vlasenko
08294dbf5b
df: match coreutils behavior of wrapping lines if filesystem name is too long.
...
df: trim help text
2007-08-13 12:27:49 +00:00
Denis Vlasenko
f5635f4d32
usage.h: style cleanup
2007-08-13 10:48:33 +00:00
Denis Vlasenko
e324184c05
s/#ifdef CONFIG_/#if ENABLE_/g
2007-08-13 10:36:25 +00:00
Denis Vlasenko
5f1b149d54
syslogd,logread: get rid of head pointer, fix logread bug in the process
...
function old new delta
logread_main 450 462 +12
syslogd_main 1246 1252 +6
shbuf - 4 +4
buf 34 30 -4
packed_usage 22729 22724 -5
log_locally 957 767 -190
------------------------------------------------------------------------------
(add/remove: 1/0 grow/shrink: 2/3 up/down: 22/-199) Total: -177 bytes
text data bss dec hex filename
773886 1116 11316 786318 bff8e busybox_old
773714 1116 11316 786146 bfee2 busybox_unstripped
2007-08-12 21:33:06 +00:00
Denis Vlasenko
6ca409e0e4
trylink: produce even more info about final link stage
...
trylink: explain how to modify link and drastically decrease amount
of padding (unfortunately, needs hand editing ATM).
*: add ALIGN1 / ALIGN2 to global strings and arrays of bytes and shorts
size saving: 0.5k
2007-08-12 20:58:27 +00:00
Denis Vlasenko
f893da875a
ls,ps,watch: measure terminal width on fd 0, not 1
2007-08-09 08:27:24 +00:00
Denis Vlasenko
8274e06677
sed: fix 'q' command handling ("Nguyen Thai Ngoc Duy" <pclouds@gmail.com>)
...
add testsuite entry for it. Fix applet order checker. Fix cmp yelling.
trylink: fix error file and map file generation
applets: fix applet order
2007-08-06 03:41:08 +00:00
Denis Vlasenko
0e2c9fb4e0
mount: print errno on NFS error (again)
2007-08-03 14:16:24 +00:00
Denis Vlasenko
f223efbcde
svlogd: fix timestamping; do not warn if config is missing
...
sv: extend help text
2007-08-03 10:58:12 +00:00
Denis Vlasenko
80edead5ea
udhcp: slight shrink
...
udhcpd_main 1171 1208 +37
udhcpc_main 2363 2387 +24
dhcprelay_main 1145 1146 +1
dhcprelay_stopflag 4 1 -3
dhcprelay_signal_handler 11 8 -3
client_background 46 42 -4
udhcp_read_interface 230 211 -19
udhcp_make_pidfile 76 - -76
------------------------------------------------------------------------------
(add/remove: 0/1 grow/shrink: 3/4 up/down: 62/-105) Total: -43 bytes
text data bss dec hex filename
770052 1096 11228 782376 bf028 busybox_old
769980 1096 11228 782304 befe0 busybox_unstripped
2007-08-02 22:31:05 +00:00
Denis Vlasenko
c01af95c39
ttysize: new applet. +200 bytes
2007-08-02 22:23:47 +00:00
Denis Vlasenko
1caca34aa6
start_stop_daemon: NOMMU fixes, round 2 by Alex Landau <landau_alex@yahoo.com>
...
dhcpc: fixed "ifupdown + udhcpc_without_pidpile_creation" bug
2007-08-02 10:14:29 +00:00
Denis Vlasenko
a1b16f4d5c
start_stop_daemon: NOMMU fix; smaller fixes
2007-07-31 17:09:44 +00:00
Denis Vlasenko
1bab1de698
fix for suffix optimization (which was in previous commit)
2007-07-27 15:30:39 +00:00
Denis Vlasenko
f868963c67
multiplier suffixes are short, store them directly in struct suffix_mult
...
function old new delta
xstrtoul_range_sfx 226 217 -9
xstrtoull_range_sfx 291 280 -11
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 0/2 up/down: 0/-20) Total: -20 bytes
text data bss dec hex filename
669128 2668 13616 685412 a7564 busybox_old
669108 2668 13616 685392 a7550 busybox_unstripped
2007-07-27 15:06:25 +00:00
Denis Vlasenko
1d10aaf116
passwd: fix bug: we are trying to update shadow even if user's record is in passwd!
...
getspnam is guilty, it lies that user record exists in shadow.
2007-07-27 11:22:34 +00:00
Denis Vlasenko
3734b946bf
bb_getpwuid, bb_getgrgid: change order of arguments to more intuitive one;
...
comment thoroughly when they die and when they dont.
2007-07-27 11:20:10 +00:00
Denis Vlasenko
990d0f63ee
Replace index_in_[sub]str_array with index_in_[sub]strings,
...
which scans thru "abc\0def\0123\0\0" type strings. Saves 250 bytes.
text data bss dec hex filename
781266 1328 11844 794438 c1f46 busybox_old
781010 1328 11844 794182 c1e46 busybox_unstripped
2007-07-24 15:54:42 +00:00
Denis Vlasenko
1da77728d7
setfiles: small tweaks to usage text and code
2007-07-24 06:17:43 +00:00
Denis Vlasenko
bdc88fdc68
rework long option handling. saves ~1.2k
...
function old new delta
tar_longopts - 222 +222
static.udhcpc_longopts - 192 +192
start_stop_daemon_longopts - 150 +150
getopt32 1045 1185 +140
static.wget_longopts - 111 +111
static.od_longopts - 105 +105
getopt_longopts - 96 +96
install_longopts - 67 +67
ipcalc_longopts - 63 +63
static.hwclock_longopts - 54 +54
ftpgetput_longopts - 52 +52
static.dumpleases_longopts - 32 +32
env_longopts - 31 +31
runparts_longopts - 30 +30
mv_longopts - 24 +24
mkdir_longopts - 19 +19
find_pair 164 180 +16
bb_null_long_options - 16 +16
setconsole_longopts - 10 +10
display_speed 91 98 +7
collect_blk 467 474 +7
show_color 4 1 -3
ls_main 913 904 -9
bb_default_long_options 16 - -16
ls_color_opt 32 10 -22
setconsole_long_options 32 - -32
arith 2077 2030 -47
mv_long_options 48 - -48
mkdir_long_options 48 - -48
env_long_options 48 - -48
static.options 248 184 -64
runparts_long_options 80 - -80
ftpgetput_long_options 96 - -96
static.hwclock_long_options 112 - -112
install_long_options 112 - -112
static.long_options 144 - -144
static.wget_long_options 160 - -160
longopts 160 - -160
static.arg_options 304 - -304
tar_long_options 320 - -320
long_options 384 - -384
------------------------------------------------------------------------------
(add/remove: 17/15 grow/shrink: 4/5 up/down: 1444/-2209) Total: -765 bytes
text data bss dec hex filename
782618 1328 11900 795846 c24c6 busybox_old
781354 1328 11900 794582 c1fd6 busybox_unstripped
2007-07-23 17:14:14 +00:00
Denis Vlasenko
397137b815
setfiles,restorecon: new SELinux applets by Yuichi Nakamura <ynakam@hitachisoft.jp>
2007-07-23 14:03:30 +00:00
Denis Vlasenko
b71c668c57
style fix (stray space before ';')
2007-07-21 15:08:09 +00:00
Denis Vlasenko
091965768d
libbb: nuke BB_GETOPT_ERROR, always die if there are mutually exclusive options
...
find_pair 164 180 +16
passwd_main 1222 1230 +8
display_speed 91 96 +5
msh_main 1335 1339 +4
qrealloc 38 36 -2
refresh 1190 1182 -8
cut_main 543 532 -11
sendCgi 1807 1794 -13
getopt32 1063 1045 -18
arith 2077 2030 -47
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 4/6 up/down: 33/-99) Total: -66 bytes
text data bss dec hex filename
781548 1168 11900 794616 c1ff8 busybox_old
781452 1168 11900 794520 c1f98 busybox_unstripped
2007-07-21 13:27:44 +00:00
Denis Vlasenko
21d1014b5b
chpasswd: new applet by Alexander Shishkin <virtuoso@slind.org>
2007-07-20 21:28:41 +00:00
Denis Vlasenko
b69e872229
Trim help text. With compressed help: -143 bytes
...
text data bss dec hex filename
772572 1168 22680 796420 c2704 busybox_old
772444 1168 22680 796292 c2684 busybox_unstripped
2007-07-18 21:57:24 +00:00
Denis Vlasenko
49a128a156
remove accumulated stray trailing whitespace
2007-07-17 21:42:59 +00:00
Denis Vlasenko
4652daace9
grep: implement -m MAX_MATCHES; fix help text
...
grep_file 771 822 +51
packed_usage 22573 22610 +37
.rodata 128058 128090 +32
grep_main 842 853 +11
max_matches - 4 +4
------------------------------------------------------------------------------
(add/remove: 1/0 grow/shrink: 4/0 up/down: 135/0) Total: 135 bytes
2007-07-15 12:39:08 +00:00
Denis Vlasenko
fb79a2e2cf
xioctl and friends by Tito <farmatito@tiscali.it>
...
function old new delta
do_iptunnel 203 977 +774
process_dev 5328 5494 +166
ioctl_or_perror - 54 +54
ioctl_or_perror_and_die - 51 +51
ioctl_alt_func - 49 +49
bb_ioctl_or_warn - 47 +47
do_add_ioctl 102 145 +43
bb_xioctl - 39 +39
print_value_on_off - 31 +31
get_lcm 105 123 +18
arp_main 2155 2167 +12
..................
zcip_main 1576 1566 -10
setlogcons_main 92 82 -10
dumpkmap_main 263 253 -10
do_get_ioctl 85 75 -10
setkeycodes_main 165 154 -11
write_table 244 232 -12
vconfig_main 318 306 -12
do_del_ioctl 93 81 -12
set_address 75 62 -13
maybe_set_utc 30 16 -14
loadfont_main 495 479 -16
slattach_main 712 695 -17
do_loadfont 191 174 -17
do_iplink 1155 1136 -19
getty_main 2583 2562 -21
fbset_main 2058 2035 -23
do_time 588 565 -23
xioctl 25 - -25
read_rtc 186 160 -26
parse_conf 1299 1270 -29
udhcp_read_interface 269 239 -30
bb_ioctl 45 - -45
bb_ioctl_alt 70 - -70
bb_ioctl_on_off 78 - -78
.rodata 129370 129018 -352
do_show 799 - -799
------------------------------------------------------------------------------
(add/remove: 6/5 grow/shrink: 13/49 up/down: 1316/-1864) Total: -548 bytes
text data bss dec hex filename
675352 2740 13968 692060 a8f5c busybox_old
674804 2740 13968 691512 a8d38 busybox_unstripped
2007-07-14 22:07:14 +00:00
Denis Vlasenko
c540e75d74
fix applet order error
2007-07-06 16:57:06 +00:00
Denis Vlasenko
d166f83d74
md5_sha1_sum: fix mishandling when run as /bin/md5sum (with path)
...
chown/chgrp: completely match coreutils 6.8 wrt symlink handling
function old new delta
recursive_action 411 422 +11
arith 2033 2042 +9
collect_blk 467 474 +7
dhcprelay_main 1122 1125 +3
fsck_main 1909 1911 +2
singlemount 4555 4547 -8
xmalloc_realpath 14 - -14
get_lcm 123 105 -18
ed_main 3111 3084 -27
chown_main 217 183 -34
------------------------------------------------------------------------------
(add/remove: 0/1 grow/shrink: 5/4 up/down: 32/-101) Total: -69 bytes
text data bss dec hex filename
684132 2744 14000 700876 ab1cc busybox_old
684060 2744 14000 700804 ab184 busybox_unstripped
2007-07-05 00:12:55 +00:00
Denis Vlasenko
c82b5108e1
udhcp: new config option "Rewrite the lease file at every new acknowledge"
...
(Mats Erik Andersson <mats@blue2net.com> (Blue2Net AB))
udhcp: consistently treat server_config.start/end IPs as host-order
fix IP parsing for 64bit machines
fix unsafe hton macro usage in read_opt()
do not chdir("/") when daemonizing
fix help text
2007-07-01 17:05:57 +00:00
Denis Vlasenko
98ebab8b76
top,ps: improve /proc/PID/cmdinfo reading code
...
function old new delta
display_status - 1231 +1231
read_cmdline - 101 +101
parse_conf 1284 1303 +19
arith 2033 2042 +9
collect_blk 467 474 +7
fsck_main 1909 1911 +2
dhcprelay_main 1125 1122 -3
singlemount 4555 4547 -8
read_close 50 36 -14
get_lcm 123 105 -18
ed_main 3111 3084 -27
func_args 73 28 -45
procps_scan 732 658 -74
top_main 2187 899 -1288
------------------------------------------------------------------------------
(add/remove: 2/0 grow/shrink: 4/8 up/down: 1369/-1477) Total: -108 bytes
text data bss dec hex filename
676048 2744 13968 692760 a9218 busybox_old
675940 2744 13968 692652 a91ac busybox_unstripped
2007-06-30 14:47:41 +00:00
Denis Vlasenko
dc757aa16c
introduce and use bb_basename()
...
function old new delta
bb_basename - 26 +26
sv_main 1226 1225 -1
passwd_main 1985 1983 -2
showdirs 482 478 -4
sendCgi 1811 1807 -4
make_device 1354 1350 -4
handleIncoming 2443 2439 -4
func_name 82 78 -4
service_name 2292 2285 -7
main 909 901 -8
cmp_main 555 547 -8
test_main 434 422 -12
act 228 216 -12
find_pair 180 164 -16
rmmod_main 298 280 -18
find_pid_by_name 156 134 -22
modprobe_main 1606 1576 -30
------------------------------------------------------------------------------
(add/remove: 1/0 grow/shrink: 0/16 up/down: 26/-156) Total: -130 bytes
text data bss dec hex filename
734933 3028 14400 752361 b7ae9 busybox_old
734801 3028 14400 752229 b7a65 busybox_unstripped
2007-06-30 08:04:05 +00:00
Denis Vlasenko
f7d07b1723
killall, pidof: use argv0 for process matching too
...
top: show cmdline, not comm field
(fixes problems with re-execed applets showing as processes with name "exe",
and not being found by pidof/killall by applet name)
function old new delta
find_pid_by_name 98 156 +58
procps_scan 692 732 +40
top_main 2724 2762 +38
find_pair 164 180 +16
collect_int 114 123 +9
cmp_main 547 555 +8
collect_fork 112 119 +7
collect_ctx 112 119 +7
read_package_field 253 257 +4
passwd_main 1983 1985 +2
process_stdin 435 433 -2
xstrtoul_range_sfx 229 226 -3
get_next_block 1852 1849 -3
arith 2042 2033 -9
sv_main 1236 1226 -10
singlemount 4690 4672 -18
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 10/6 up/down: 189/-45) Total: 144 bytes
text data bss dec hex filename
734789 3028 14400 752217 b7a59 busybox_old
734933 3028 14400 752361 b7ae9 busybox_unstripped
2007-06-30 08:03:26 +00:00
Denis Vlasenko
e8240f19bd
uuencode: shrink
...
function old new delta
uuencode_main 427 337 -90
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 0/1 up/down: 0/-90) Total: -90 bytes
text data bss dec hex filename
734981 3028 14400 752409 b7b19 busybox_old
734889 3028 14400 752317 b7abd busybox_unstripped
2007-06-26 15:59:37 +00:00
Denis Vlasenko
80b8b39899
Consolidate ARRAY_SIZE macro; remove one unneeded global var (walter harms <wharms@bfs.de>)
2007-06-25 10:55:35 +00:00
Denis Vlasenko
198badafd8
pidof: size optimizations (-50 bytes)
2007-06-23 14:56:43 +00:00
Denis Vlasenko
b304eadca8
test: shrink a bit
...
function old new delta
test_main 5 434 +429
bb_test 473 - -473
------------------------------------------------------------------------------
(add/remove: 0/1 grow/shrink: 1/0 up/down: 429/-473) Total: -44 bytes
text data bss dec hex filename
735073 3028 14408 752509 b7b7d busybox_old
735029 3028 14408 752465 b7b51 busybox_unstripped
2007-06-21 13:35:52 +00:00
Bernhard Reutner-Fischer
9a33780152
- add ATTRIBUTE_UNUSED_RESULT for internal use
2007-06-21 10:39:20 +00:00
Denis Vlasenko
14923db72f
slattach: new applet.
2007-06-20 15:23:03 +00:00
Denis Vlasenko
7510384107
do not do utime() on links, it acts on link targets, and we don't want that.
...
rename link_name to link_target, less confusing this way.
2007-06-20 14:49:47 +00:00
Denis Vlasenko
a19faf8bb7
find: -context support for SELinux (KaiGai Kohei <kaigai@kaigai.gr.jp>)
...
find: make it a bit smaller
function old new delta
.rodata 129018 129050 +32
parse_params 1509 1346 -163
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 1/1 up/down: 32/-163) Total: -131 bytes
2007-06-19 22:22:57 +00:00
Denis Vlasenko
31789a81d5
top,ps: 'stringify' tty only when needed. -60 bytes.
2007-06-19 14:43:17 +00:00
Denis Vlasenko
6d9ea24611
networking/interface.c: huke remaining big statics; use malloc for INET[6]_rresolve
...
return value. Went thru callers and adjusted them - code got smaller too.
function old new delta
ip_port_str - 126 +126
INET6_rresolve 165 182 +17
static.cache 20 24 +4
route_main 2092 2091 -1
INET_sprint 61 59 -2
INET_nn 4 - -4
INET6_sprint 59 53 -6
udp_do_one 518 508 -10
tcp_do_one 433 423 -10
raw_do_one 494 484 -10
traceroute_main 4117 4105 -12
INET_rresolve 334 321 -13
bb_displayroutes 494 456 -38
snprint_ip_port 244 - -244
static.buff 264 16 -248
------------------------------------------------------------------------------
(add/remove: 1/2 grow/shrink: 2/10 up/down: 147/-598) Total: -451 bytes
size busybox_old busybox_unstripped
text data bss dec hex filename
751073 3048 14688 768809 bbb29 busybox_old
750873 3048 14440 768361 bb969 busybox_unstripped
2007-06-19 11:12:46 +00:00
Denis Vlasenko
1b16bdaebf
networking/interface.c: reduce bss usage
...
function old new delta
.rodata 158918 158950 +32
display_interfaces 133 153 +20
UNSPEC_print 56 68 +12
pr_ether 59 65 +6
static.proc_read 4 1 -3
interface_opt_a 4 1 -3
in_ether 139 136 -3
ifconfig_main 1296 1293 -3
if_readlist_proc 686 680 -6
ife_print 1350 1338 -12
do_if_print 46 - -46
static.buff 369 264 -105
------------------------------------------------------------------------------
(add/remove: 0/1 grow/shrink: 4/7 up/down: 70/-181) Total: -111 bytes
# size busybox_old busybox_unstripped
text data bss dec hex filename
751073 3080 14800 768953 bbbb9 busybox_old
751073 3048 14688 768809 bbb29 busybox_unstripped
2007-06-19 11:10:02 +00:00
Denis Vlasenko
bd7bb299c0
wget: use monotonic_sec instead of gettimeofday
...
zcip: use monotonic_us instead of gettimeofday
udhcpcd: simpler, shorter random_xid()
function old new delta
monotonic_sec - 41 +41
find_pair 164 180 +16
run_list_real 2018 2028 +10
cmp_main 547 555 +8
collect_ctx 112 119 +7
singlemount 4544 4549 +5
time_main 1124 1128 +4
static.start_sec - 4 +4
static.lastupdate_sec - 4 +4
sock - 4 +4
read_package_field 253 257 +4
pick 38 40 +2
get_next_line 145 147 +2
count_lines 59 61 +2
process_stdin 435 433 -2
xstrtoul_range_sfx 229 226 -3
static.initialized 4 1 -3
dhcprelay_main 1125 1122 -3
catcher 380 377 -3
arping_main 1969 1966 -3
s 8 4 -4
cfg 4 - -4
static.lastupdate 8 - -8
start 8 - -8
random_xid 95 33 -62
.rodata 129114 129050 -64
zcip_main 1731 1576 -155
progressmeter 1035 867 -168
------------------------------------------------------------------------------
(add/remove: 4/3 grow/shrink: 10/11 up/down: 113/-490) Total: -377 bytes
2007-06-17 23:40:26 +00:00
Denis Vlasenko
459be35234
hwclock: size optimizations
...
libbb/time.c: new file, introducing monotonic_us()
pscan, traceroute, arping: use it instead of gettimeofday
ping, zcip: TODO
function old new delta
monotonic_us - 89 +89
find_pair 164 180 +16
.rodata 129747 129763 +16
refresh 1144 1152 +8
............
timeout 8 4 -4
static.start 8 4 -4
last 8 4 -4
parse_conf 1303 1284 -19
time_main 1149 1124 -25
gettimeofday_us 39 - -39
arping_main 2042 1969 -73
hwclock_main 594 501 -93
catcher 485 380 -105
traceroute_main 4300 4117 -183
------------------------------------------------------------------------------
(add/remove: 2/1 grow/shrink: 8/11 up/down: 157/-562) Total: -405 bytes
2007-06-17 19:09:05 +00:00
Denis Vlasenko
ea9e798004
arping: -i should be -I
2007-06-17 00:36:57 +00:00
Denis Vlasenko
7b72fc1200
pscan: new applet (portscanner). ~1350 bytes. By Tito <farmatito@tiscali.it>
...
wget: lift 256 chars limitation on terminal width
2007-06-16 13:37:59 +00:00
Denis Vlasenko
53a0e97196
find: make -size match GNU find
2007-06-16 00:30:52 +00:00
Denis Vlasenko
b941129ccb
find: add conditional support for -maxdepth and -regex
...
(needed for Linux 2.6.22-rc4 build)
-maxdepth:
# size busybox_old busybox_unstripped
text data bss dec hex filename
675622 2792 15728 694142 a977e busybox_old
675770 2792 15728 694290 a9812 busybox_unstripped
-regex:
# size busybox_old busybox_unstripped
text data bss dec hex filename
675770 2792 15728 694290 a9812 busybox_old
675894 2792 15728 694414 a988e busybox_unstripped
2007-06-15 23:43:11 +00:00
Denis Vlasenko
d786cc5966
fdisk: fix minor issues with help text
2007-06-15 21:17:21 +00:00
Denis Vlasenko
ca525b4f24
*: BB_BANNER -> bb_banner (it is not a const or #define)!
...
correct_password: explain in detail why it is ok to use bb_banner
fsck_minix: make it print bb version, not it's own (outdated/irrelevant) one
Marginal size difference:
text data bss dec hex filename
679119 2700 15632 697451 aa46b busybox_old
679091 2700 15632 697423 aa44f busybox_unstripped
2007-06-13 12:27:17 +00:00
Denis Vlasenko
d67cef2425
hush: fix read builtin to not read ahead past eol and to not use
...
insane amounts of stack. Testsuite updated.
2007-06-13 06:47:47 +00:00
Denis Vlasenko
f5f75c5e82
remove nearly-duplicate PATHs in several places
...
function old new delta
bb_PATH_root_path - 35 +35
varunset 60 58 -2
arith 2042 2033 -9
bb_default_root_login_path 30 - -30
.rodata 128794 128762 -32
which_main 152 117 -35
defpathvar 40 - -40
------------------------------------------------------------------------------
(add/remove: 1/2 grow/shrink: 0/4 up/down: 35/-148) Total: -113 bytes
2007-06-12 22:35:19 +00:00
Denis Vlasenko
f312e32662
login: make /etc/nologin support configurable. -240 bytes if not selected.
2007-06-12 22:04:57 +00:00
Denis Vlasenko
3ad5d0cbbe
diff: shrink code (-85 bytes):
...
function old new delta
fiddle_sum 8 - -8
diffreg 2717 2690 -27
prepare 334 284 -50
------------------------------------------------------------------------------
(add/remove: 0/1 grow/shrink: 0/2 up/down: 0/-85) Total: -85 bytes
s/ATTRIBUTE_ALWAYS_INLINE/ALWAYS_INLINE/g
2007-06-12 20:54:54 +00:00
Denis Vlasenko
15611bb958
A few more string duplicates found & eliminated
...
# size busybox_old busybox_unstripped
text data bss dec hex filename
679693 2700 15632 698025 aa6a9 busybox_old
679523 2700 15632 697855 aa5ff busybox_unstripped
2007-06-12 08:52:02 +00:00
Denis Vlasenko
bdbbb7ec49
make busybox --install work even if /proc/self/exe doesn't exist
...
# size busybox_old busybox_unstripped
text data bss dec hex filename
680095 2704 15648 698447 aa84f busybox_old
680099 2704 15648 698451 aa853 busybox_unstripped
2007-06-08 15:02:55 +00:00
Denis Vlasenko
c14d39e83a
rmp: add optional support for bz2 data. +50 bytes of code
2007-06-08 13:05:39 +00:00
Denis Vlasenko
0696b8aae8
ps: fix -Z (by Yuichi Nakamura <ynakam@hitachisoft.jp>)
2007-06-06 07:40:16 +00:00
Denis Vlasenko
5c51a7ca52
nc: make connecting to IPv4 from IPv6-enabled hosts easier
...
(was requiring -s <local addr>)
2007-06-05 20:08:11 +00:00
Denis Vlasenko
746204b1b8
uudecode: fix to base64 decode by Jorgen Cederlof <jcz@google.com>
...
improved help texts
# make bloatcheck
function old new delta
.rodata 127000 127032 +32
packed_usage 22156 22151 -5
uudecode_main 360 348 -12
uuencode_main 490 468 -22
read_base64 283 254 -29
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 1/4 up/down: 32/-68) Total: -36 bytes
2007-06-04 23:32:35 +00:00
Denis Vlasenko
74324c8666
Audit bb_common_bufsiz usage, add script which looks for misuse.
...
tr: stop using globals needlessly.
code: -103 bytes
2007-06-04 10:16:52 +00:00
Denis Vlasenko
9a7d38fe24
delete tons of extra #includes
2007-05-31 22:42:12 +00:00
Denis Vlasenko
fad2b86c9e
use "glibc errno" trick not only for ash, but for entire busybox
...
(add/remove: 1/1 grow/shrink: 37/37 up/down: 139/-228) Total: -89 bytes
2007-05-31 22:16:38 +00:00
Denis Vlasenko
4b924f3a5c
whitespace fixes
2007-05-30 00:29:55 +00:00
Denis Vlasenko
5a6aeddfa7
xpipe: introduce (saves ~170 bytes)
...
udhcp/signalpipe.c: use pipe instead of socketpair.
2007-05-26 16:44:20 +00:00
Denis Vlasenko
b055001b6a
hush: fix handling of unmatched ${name (without closing '}') -
...
was eating all remaining input, potentially megabytes.
nofork: save/restore die_jmp too
nofork: use -2222 instead of -111 as "special" return valur for zero
(-111 is used by some applets. -2222 won't fit in exitcode and thus safer)
2007-05-24 12:18:16 +00:00
Denis Vlasenko
6d709972cd
cttyhack: new applet.
2007-05-18 09:45:36 +00:00
Denis Vlasenko
d46e6d1a55
fix trivial compile errors found by randomconfig run
2007-05-17 12:58:30 +00:00
Denis Vlasenko
418a7fb29b
netstat: introduce -W: wide, ipv6-friendly output
...
netstat: shrink by ~500 bytes
(patch by Cristian Ionescu-Idbohrn <cristian.ionescu-idbohrn@axis.com>)
netstat: fix for bogus state value for raw sockets
2007-05-15 23:57:46 +00:00
Denis Vlasenko
7e84e539de
cryptpw: new applet (a bit less than 3k added)
...
(by Thomas Lundquist <lists@zelow.no>)
2007-05-08 17:52:17 +00:00
Denis Vlasenko
734e5ebc93
fix -Werror compile
2007-05-04 21:38:14 +00:00
Denis Vlasenko
f20de5bb42
ash,kill: use common code for kill applet/builtin
...
# make bloatcheck
function old new delta
evaltreenr 644 654 +10
evaltree 644 654 +10
parse_conf 1440 1444 +4
dpkg_deb_main 426 429 +3
ed_main 3319 3321 +2
passwd_main 2093 2091 -2
kill_main 830 826 -4
singlemount 4609 4601 -8
find_command 962 954 -8
get_lcm 123 105 -18
.rodata 132243 132147 -96
killcmd 449 120 -329
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 5/7 up/down: 29/-465) Total: -436 bytes
# size busybox_old busybox_unstripped
text data bss dec hex filename
723901 2940 27504 754345 b82a9 busybox_old
723457 2940 27504 753901 b80ed busybox_unstripped
2007-04-29 23:42:54 +00:00
Denis Vlasenko
18e19f2b0d
hush: fix nofork + ctrl-Z clobbering of globals
2007-04-28 16:43:18 +00:00
Denis Vlasenko
8581863a1b
procps: remove all global variables
...
text data bss dec hex filename
1462 14 24 1500 5dc busybox.t2/procps/ps.o
1484 0 0 1484 5cc busybox.t3/procps/ps.o
3122 0 252 3374 d2e busybox.t1/procps/top.o
3117 0 0 3117 c2d busybox.t3/procps/top.o
2007-04-19 14:47:11 +00:00
Denis Vlasenko
516a0ca2dc
ps: add -o tty and -o rss support
...
1373 14 24 1411 583 busybox.t1/procps/ps.o
1462 14 24 1500 5dc busybox.t2/procps/ps.o
2007-04-19 14:46:14 +00:00
Denis Vlasenko
ac678ec2f1
style fixes, no code changes
2007-04-16 22:32:04 +00:00
Denis Vlasenko
be1a9d4237
deluser: add optional support for removing users from groups
...
(by Tito <farmatito@tiscali.it>)
2007-04-15 08:43:23 +00:00
Denis Vlasenko
f5294e1f4c
hush: use NOFORK applets as appropriate. Net reduction of code size.
2007-04-14 10:09:57 +00:00
Denis Vlasenko
16abcd90ae
teach find_root_device to deal with /dev/ subdirs
...
(by "Kirill K. Smirnov" <lich@math.spbu.ru>)
2007-04-13 23:59:52 +00:00
Denis Vlasenko
87468857f6
style fixes
2007-04-13 23:22:00 +00:00
Denis Vlasenko
62f0479cf1
find: add support for -delete, -path (by Natanael Copa)
2007-04-13 10:00:12 +00:00
Denis Vlasenko
0de3c55b42
login: remove setpgrp call (makes it work from shell prompt again).
...
login: sanitize stdio descriptors (we are suid, need to be careful!)
shrink login and set_environment by ~100 bytes.
2007-04-12 12:31:02 +00:00
Bernhard Reutner-Fischer
b290889f02
- add xsendto and use where appropriate; shrink iplink; sanitize libiproute a bit.
...
-916 byte
2007-04-12 11:34:39 +00:00
Denis Vlasenko
50f7f446ec
bb_full_fd_action: remove potential xmalloc from NOFORK path
...
cat: stop using stdio.h opens
libbb: introduce & use open[3]_or_warn
function old new delta
open3_or_warn - 54 +54
bb_cat 115 144 +29
open_or_warn - 25 +25
unlzma 2404 2412 +8
chattr_main 334 339 +5
xstrtoul_range_sfx 251 255 +4
telnet_main 1514 1510 -4
static.opt 4 - -4
qgravechar 122 118 -4
fuser_add_pid 61 54 -7
fuser_add_inode 154 147 -7
writeFileToTarball 1542 1534 -8
refresh 1156 1148 -8
do_show 856 846 -10
read_leases 212 200 -12
setup_redirects 236 222 -14
iproute_list_or_flush 1582 1568 -14
read_config 427 411 -16
write_leases 284 264 -20
hash_file 338 318 -20
copy_file 1760 1740 -20
do_iproute 2610 2588 -22
bb_full_fd_action 320 269 -51
open_to_or_warn 103 49 -54
fuser_main 1660 1596 -64
.rodata 131160 131096 -64
------------------------------------------------------------------------------
(add/remove: 2/1 grow/shrink: 4/19 up/down: 125/-423) Total: -298 bytes
2007-04-11 23:20:53 +00:00
Denis Vlasenko
e4f2d064b0
rename: run_applet_by_name -> run_applet_and_exit
2007-04-11 17:03:19 +00:00
Denis Vlasenko
03fc408de6
fix typo in comment
2007-04-11 07:36:31 +00:00
Denis Vlasenko
473dae080a
add more convenient defines for [NO]MMU:
...
"#ifndef BB_NOMMU" is a double negative
2007-04-11 07:04:23 +00:00
Denis Vlasenko
80d14beae9
Rename two config options:
...
FEATURE_SH_STANDALONE_SHELL => FEATURE_SH_STANDALONE
FEATURE_EXEC_PREFER_APPLETS => FEATURE_PREFER_APPLETS
Make SH_STANDALONE depend on PREFER_APPLETS.
getopt.c: more randomconfig-induced fixes
2007-04-10 23:03:30 +00:00
Denis Vlasenko
c6758a07c6
make compressed help code NOMMU- and NOFORK-friendly -
...
no forking anymore, bunzip2 unpack routine now does all it in memory.
2007-04-10 21:40:19 +00:00
Denis Vlasenko
335b63d8d1
make a few struct bb_applet members conditional
...
rename sllep_and_die -> xfunc_die
make fflush_stdout_and_exit NOFORK-safe
fix some buglets found by randomconfig
2007-04-10 21:38:30 +00:00
Bernhard Reutner-Fischer
f73cac8d3d
- forgot this hunk that corrects the usage text of ip
2007-04-10 19:00:08 +00:00
Bernhard Reutner-Fischer
51f7ab6162
- add ATTRIBUTE_DEPRECATED for functions that should be removed in the future.
...
This is ment to provide means to point at cruft marked for cleanup.
2007-04-10 18:40:05 +00:00
Denis Vlasenko
99912ca733
audit small applets and mark some of them as NOFORK.
...
Put big scary warnings in relevant places.
2007-04-10 15:43:37 +00:00
Bernhard Reutner-Fischer
163516da3a
- very minor shrinkage (-3b)
2007-04-10 14:16:19 +00:00
Bernhard Reutner-Fischer
8b1fab2879
- add prototype for str_tolower()
2007-04-10 09:38:07 +00:00
Denis Vlasenko
3f3aa2a57d
make xfunctions optionally longjump instead of exit.
...
use it for making NOFORK more practical.
touch: make it a NOFORK applet
2007-04-09 21:35:07 +00:00
Denis Vlasenko
cd7001f705
factor out NOFORK/NOEXEC code from find. Use it for xargs too.
2007-04-09 21:32:30 +00:00
Denis Vlasenko
1b4b2cb20e
xargs: shrink code, ~80 bytes
...
applets.h: +#undef APPLET_NOEXEC
2007-04-09 21:30:53 +00:00
Denis Vlasenko
7e754f12d3
Implement first instance of NOFORK applet - echo
...
find: use NOFORK/NOEXEC; small -exec buglet also eliminated
vfork_daemon_rexec: honor PREFER_APPLETS
echo: small size improvements
find -exec echo {} \; with PREFER_APPLETS=y runs 4 times faster
2007-04-09 13:04:50 +00:00
Denis Vlasenko
c44ab01b75
Improve STANDALONE_SHELL. "safe" applets are renamed NOEXEC applets
...
and now this fact is recorded in applets.h, not ash.c.
Several fixes to "--help + STANDALONE_SHELL" scenarios.
function old new delta
run_current_applet_and_exit - 355 +355
arith 2064 2073 +9
refresh 1148 1156 +8
getopt32 1068 1073 +5
telnet_main 1510 1514 +4
md5_sha1_sum_main 565 566 +1
xstrtoul_range_sfx 255 251 -4
packed_usage 22523 22514 -9
tryexec 255 203 -52
static.safe_applets 152 - -152
.rodata 131320 131128 -192
run_applet_by_name 869 506 -363
------------------------------------------------------------------------------
(add/remove: 1/1 grow/shrink: 5/5 up/down: 382/-772) Total: -390 bytes
./busybox ash -c 'i=20000; while test $i != 0; do touch z; i=$((i-1)); done'
runs more than twice as fast with STANDALONE_SHELL versus without.
2007-04-09 03:11:58 +00:00
Denis Vlasenko
32b633aa3f
merge busybox.c into applets.c
2007-04-09 03:05:48 +00:00
Denis Vlasenko
786834bcee
applets.h: de-obfuscate
2007-04-08 17:30:10 +00:00
Denis Vlasenko
8d9f495d68
getopt32: fix llist_t options ordering. llist_rev is not unused.
...
function old new delta
tar_main 705 695 -10
sort_main 928 918 -10
decode_format_string 886 876 -10
run_parts_main 197 185 -12
ps_main 513 500 -13
wget_main 2764 2750 -14
awk_main 1014 1000 -14
od_main 2886 2866 -20
llist_rev 25 - -25
------------------------------------------------------------------------------
(add/remove: 0/1 grow/shrink: 0/8 up/down: 0/-128) Total: -128 bytes
2007-04-08 15:08:42 +00:00
Denis Vlasenko
bbd695d801
find: fix handling of -prune
...
recursive_actions: uppercase flag constants
2007-04-08 10:52:28 +00:00
Denis Vlasenko
04c99ebb4f
random small shrinkage and elimination of statics
2007-04-07 00:44:31 +00:00
Denis Vlasenko
bf295dd5b6
[u]mount: extend -t option (Roy Marples <uberlord@gentoo.org>)
2007-04-05 21:57:47 +00:00
Denis Vlasenko
1bb552b1d9
libbb: add xunlink()
...
patch: do not try to delete same file twice
2007-04-05 21:25:15 +00:00
Denis Vlasenko
2f7b923f5c
find: improve usage text (Natanael Copa <natanael.copa@gmail.com>)
2007-04-05 21:01:06 +00:00
Denis Vlasenko
29fe7265b8
nc: port nc 1.10 to busybox
2007-04-05 20:26:28 +00:00
Bernhard Reutner-Fischer
00c2c4868a
- clean up addgroup, fix adding users to existing groups and make it optional (Tito)
2007-04-05 13:16:39 +00:00
Bernhard Reutner-Fischer
2e75dcc80d
- add -s|--spider which only checks if the file exists but does not download it's content.
...
Closes #1291
2007-04-05 10:31:47 +00:00
Denis Vlasenko
56fce00fc7
find: un-DESKTOPize (Kai Schwenzfeier <niteblade@gmx.net>)
...
find: -group, -depth (Natanael Copa <natanael.copa@gmail.com>)
find: make constant array static, declare PARM_xx constants with enum
2007-04-04 23:41:35 +00:00
Denis Vlasenko
794687947f
Add/improve comment, shorten some usage texts. No code changes.
2007-04-04 11:02:55 +00:00
Denis Vlasenko
02fd66885c
ipsvd: make udpsvd work similar to tcpsvd (multiple parallel
...
children for several streams of udp packets tested to work)
code size: -509 bytes
2007-04-03 23:23:10 +00:00
Denis Vlasenko
992e05b6f0
udpsvd: more work on it. works in limited testing.
2007-04-03 01:13:04 +00:00
Denis Vlasenko
729bd9e0b0
test: comment out unused code
...
udpsvd: fake it compile
tcpsvd: more optimal memorizing of IP's for -C
2007-04-02 12:37:28 +00:00
Denis Vlasenko
60fadaca28
udpsvd: next part of ipsvd applets (not working yet)
2007-04-01 19:10:36 +00:00
Denis Vlasenko
ba2fb719b9
Copyright, help text, whitespace cleanups
2007-04-01 09:39:03 +00:00
Denis Vlasenko
2856dab477
tcpsvd: new applet
...
It's a GPL-ed 'clone' of Dan Bernstein's tcpserver.
Author: Gerrit Pape <pape@smarden.org>
http://smarden.sunsite.dk/ipsvd/
size tcpsvd.o
text data bss dec hex filename
2571 4 16 2591 a1f tcpsvd.o
2007-04-01 01:18:20 +00:00
Bernhard Reutner-Fischer
3e816c1252
- fold recurse, depthFirst and dereference params into one param flags.
...
Minor size improvement (-16b for size, -24b according to bloat-o-meter).
2007-03-29 10:30:50 +00:00
Bernhard Reutner-Fischer
b7cffd4bed
- rewrite run-parts
...
text data bss dec hex filename
1029 0 0 1029 405 debianutils/run_parts.o-old
478 0 0 478 1de debianutils/run_parts.o-new-bare
600 0 0 600 258 debianutils/run_parts.o-new-full
bare, i.e. without long opts and fancy stuff
./scripts/bloat-o-meter bb_old busybox_unstripped function old new delta
act - 215 +215
run_parts_main 216 201 -15
valid_name 50 - -50
runparts_long_options 64 - -64
.rodata 124323 124163 -160
run_parts 513 - -513
------------------------------------------------------------------------------
(add/remove: 1/3 grow/shrink: 0/2 up/down: 215/-802) Total: -587 bytes
2007-03-28 20:35:13 +00:00
Denis Vlasenko
10457b90db
make pidfile writing configurable.
...
[ui]toa_to_buf: change API. No users yet.
2007-03-27 22:01:31 +00:00
Denis Vlasenko
afa7023b46
zcip: make it work on NOMMU (+ improve NOMMU support machinery)
...
fsck: fix bad English in a comment
2007-03-26 17:25:33 +00:00
Bernhard Reutner-Fischer
4e1361a481
- add usage for split
2007-03-26 14:38:03 +00:00
Denis Vlasenko
53091ecd20
Attempt to get more applets compile for NOMMU.
...
TODO_config_nommu documents what I managed to compile so far
(yay! msh works! cool). inetd, telnetd, httpd still do not compile. TODO
Also make fork(), daemon() produce warnings on compile stage
(in addition to erros on link stage).
2007-03-26 13:35:09 +00:00
Denis Vlasenko
bb7fcb4229
libbb: rework NOMMU helper API so that it makes more sense
...
and easier to use. Doesn't compile - need two more commits.
2007-03-26 13:20:04 +00:00
Denis Vlasenko
cad04ef4f3
add NOMMU fixme's; move move_fd from runit_lib to libbb; nuke fd_copy
2007-03-25 23:21:05 +00:00
Bernhard Reutner-Fischer
10f8f5f443
- rough prototype for split(1). TODO: Still needs some love since it's way too big..
...
text data bss dec hex filename
602 4 0 606 25e coreutils/split.o
2007-03-25 21:50:18 +00:00
Denis Vlasenko
8a503be840
#ifdef out re_execed on MMU machines
2007-03-24 16:13:33 +00:00
Denis Vlasenko
1fc6e56684
SELinux: load_policy applet
2007-03-24 15:37:57 +00:00
Denis Vlasenko
d3bac03988
dnsd: fix several buglets, make smaller
2007-03-24 12:13:04 +00:00
Denis Vlasenko
9067f13be0
NOMMU re-exec trick shuld not depend on existence of "don't daemonize"
...
option for every affected applet (and dnsd, for example, don't have one).
Thus rework re-exec support to not require it. Code got smaller too.
2007-03-24 12:11:17 +00:00
Denis Vlasenko
9a1fa8cf07
cmp: support 3rd and 4th arguments if DESKTOP=y (needed for gcc build)
2007-03-21 22:30:14 +00:00
Denis Vlasenko
c86e052b81
fix accumulated whitespace and indentation damage
2007-03-20 11:30:28 +00:00
Bernhard Reutner-Fischer
be862096c0
- be gentle to the intel compiler and make sure we have __u64 which is needed for linux/loop.h
2007-03-19 15:15:06 +00:00
Denis Vlasenko
4b4b619c9c
include <stddef.h> so that ptrdiff_t is again available
2007-03-18 20:33:26 +00:00
Denis Vlasenko
081ef799fa
random fixes to help text
2007-03-17 16:38:21 +00:00
Mike Frysinger
75acbe322c
punt useless header as pointed out by src.obsolete.headers
2007-03-17 06:27:38 +00:00
Denis Vlasenko
bff32ce4d5
gzip: Improve ptr_to_globals trick, allowing gcc
...
to optimize better. -480 bytes.
2007-03-15 19:48:35 +00:00
Denis Vlasenko
1cc70225e7
networking/interface.c: was doing really strange caching of fd's
...
open for getting ifconfig data - ??! Simplified all that. -200 bytes.
2007-03-15 19:46:43 +00:00
Denis Vlasenko
972288e62f
modify ptr_to_globals trick so that we do not violate
...
type safety (well, sort of ;))
2007-03-15 00:57:01 +00:00
Denis Vlasenko
7f2527e5a7
arp, networking/interface.c: eliminate statics
...
and unneeded on-stack buffers, disable (comment out)
some apparently unused (and buggy) code paths. -700 bytes.
2007-03-14 22:11:20 +00:00
Denis Vlasenko
6ef06eeed4
stop using big static buffer for inode hash
2007-03-14 22:06:01 +00:00
Bernhard Reutner-Fischer
26a8016da6
- change option -c to -Z to match newer upstream SElinux conventions
2007-03-14 08:52:28 +00:00
Denis Vlasenko
fe42d17318
gzip: bbunzip integration fixes
2007-03-14 00:08:28 +00:00
Denis Vlasenko
39c651e909
introduce and use setfscreatecon_or_die
...
(patch by Yuichi Nakamura <ynakam@hitachisoft.jp>)
runcon: *yet another* fix for vda's brainfart :(
2007-03-12 18:22:55 +00:00
Denis Vlasenko
1203c9bf2f
next portion of selinux updates: chcon, runcon. From
...
Yuichi Nakamura <himainu-ynakam@miomio.jp>
KaiGai Kohei <busybox@kaigai.gr.jp>
2007-03-11 22:16:02 +00:00
Denis Vlasenko
49622d7846
selinux support by Yuichi Nakamura <ynakam@hitachisoft.jp> (HitachiSoft)
2007-03-10 16:58:49 +00:00
Bernhard Reutner-Fischer
71bc71a7dc
- add chrt applet.
...
text data bss dec hex filename
769 0 0 769 301 miscutils/chrt.o
and could use some further shrinkage
2007-03-09 16:56:38 +00:00
Denis Vlasenko
02f0c4c2bf
diff: failed to confirm "static bug" in gcc - reinstating statics.
...
microscopic code improvements.
2007-03-09 10:08:53 +00:00
Denis Vlasenko
673d4bbab6
hwclock: support /dev/rtc0 etc
2007-03-07 23:02:50 +00:00