Denis Vlasenko
dcf6de552a
pscan: size optimization (Tito <farmatito@tiscali.it>)
2007-06-19 16:57:47 +00:00
Mike Frysinger
5b5bcf24f5
punt %.bflt target in favor of proper LDFLAGS=-Wl,-elf2flt handling
2007-06-19 15:58:02 +00:00
Denis Vlasenko
31789a81d5
top,ps: 'stringify' tty only when needed. -60 bytes.
2007-06-19 14:43:17 +00:00
Denis Vlasenko
362c6ec694
top: speedup if tty info is not requested
2007-06-19 13:53:12 +00:00
Denis Vlasenko
3afac4ce06
top,ps: reduce CPU usage in decimal conversion (optional)
...
text data bss dec hex filename
734651 3040 14416 752107 b79eb busybox_old
734751 3040 14416 752207 b7a4f busybox_unstripped
2007-06-19 13:46:24 +00:00
Denis Vlasenko
08a61180ce
ll_map: disable interface name caching code
...
function old new delta
find_by_index - 26 +26
static.icache 4 - -4
ll_idx_n2a 71 59 -12
static.ncache 16 - -16
ll_index_to_flags 40 24 -16
xll_name_to_index 206 104 -102
------------------------------------------------------------------------------
(add/remove: 1/2 grow/shrink: 0/3 up/down: 26/-150) Total: -124 bytes
text data bss dec hex filename
734703 3040 14440 752183 b7a37 busybox_old
734599 3040 14416 752055 b79b7 busybox_unstripped
2007-06-19 12:11:20 +00:00
Denis Vlasenko
2d25491ed0
defconfig: update
2007-06-19 11:33:48 +00:00
Denis Vlasenko
a61cb92f2d
make /etc/network parsing configurable. -200 bytes when off.
2007-06-19 11:24:47 +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
91e149a373
libbb: random hunt for statics
...
function old new delta
bb_askpass 306 321 +15
pw_encrypt 38 39 +1
static.passwd 64 4 -60
static.cipher 128 4 -124
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 2/2 up/down: 16/-184) Total: -168 bytes
# size busybox_old busybox_unstripped
text data bss dec hex filename
683705 2704 14240 700649 ab0e9 busybox_old
683721 2704 14064 700489 ab049 busybox_unstripped
2007-06-18 10:35:06 +00:00
Denis Vlasenko
2c91efb7c2
libpwdgrp/pwd_grp.c: allocate local storage on first call, not in bss. -1k bss
...
function old new delta
get_S - 31 +31
bb_internal_getpwnam 38 44 +6
bb_internal_getgrnam 38 44 +6
bb_internal_getgrgid 38 44 +6
ptr_to_statics - 4 +4
static.resultbuf 88 - -88
static.buffer 1024 - -1024
------------------------------------------------------------------------------
(add/remove: 2/2 grow/shrink: 3/0 up/down: 53/-1112) Total: -1059 bytes
2007-06-18 10:08:27 +00:00
Denis Vlasenko
7679145cfa
ping: fix write-after-allocated-mem bug
...
ping: use monotonic_us instead of gettimeofday: smaller code and
needs only 4 bytes in the packet
ping: display roundtrip times with 1/1000th of ms, not 1/10 ms precision.
wget: small optimization
function old new delta
pingstats 243 259 +16
sendping6 98 93 -5
sendping4 183 178 -5
.rodata 129715 129707 -8
progressmeter 867 855 -12
unpack_tail 320 272 -48
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 1/5 up/down: 16/-78) Total: -62 bytes
2007-06-18 08:55:57 +00:00
Mike Frysinger
ebd27aabaa
fix an obvious typo while trying to access the tv_usec member
2007-06-18 07:12:31 +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
e79dd06782
time: *const str = "xxx" ==> str[] = "xxx"
2007-06-17 19:04:58 +00:00
Denis Vlasenko
787d92645b
strings: strings a b was processing a twice, fix that
2007-06-17 12:19:07 +00:00
Denis Vlasenko
ea9e798004
arping: -i should be -I
2007-06-17 00:36:57 +00:00
Denis Vlasenko
a6163ca355
install: fix install a b /a/link/to/dir
...
install: fix -s (strip) option
nmeter: add TODO
2007-06-17 00:35:15 +00:00
Denis Vlasenko
ab47eeee6a
forgot svn add...
2007-06-16 20:52:33 +00:00
Denis Vlasenko
85532fc4d4
remove obsolete comment
2007-06-16 14:16:30 +00:00
Denis Vlasenko
a7825f269d
make FEATURE_HAVE_RPC auto-selectable by mount and inetd sub-features
2007-06-16 13:56:51 +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
Bernhard Reutner-Fischer
be99243945
- fix test -f ./exists
...
Note that test -f ./exists -a "-u" = "-u" doesn't work and did not work even before r18282, so this is a breakage not caused by me..
2007-06-15 10:36:49 +00:00
Bernhard Reutner-Fischer
867266059b
- vda perfers not to use the banner
2007-06-15 08:30:33 +00:00
Denis Vlasenko
432d69cb41
applets/Kbuild: straighten it a bit
2007-06-14 21:41:15 +00:00
Mike Frysinger
0e0639b702
Alex Landau writes: open firmware for reading, not writing
2007-06-14 09:29:48 +00:00
Denis Vlasenko
d8540f71ac
init: make sure fd 0,1,2 are not closed, + related optimizations.
...
init_main 929 920 -9
bb_daemonize_or_rexec 145 127 -18
2007-06-14 07:53:06 +00:00
Denis Vlasenko
1adf681e87
traceroute: stop using floating point needlessly; nuke useless assignment.
...
.rodata 129308 129312 +4
freehostinfo 35 29 -6
traceroute_main 4308 4300 -8
2007-06-14 07:47:52 +00:00
Denis Vlasenko
26017b1b04
minix.h: add very simple test script
2007-06-13 12:49:46 +00:00
Denis Vlasenko
1fd46215b2
fsck_minix: forgotten bit of previous commit...
2007-06-13 12:35:34 +00:00
Denis Vlasenko
a6691317e5
fsck_minix: stop using data/bss
...
10847 8 271 11126 2b76 busybox.t2/util-linux/fsck_minix.o
10140 0 0 10140 279c busybox.t3/util-linux/fsck_minix.o
2007-06-13 12:28: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
Mike Frysinger
b51fd3525e
as suggested by Renaud Cerrato and Souf, switch over to recursive_action() for some nice shrinkage and so we work even when CONFIG_SYSFS_DEPRECATED is off
2007-06-13 09:24:50 +00:00
Mike Frysinger
a78ef2ccf1
add support for firmware loading
2007-06-13 07:34:15 +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
637c975098
fix "--help prints usage for wrong applet" bug
2007-06-12 20:55:38 +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
Bernhard Reutner-Fischer
fdcbc4e709
- fix testing primary expressions like '"-u" = "-u"'
2007-06-12 13:21:08 +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
16d58d75ee
catv: was abusing xopen, should not die on err, but warn only.
2007-06-12 08:13:34 +00:00
Denis Vlasenko
cc5e090f12
move several applets to more correct ex-project. No code changes.
2007-06-12 08:12:33 +00:00
Denis Vlasenko
aa198dd39c
uudecode: nuke duplicate base64_table[]. saves 65 bytes
2007-06-12 07:24:11 +00:00
Denis Vlasenko
745119605e
top: on user suggestion make percentile calculations configurable. -56 bytes when off. +600 bytes when on
...
top: reorder columns, so that [P]PIDs are together and VSZ/%MEM are together. Makes more sense
2007-06-11 16:31:55 +00:00