Denys Vlasenko
2a81639534
ls: reduce memory consumption and speed up (don't do redundant [l]stat)
...
function old new delta
my_stat 110 278 +168
splitdnarray 120 118 -2
ls_main 769 765 -4
list_single 961 931 -30
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 1/3 up/down: 168/-36) Total: 132 bytes
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-05-13 17:28:09 +02:00
Denys Vlasenko
66ca241dca
ls: avoid forward declaration. No code changes
...
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-05-13 17:27:36 +02:00
Denys Vlasenko
d27ac299eb
ls: code shrink
...
function old new delta
list_single 990 961 -29
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-05-13 17:27:15 +02:00
Denys Vlasenko
3a240212d9
passwd: shorter help text
...
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-05-13 03:31:45 +02:00
Denys Vlasenko
12a432715f
adduser: safe username passing to passwd/addgroup
...
passwd: support creating SHA passwords
random code shrink
function old new delta
crypt_make_pw_salt - 87 +87
adduser_main 883 904 +21
...
crypt_make_salt 99 89 -10
chpasswd_main 329 312 -17
packed_usage 28731 28691 -40
passwd_main 1070 1000 -70
cryptpw_main 310 224 -86
------------------------------------------------------------------------------
(add/remove: 1/0 grow/shrink: 4/12 up/down: 154/-288) Total: -134 bytes
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-05-13 03:19:01 +02:00
Denys Vlasenko
0806e401d6
hush: install signal handlers with filled sigmask
...
function old new delta
install_sighandler - 39 +39
hush_main 1001 1031 +30
builtin_trap 386 392 +6
install_sighandlers 121 123 +2
switch_off_special_sigs 87 86 -1
------------------------------------------------------------------------------
(add/remove: 1/0 grow/shrink: 3/1 up/down: 77/-1) Total: 76 bytes
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-05-12 23:06:20 +02:00
Denys Vlasenko
b1ab283f0b
inetd: add FIXMEs
...
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-05-12 23:05:27 +02:00
Denys Vlasenko
89f5bfd6c3
libbb.h: use inlined sigfillset, sigemptyset, sigisemptyset on uclibc
...
text data bss dec hex filename
875879 493 7584 883956 d7cf4 busybox_old
875879 493 7584 883956 d7cf4 busybox_unstripped
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-05-12 23:03:18 +02:00
Denys Vlasenko
279a7ac04e
ls: fix help text: -w N is optional
...
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-05-12 18:44:51 +02:00
Denys Vlasenko
4ad95e6b0e
ls: fix -p help text, improve comments and define names
...
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-05-12 18:40:59 +02:00
Denys Vlasenko
75e77deab1
hush: fixes and small shrink for HUSH_JOB!=y
...
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-05-12 13:12:47 +02:00
Denys Vlasenko
ebc1ee2e2a
hush: remove one sigprocmask from exit path
...
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-05-12 10:59:18 +02:00
Denys Vlasenko
0c40a731e3
hush: add forgotten {} in multi-statement if.
...
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-05-12 09:50:12 +02:00
Denys Vlasenko
0a8971d112
trim help text
...
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-05-12 03:14:12 +02:00
Denys Vlasenko
f58f705c58
hush: fix login shell's signal handling; add -l option so that it's easier to test
...
function old new delta
hush_main 958 1001 +43
install_special_sighandlers 47 52 +5
packed_usage 28752 28741 -11
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 2/1 up/down: 48/-11) Total: 37 bytes
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-05-12 02:10:33 +02:00
Denys Vlasenko
9d6cbafe72
hush: replace signal handling machinery
...
With new version of signal handling, read builtin should be less buggy
wrt signals.
function old new delta
install_sighandlers - 121 +121
switch_off_special_sigs - 84 +84
pick_sighandler - 58 +58
install_special_sighandlers - 47 +47
builtin_wait 284 319 +35
record_pending_signo - 21 +21
execvp_or_die 43 48 +5
file_get 290 288 -2
run_list 1004 998 -6
static.zero_timespec 8 - -8
sigprocmask_set 14 - -14
sigwaitinfo 23 - -23
record_signal 23 - -23
__GI_sigwaitinfo 23 - -23
sigtimedwait 25 - -25
builtin_trap 417 392 -25
__GI_sigtimedwait 25 - -25
hush_main 1003 965 -38
check_and_run_traps 263 217 -46
__rt_sigtimedwait 52 - -52
reset_traps_to_defaults 213 126 -87
init_sigmasks 198 - -198
builtin_read 536 197 -339
------------------------------------------------------------------------------
(add/remove: 5/10 grow/shrink: 2/7 up/down: 371/-934) Total: -563 bytes
text data bss dec hex filename
903075 936 17736 921747 e1093 busybox_old
902547 936 17736 921219 e0e83 busybox_unstripped
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-05-11 23:56:11 +02:00
Denys Vlasenko
10c0131a8a
hush: use SA_RESTARTed signal handlers across read.
...
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-05-11 11:49:21 +02:00
Denys Vlasenko
12bc152b31
fbset: abort on unknown options. closes 3121
...
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-05-09 03:57:27 +02:00
Steve Iribarne
ed607a87e0
pam link error with SHARED_BUSYBOX and LIBBUSYBOX enabled
...
Signed-off-by: Steve Iribarne <siribarne@grid-net.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-05-09 01:42:12 +02:00
Denys Vlasenko
bcf1fa80f3
hush: add tests for interrupting read
...
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-05-09 01:05:33 +02:00
Denys Vlasenko
54e9e1217c
hush: code shrink
...
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-05-09 00:52:15 +02:00
Denys Vlasenko
80542bad2f
hush: make read builtin interruptible.
...
function old new delta
builtin_read 185 471 +286
check_and_run_traps 200 262 +62
nonblock_immune_read 73 119 +46
sigismember - 44 +44
record_signal - 21 +21
sigisemptyset - 16 +16
...
------------------------------------------------------------------------------
(add/remove: 5/0 grow/shrink: 7/5 up/down: 483/-46) Total: 437 bytes
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-05-08 21:23:43 +02:00
Denys Vlasenko
80c5b6893d
libbb: nonblock_safe_read->nonblock_immune_read, remove unused param of xmalloc_reads
...
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-05-08 21:21:10 +02:00
Denys Vlasenko
b8709032a3
hush: fix incorrect PS2 dispaly and trap handling while reading command
...
The fix affects only !ENABLE_FEATURE_EDITING configuration
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-05-08 21:20:01 +02:00
Maksym Kryzhanovskyy
29c54aa9f9
iostat: code shrink ~0.5k
...
Signed-off-by: Maksym Kryzhanovskyy <xmaks@email.cz>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-05-07 04:37:22 +02:00
Denys Vlasenko
c3f8db99bf
preparatory patch
...
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-05-07 04:36:46 +02:00
Denys Vlasenko
4d6059eedc
top: another scripting improvement
...
function old new delta
handle_input 492 493 +1
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-05-06 20:47:54 +02:00
Denys Vlasenko
7d9a1d25e5
top: make it possible to feed commands via pipe
...
function old new delta
handle_input - 492 +492
mult_lvl_cmp 38 49 +11
packed_usage 28247 28257 +10
top_main 1345 928 -417
------------------------------------------------------------------------------
(add/remove: 1/0 grow/shrink: 2/1 up/down: 513/-417) Total: 96 bytes
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-05-06 20:34:04 +02:00
Denys Vlasenko
a348b4557d
traceroute: properly reduce poll timeout
...
This removes the problem where during the time we wait to declare
a target as unresponsive we receive an unrelated ICMP packet.
If there is enough traffic, this can make traceroute hang as
it never declares the target as unresponsive.
function old new delta
common_traceroute_main 4196 4261 +65
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-05-05 02:31:30 +02:00
Pascal Bellard
d3e4be3ccb
sed: shrink by 17 bytes
...
Signed-off-by: Pascal Bellard <pascal.bellard@ads-lu.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-05-05 00:26:37 +02:00
Denys Vlasenko
14b162f9ab
tweak examples/udhcp/udhcpd.conf
...
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-05-04 21:17:23 +02:00
Denys Vlasenko
9180c6045e
tar: store negative mtime as 0; pack very large files using base-256 encoding
...
function old new delta
writeTarHeader 841 979 +138
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-05-04 21:14:12 +02:00
Bernhard Reutner-Fischer
882062915d
mount: for NFS use tcp per default rather than udp
...
nfs-utils's mount.nfs uses TCP per default unless explicitly asked for
otherwise. This is also the expected behaviour for NFSv4, so ok there,
too.
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2011-05-04 19:03:30 +02:00
Denys Vlasenko
7945808c87
udhcp: fix some default values from "" to NULL
...
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-05-03 16:46:47 +02:00
Denys Vlasenko
6a0abcc02f
sed: support \r in s command
...
function old new delta
copy_parsing_escapes 65 91 +26
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-05-03 00:52:22 +02:00
Denys Vlasenko
52d8370836
sed: code shrink
...
text data bss dec hex filename
876354 493 7584 884431 d7ecf busybox_old
876323 493 7584 884400 d7eb0 busybox_unstripped
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-05-03 00:51:43 +02:00
Wolfgang Denk
91b77c3953
Compile options: default to -O2 when -Os is not available
...
Recent versions of GCC for PowerPC systems suffer from some compiler
bugs which prevent the use of "--enable-target-optspace" in their
configuration, which makes the compiler option "-Os" unavailable;
for reference see
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43810
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48278
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45053
In the result, BusyBox will be compiled without any optimization
options, which causes a huge binary (1.8 MiB for default configuration
on PPC, built with gcc 54.51 from the Yocto / Poky / OpenEmbedded tool
chains). This commit changes behaviour so "-O2" gets used as fallback
when "-Os" is not available. This reduces the image size in above
test to 1.3 MiB. This is still 10...15% more then what we get with
"-Os", but much better than using no optimization at all.
Signed-off-by: Wolfgang Denk <wd@denx.de>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-05-02 02:50:46 +02:00
Denys Vlasenko
90ea1e3454
setserial: small fix
...
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-05-02 02:47:25 +02:00
Cristian Ionescu-Idbohrn
fcbc641fe3
get rid of several "variable 'x' set but not used" warnings
...
Signed-off-by: Cristian Ionescu-Idbohrn <cii@axis.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-05-01 14:43:53 +02:00
Marek Bečka
2cfb57647b
setserial: new applet
...
text data bss dec hex filename
873605 493 7584 881682 d7412 busybox_old
876354 493 7584 884431 d7ecf busybox_unstripped
Signed-off-by: Marek Bečka <yuen@klacno.sk>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-05-01 14:38:31 +02:00
Marek Polacek
2a6d5988b4
mpstat.c: remove unused line
...
Signed-off-by: Marek Polacek <mpolacek@redhat.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-04-30 22:09:01 +02:00
Lauri Kasanen
9cfcc4d7a2
fdisk: backport disk check from util-linux
...
With the digit check devices like mmcblk0 were skipped,
but now with 0 allowed we're seeing a ton of loop devices listed
(loop0, loop10, loop20...) as well as ramzswap0,
all which should not be shown in fdisk -l.
function old new delta
list_devs_in_proc_partititons 157 238 +81
Signed-off-by: Lauri Kasanen <curaga@operamail.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-04-30 21:31:05 +02:00
Denys Vlasenko
d1993f180c
rename miscutils/ubi_attach_detach.c -> miscutils/ubi_tools.c
...
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-04-26 04:32:05 +02:00
Denys Vlasenko
0bfb9c2cf0
add help text
...
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-04-26 04:31:03 +02:00
Reuben Dowle
a610842322
ubiupdatevol: new applet
...
ubi_tools_main 658 1046 +388
packed_usage 28274 28304 +30
applet_names 2396 2409 +13
applet_main 1396 1400 +4
applet_nameofs 698 700 +2
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 5/0 up/down: 437/0) Total: 437 bytes
Signed-off-by: Reuben Dowle <Reuben.Dowle@navico.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-04-26 04:27:48 +02:00
Reuben Dowle
ab940af5c0
Fix ubirsvol usage information
...
The usage information for the ubirsvol applet is incorrect. This fixes the mistake.
Signed-off-by: Reuben Dowle <Reuben.Dowle@navico.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-04-26 03:43:25 +02:00
Nigel Hathaway
fb6b173ff7
udhcp: add FEATURE_UDHCP_8021Q option
...
function old new delta
dhcp_option_strings 217 237 +20
dhcp_optflags 64 68 +4
Signed-off-by: Nigel Hathaway <Nigel.Hathaway@ubiquisys.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-04-26 02:50:00 +02:00
Nigel Hathaway
c37d4c67e8
dhcpc: export unrecognized options in "optNN=XXXXXXXXX" form
...
function old new delta
udhcp_run_script 609 818 +209
Signed-off-by: Nigel Hathaway <Nigel.Hathaway@ubiquisys.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-04-26 02:38:29 +02:00
Denys Vlasenko
b83c970412
build fixes for scripts/kconfig
...
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-04-18 01:19:59 +02:00
Denys Vlasenko
cfbd31a7fb
add include <sys/socket.h>
...
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-04-17 23:18:15 +02:00