Denis Vlasenko
fb1642f2ca
fix up callsites of config_read to check for >= 0
2008-07-16 23:04:49 +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
ad6d6ffcdc
libbb: shrink print_login_issue (by Vladimir Dronnikov)
...
function old new delta
print_login_issue 469 435 -34
2008-07-12 23:47:24 +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
0e52541917
taskset: fix some careless code in both fancy and non-fancy cases.
...
-5 bytes for fancy, +5 for non-fancy
2008-07-11 13:57:08 +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
96c45b0e0b
libbb/mtab: fix xrealloc_vector fallout
2008-07-09 19:44:08 +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
dbef1173b0
add xrealloc_vector.c
2008-07-08 20:41:57 +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
d48e81f0cd
mdev: do not follow symlinks in /sys (as was intended prior to rev 18811).
...
If this breaks things, please document why!
mdev,init: use shared code for fd sanitization
function old new delta
bb_daemonize_or_rexec 155 172 +17
mdev_main 500 505 +5
init_main 907 856 -51
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 2/1 up/down: 22/-51) Total: -29 bytes
2008-07-06 07:00:11 +00:00
Denis Vlasenko
a60f84ebf0
*: rename ATTRIBUTE_XXX to just XXX.
2008-07-05 09:18:54 +00:00
Denis Vlasenko
a8a3b497fc
libbb/recursive_action.c: fix slight error in prev commit
2008-07-04 10:29:30 +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
49b5c516b5
add missing file
2008-07-01 10:55:45 +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
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
78ff8197cc
lineedit: document prompt handling
2008-06-28 21:03:43 +00:00
Denis Vlasenko
9579d87be4
fix FAST_FUNC fallout
2008-06-28 04:58:55 +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
9092f754bd
print_flags: fix trivial thinko
...
vi: fix reversed checks for underflow
2008-06-26 22:40:02 +00:00
Denis Vlasenko
2649f215ae
open_transformer: fix bug of calling exit instead of _exit
...
open_transformer: don't leak compressed descriptor anymore
recursive_action: tiny shrink
2008-06-26 03:26:57 +00:00
Denis Vlasenko
21278dff70
busybox: do not print help to fd 2, print it to fd 1
...
otherwise this can break scripts
2008-06-25 12:15:46 +00:00
Denis Vlasenko
fe733a9744
changes in comments only
2008-06-24 16:08:22 +00:00
Denis Vlasenko
cc3f20b9bd
fix breakage found by randomconfig
2008-06-23 22:31:52 +00:00
Denis Vlasenko
1363f0df15
strrchr: actually, last one was finding "" in "any" at pos 0,
...
should find at pos LAST...
2008-06-18 20:01:12 +00:00
Denis Vlasenko
d5736c5607
strrchr: bikeshed painting time!
...
replace cubic running time implementation with quadratic
make embedded test actually readable
function old new delta
strrstr 42 44 +2
2008-06-18 19:49:46 +00:00
Bernhard Reutner-Fischer
4954d47ab0
- fixes from Tito
2008-06-18 08:32:25 +00:00
Bernhard Reutner-Fischer
619b87dfa5
- fix includes
2008-06-17 12:45:39 +00:00
Bernhard Reutner-Fischer
13436ea0dd
- improved strrstr impl from vda with testcases from Tito and vda
2008-06-17 12:11:34 +00:00
Denis Vlasenko
f45c4f41b7
whitespace and comment fixes, no code changes
2008-06-16 04:09:25 +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
5cdc247ba4
further encrypt_des optimizations
...
function old new delta
pw_encrypt 943 964 +21
des_crypt 1512 1509 -3
u_sbox 512 256 -256
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 1/2 up/down: 21/-259) Total: -238 bytes
2008-06-15 09:48:18 +00:00
Denis Vlasenko
04087c6bbd
cryptpw: fix "cryptpw -a des -- TEXT" case
...
libbb/pw_encrypt_des.c: optimize
function old new delta
cryptpw_main 177 157 -20
des_crypt 1682 1512 -170
pw_encrypt 1036 842 -194
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 0/3 up/down: 0/-384) Total: -384 bytes
Run tested.
2008-06-15 08:12:00 +00:00
Denis Vlasenko
d50dda8c35
*: use llist_pop for traverse-and-free list operation
...
function old new delta
append_file_list_to_list 109 111 +2
udhcpc_main 2414 2413 -1
run_parts_main 325 324 -1
od_main 2324 2323 -1
getopt_main 709 707 -2
env_main 253 251 -2
sed_main 659 656 -3
ps_main 522 519 -3
traceroute_main 3960 3954 -6
sort_main 844 838 -6
diff_main 866 858 -8
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 1/10 up/down: 2/-33) Total: -31 bytes
2008-06-15 05:40:56 +00:00
Denis Vlasenko
e235285c3a
crypt: code shrink
...
function old new delta
des_crypt - 1682 +1682
md5_crypt - 627 +627
pw_encrypt 3608 1036 -2572
------------------------------------------------------------------------------
(add/remove: 2/0 grow/shrink: 0/1 up/down: 2309/-2572) Total: -263 bytes
2008-06-14 22:11:29 +00:00
Denis Vlasenko
a1767a1f5d
dos2unix: do not destroy symlinks and mode of the file being converted.
2008-06-14 04:28:41 +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
76f812803b
trivial crypt shrinkage
...
function old new delta
__md5_to64 27 29 +2
pw_encrypt 3631 3608 -23
2008-06-13 15:13:41 +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
09c0a749a1
define CLOCK_MONOTONIC to 1 if it is not defined
2008-06-07 23:43:43 +00:00
Denis Vlasenko
dd6f570fa3
add libbb/print_flags.c...
2008-06-07 15:11:08 +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
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
d12fcc20da
libiproute: fix option parsing, so that "ip -o link" works again.
...
closes bug 3524
2008-05-31 07:34:14 +00:00
Bernhard Reutner-Fischer
17282292c2
- add strrchr
2008-05-28 14:19:27 +00:00
Denis Vlasenko
b267ed95bc
lineedit: correctly handle prompt longer than screen width. closes bug 3414
2008-05-25 21:52:03 +00:00
Denis Vlasenko
e9b76e1f1e
dnsd: fixes various segfaults.
...
One was a lib api change that was not updated and another
is a stack buffer overflow.
It also adds support for '*' in dnsd.conf. It resolves all hostnames to
a specific ip address. This is useful if you for example want redirect
all http traffic to your first-boot-web-wizard on you router/firewall.
By Timo Teras
2008-05-22 17:41:01 +00:00
Bernhard Reutner-Fischer
5e25ddb7d3
- use STD*_FILENO some more. No object-code changes
2008-05-19 09:48:17 +00:00
Bernhard Reutner-Fischer
636a1f85e8
- use EXIT_{SUCCESS,FAILURE}. No object-code changes
2008-05-19 09:29:47 +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
5599502a55
more -Wall warning fixes. -Wall is enabled now.
2008-05-18 22:28:26 +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
77ad97f199
more -Wall warning fixes from Cristian Ionescu-Idbohrn.
...
This time it resulted in small code changes:
function old new delta
nexpr 820 828 +8
tail_main 1200 1202 +2
wrapf 166 167 +1
parse_mount_options 227 209 -18
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 3/1 up/down: 11/-18) Total: -7 bytes
2008-05-13 02:27:31 +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
10f6fb1d46
fix build failure for libbusybox
2008-04-29 00:10:27 +00:00
Denis Vlasenko
16afa38a7b
libbb: fix wrong sscanf count check (affects pidof etc)
2008-04-25 23:20:25 +00:00
Denis Vlasenko
2c84495184
lineedit: hack for making it sort-of-work even if term width is wrong
...
function old new delta
read_line_input 3158 3153 -5
input_end 29 24 -5
input_delete 115 110 -5
input_forward 27 20 -7
cmdedit_set_out_char 88 80 -8
2008-04-25 18:44:35 +00:00
Bernhard Reutner-Fischer
15ce7f5b58
- bump copyright year
2008-04-24 10:35:50 +00:00
Denis Vlasenko
b520271f65
lineedit: filename completion on symlinks-to-dirs should add / too
2008-04-24 04:42:52 +00:00
Denis Vlasenko
765c1c3c31
getopt32: fix "tar x" case; fix memory leak
2008-04-23 07:22:31 +00:00
Denis Vlasenko
be002adb2f
add forgotten files. I am forgetting it all the time :(
2008-04-22 18:07:41 +00:00
Denis Vlasenko
5d89fbaa2e
*: remove remaining instances of ".data" hack
2008-04-22 00:08:27 +00:00
Denis Vlasenko
9137341851
getopt32: fix recently broken opt_complementary "--"
2008-04-21 22:04:21 +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
0a1446275d
xmalloc_open_read_close: use fstat to get file size (instead of lseek).
...
by Joakim Tjernlund <Joakim.Tjernlund AT transmode.se>
function old new delta
xmalloc_open_read_close 190 181 -9
2008-04-20 14:45:43 +00:00
Denis Vlasenko
25cfe4996e
libbb: prevent xmalloc_open_read_close from dying on seek failure
...
start_stop_daemon: use open_read_close instead of xmalloc_open_read_close
start_stop_daemon: use local structure instead of global one
function old new delta
check 1620 1661 +41
xmalloc_open_read_close 171 190 +19
start_stop_daemon_main 976 954 -22
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 2/1 up/down: 60/-22) Total: 38 bytes
2008-04-20 01:27: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
6c10657c4a
style fixes. no code changes
2008-04-19 19:05:12 +00:00
Denis Vlasenko
867bd37c7f
fix english in comment
2008-04-13 02:27:39 +00:00
Denis Vlasenko
7465dbcf2a
ash: speed up NOFORK code in ash by eliminating second find_applet().
...
some code reduction along the way.
function old new delta
run_list 1971 1981 +10
run_nofork_applet_prime 181 182 +1
unsetcmd 97 96 -1
delete_cmd_entry 54 53 -1
describe_command 399 397 -2
cmdlookup 152 150 -2
evaltreenr 602 599 -3
evaltree 602 599 -3
clearcmdentry 101 98 -3
cdcmd 675 672 -3
hashcmd 305 301 -4
find_command 933 910 -23
evalcommand 1371 1229 -142
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 2/11 up/down: 11/-187) Total: -176 bytes
2008-04-13 02:25:53 +00:00
Denis Vlasenko
93b8263652
fix build with gcc -combine
2008-04-11 11:27:29 +00:00
Denis Vlasenko
858ebf130a
actually adding xfuncs_printf.c :(
2008-04-09 00:33:53 +00:00
Denis Vlasenko
b12b1c87b5
Splitting xfuncs.c into two parts. No code chabges.
2008-04-09 00:33:23 +00:00
Denis Vlasenko
79cedcb2c0
Avoid linking in printf/bsearch if possible. -20k for static bbox with
...
"basename", "true" and "false" only.
function old new delta
full_write2_str - 25 +25
bb_show_usage 183 202 +19
main 883 898 +15
run_applet_and_exit 501 507 +6
2008-04-08 21:13:28 +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
0edbdd8ac8
xfunc_die: resurrect (actually, it's "svn add" being forgotten again)
2008-04-01 17:43:03 +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
b9ad75fa60
copy_file: handle "cp /dev/foo file" (almost) compatibly to coreutils.
...
(almost because we do not copy mode, which is probably wasn't intended).
+61 bytes.
2008-03-28 17:49:31 +00:00
Denis Vlasenko
2570b2e575
whitespace fixes
2008-03-28 01:00:09 +00:00
Denis Vlasenko
cf26ab70c1
mdev: plug a few memory and fd leaks; simplify code a bit
2008-03-27 22:45:44 +00:00
Denis Vlasenko
8ee649a02e
*: more uniform naming: s/xmalloc_getline/xmalloc_fgetline/
2008-03-26 20:04:27 +00:00
Denis Vlasenko
08ec67bc62
patch: add support for -R. ~ +110 byte. By Pascal Bellard <pascal.bellard AT ads-lu.com>
...
fbsplash: new applet by Michele Sanges <michele.sanges AT otomelara.it
function old new delta
fbsplash_main - 1525 +1525
fb_drawfullrectangle - 118 +118
static.param_value - 100 +100
packed_usage 23776 23872 +96
applet_names 1843 1852 +9
applet_main 1120 1124 +4
read_line_input 3156 3158 +2
applet_nameofs 560 562 +2
applet_install_loc 140 141 +1
------------------------------------------------------------------------------
(add/remove: 3/0 grow/shrink: 6/0 up/down: 1857/0) Total: 1857 bytes
text data bss dec hex filename
799233 641 7380 807254 c5156 busybox_old
801202 641 7380 809223 c5907 busybox_unstripped
2008-03-26 13:32:30 +00:00
Denis Vlasenko
c693840fe8
*: whitespace fixes, no code changes
2008-03-24 02:18:03 +00:00
Denis Vlasenko
0b6c6a9c9f
lpd: fix OOM vulnerability (was eating arbitrarily large commands)
2008-03-24 00:04:42 +00:00
Denis Vlasenko
9230582315
inetd: use change_identity().
...
libbb: shrink our internal initgroups().
httpd: remove stray 'else' and 'index_page = "index.html"'
function old new delta
httpd_main 750 743 -7
inetd_main 2033 2011 -22
bb_internal_initgroups 251 228 -23
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 0/3 up/down: 0/-52) Total: -52 bytes
2008-03-20 15:12:58 +00:00
Denis Vlasenko
104d544fd7
die_if_bad_username: shrink: 88 -> 77 bytes
2008-03-19 23:25:00 +00:00
Denis Vlasenko
dd5702d696
...and actually adding new file now...
2008-03-19 23:15:55 +00:00
Denis Vlasenko
a7d6c8bab9
adduser/addgroup: check username for invalid chars
...
(by Tito <farmatito AT tiscali.it>). +129 bytes when enabled.
2008-03-19 23:15:26 +00:00
Denis Vlasenko
d1277c6052
remove extra spaces in help text; delete duplicate #define
2008-03-17 09:37:24 +00:00