Denis Vlasenko [Tue, 19 Jun 2007 13:46:24 +0000 (13:46 -0000)]
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
Denis Vlasenko [Tue, 19 Jun 2007 12:11:20 +0000 (12:11 -0000)]
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
Denis Vlasenko [Tue, 19 Jun 2007 11:33:48 +0000 (11:33 -0000)]
defconfig: update
Denis Vlasenko [Tue, 19 Jun 2007 11:24:47 +0000 (11:24 -0000)]
make /etc/network parsing configurable. -200 bytes when off.
Denis Vlasenko [Tue, 19 Jun 2007 11:12:46 +0000 (11:12 -0000)]
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
Denis Vlasenko [Tue, 19 Jun 2007 11:10:02 +0000 (11:10 -0000)]
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
Denis Vlasenko [Mon, 18 Jun 2007 10:35:06 +0000 (10:35 -0000)]
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
Denis Vlasenko [Mon, 18 Jun 2007 10:08:27 +0000 (10:08 -0000)]
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
Denis Vlasenko [Mon, 18 Jun 2007 08:55:57 +0000 (08:55 -0000)]
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
Mike Frysinger [Mon, 18 Jun 2007 07:12:31 +0000 (07:12 -0000)]
fix an obvious typo while trying to access the tv_usec member
Denis Vlasenko [Sun, 17 Jun 2007 23:40:26 +0000 (23:40 -0000)]
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
Denis Vlasenko [Sun, 17 Jun 2007 19:09:05 +0000 (19:09 -0000)]
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
Denis Vlasenko [Sun, 17 Jun 2007 19:04:58 +0000 (19:04 -0000)]
time: *const str = "xxx" ==> str[] = "xxx"
Denis Vlasenko [Sun, 17 Jun 2007 12:19:07 +0000 (12:19 -0000)]
strings: strings a b was processing a twice, fix that
Denis Vlasenko [Sun, 17 Jun 2007 00:36:57 +0000 (00:36 -0000)]
arping: -i should be -I
Denis Vlasenko [Sun, 17 Jun 2007 00:35:15 +0000 (00:35 -0000)]
install: fix install a b /a/link/to/dir
install: fix -s (strip) option
nmeter: add TODO
Denis Vlasenko [Sat, 16 Jun 2007 20:52:33 +0000 (20:52 -0000)]
forgot svn add...
Denis Vlasenko [Sat, 16 Jun 2007 14:16:30 +0000 (14:16 -0000)]
remove obsolete comment
Denis Vlasenko [Sat, 16 Jun 2007 13:56:51 +0000 (13:56 -0000)]
make FEATURE_HAVE_RPC auto-selectable by mount and inetd sub-features
Denis Vlasenko [Sat, 16 Jun 2007 13:37:59 +0000 (13:37 -0000)]
pscan: new applet (portscanner). ~1350 bytes. By Tito <farmatito@tiscali.it>
wget: lift 256 chars limitation on terminal width
Denis Vlasenko [Sat, 16 Jun 2007 00:30:52 +0000 (00:30 -0000)]
find: make -size match GNU find
Denis Vlasenko [Fri, 15 Jun 2007 23:43:11 +0000 (23:43 -0000)]
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
Denis Vlasenko [Fri, 15 Jun 2007 21:17:21 +0000 (21:17 -0000)]
fdisk: fix minor issues with help text
Bernhard Reutner-Fischer [Fri, 15 Jun 2007 10:36:49 +0000 (10:36 -0000)]
- 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..
Bernhard Reutner-Fischer [Fri, 15 Jun 2007 08:30:33 +0000 (08:30 -0000)]
- vda perfers not to use the banner
Denis Vlasenko [Thu, 14 Jun 2007 21:41:15 +0000 (21:41 -0000)]
applets/Kbuild: straighten it a bit
Mike Frysinger [Thu, 14 Jun 2007 09:29:48 +0000 (09:29 -0000)]
Alex Landau writes: open firmware for reading, not writing
Denis Vlasenko [Thu, 14 Jun 2007 07:53:06 +0000 (07:53 -0000)]
init: make sure fd 0,1,2 are not closed, + related optimizations.
init_main 929 920 -9
bb_daemonize_or_rexec 145 127 -18
Denis Vlasenko [Thu, 14 Jun 2007 07:47:52 +0000 (07:47 -0000)]
traceroute: stop using floating point needlessly; nuke useless assignment.
.rodata 129308 129312 +4
freehostinfo 35 29 -6
traceroute_main 4308 4300 -8
Denis Vlasenko [Wed, 13 Jun 2007 12:49:46 +0000 (12:49 -0000)]
minix.h: add very simple test script
Denis Vlasenko [Wed, 13 Jun 2007 12:35:34 +0000 (12:35 -0000)]
fsck_minix: forgotten bit of previous commit...
Denis Vlasenko [Wed, 13 Jun 2007 12:28:21 +0000 (12:28 -0000)]
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
Denis Vlasenko [Wed, 13 Jun 2007 12:27:17 +0000 (12:27 -0000)]
*: 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
Mike Frysinger [Wed, 13 Jun 2007 09:24:50 +0000 (09:24 -0000)]
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
Mike Frysinger [Wed, 13 Jun 2007 07:34:15 +0000 (07:34 -0000)]
add support for firmware loading
Denis Vlasenko [Wed, 13 Jun 2007 06:47:47 +0000 (06:47 -0000)]
hush: fix read builtin to not read ahead past eol and to not use
insane amounts of stack. Testsuite updated.
Denis Vlasenko [Tue, 12 Jun 2007 22:35:19 +0000 (22:35 -0000)]
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
Denis Vlasenko [Tue, 12 Jun 2007 22:04:57 +0000 (22:04 -0000)]
login: make /etc/nologin support configurable. -240 bytes if not selected.
Denis Vlasenko [Tue, 12 Jun 2007 20:55:38 +0000 (20:55 -0000)]
fix "--help prints usage for wrong applet" bug
Denis Vlasenko [Tue, 12 Jun 2007 20:54:54 +0000 (20:54 -0000)]
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
Bernhard Reutner-Fischer [Tue, 12 Jun 2007 13:21:08 +0000 (13:21 -0000)]
- fix testing primary expressions like '"-u" = "-u"'
Denis Vlasenko [Tue, 12 Jun 2007 08:52:02 +0000 (08:52 -0000)]
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
Denis Vlasenko [Tue, 12 Jun 2007 08:13:34 +0000 (08:13 -0000)]
catv: was abusing xopen, should not die on err, but warn only.
Denis Vlasenko [Tue, 12 Jun 2007 08:12:33 +0000 (08:12 -0000)]
move several applets to more correct ex-project. No code changes.
Denis Vlasenko [Tue, 12 Jun 2007 07:24:11 +0000 (07:24 -0000)]
uudecode: nuke duplicate base64_table[]. saves 65 bytes
Denis Vlasenko [Mon, 11 Jun 2007 16:31:55 +0000 (16:31 -0000)]
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
Bernhard Reutner-Fischer [Mon, 11 Jun 2007 15:09:21 +0000 (15:09 -0000)]
- use bb_msg_full_version instead of a separate string. Saves a minor 3 bytes.
Denis Vlasenko [Sun, 10 Jun 2007 19:29:37 +0000 (19:29 -0000)]
getopt_mk_fifo_nod: heed warning
Denis Vlasenko [Sun, 10 Jun 2007 18:04:54 +0000 (18:04 -0000)]
top: improve global CPU percentage (smaller & faster code)
Denis Vlasenko [Sun, 10 Jun 2007 17:11:59 +0000 (17:11 -0000)]
top: add config option and code for global CPU % display
Denis Vlasenko [Sun, 10 Jun 2007 15:08:44 +0000 (15:08 -0000)]
moved biggest stack buffers to malloc space, or made their size configurable
(8k of shell line edit buffer is an overkill)
# make ARCH=i386 bloatcheck
function old new delta
read_line_input 3933 3967 +34
ifaddrlist 348 345 -3
do_loadfont 208 191 -17
edit_file 840 819 -21
.rodata 129112 129080 -32
uncompress 1305 1268 -37
loadfont_main 566 495 -71
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 1/6 up/down: 34/-181) Total: -147 bytes
Denis Vlasenko [Sun, 10 Jun 2007 00:54:27 +0000 (00:54 -0000)]
add script which measures stack consumption.
Current top users:
0x08052f52 uncompress []: 393312
0x080c8a58 input_tab []: 82104
0x08092d5b ifaddrlist []: 32828
0x08056163 loadfont_main []: 32796
0x0806e508 colon []: 16532
0x08056095 do_loadfont []: 16400
0x0806da70 place_cursor []: 16388
0x080792e8 login_main []: 9176
393 kb of stack??? OMG...
Denis Vlasenko [Sat, 9 Jun 2007 23:49:05 +0000 (23:49 -0000)]
httpd: move data off bss.
httpd: do not realpath() for SCRIPT_FILENAME - it resolves symlinks
but it should not:
- /* SCRIPT_FILENAME required by PHP in CGI mode */
- if (!realpath(purl + 1, realpath_buff))
- goto error_execing_cgi;
- setenv1("SCRIPT_FILENAME", realpath_buff);
+
+ /* SCRIPT_FILENAME required by PHP in CGI mode */
+ fullpath = concat_path_file(home_httpd, purl);
+ setenv1("SCRIPT_FILENAME", fullpath);
Bernhard Reutner-Fischer [Sat, 9 Jun 2007 09:12:45 +0000 (09:12 -0000)]
- also note where to checkout the 1_6_stable branch
Denis Vlasenko [Fri, 8 Jun 2007 16:18:15 +0000 (16:18 -0000)]
mdev: microscopic enhancement, should change nothing
Denis Vlasenko [Fri, 8 Jun 2007 15:41:27 +0000 (15:41 -0000)]
grep: selection done by FEATURE_GREP_EGREP_ALIAS was broken, fix.
(Maxime Bizon <mbizon@freebox.fr> (Freebox))
Denis Vlasenko [Fri, 8 Jun 2007 15:27:06 +0000 (15:27 -0000)]
login: ask passwords even for wrong usernames.
# size busybox_old busybox_unstripped
text data bss dec hex filename
680099 2704 15648 698451 aa853 busybox_old
680110 2704 15648 698462 aa85e busybox_unstripped
Denis Vlasenko [Fri, 8 Jun 2007 15:02:55 +0000 (15:02 -0000)]
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
Denis Vlasenko [Fri, 8 Jun 2007 13:05:39 +0000 (13:05 -0000)]
rmp: add optional support for bz2 data. +50 bytes of code
Bernhard Reutner-Fischer [Fri, 8 Jun 2007 12:52:17 +0000 (12:52 -0000)]
- fix invocation without any argument
Denis Vlasenko [Fri, 8 Jun 2007 08:02:53 +0000 (08:02 -0000)]
hush: add missing dependencies (Maxime Bizon <mbizon@freebox.fr> (Freebox))
Denis Vlasenko [Fri, 8 Jun 2007 07:59:54 +0000 (07:59 -0000)]
test: fix thinko in previous commit
Denis Vlasenko [Fri, 8 Jun 2007 07:33:45 +0000 (07:33 -0000)]
test: recognize /path/to/[ case too
Bernhard Reutner-Fischer [Fri, 8 Jun 2007 07:19:06 +0000 (07:19 -0000)]
- Add a FAQ entry on "how do i cross compile busybox"
Bernhard Reutner-Fischer [Thu, 7 Jun 2007 13:22:56 +0000 (13:22 -0000)]
- add a config-time range check for IPC_SYSLOG_BUFFER_SIZE
The upper-bound doesn't look like it is working since it accepts LONG_MAX as input. I suspect that this is an lxdialog feature or something like that ;)
Denis Vlasenko [Thu, 7 Jun 2007 13:14:53 +0000 (13:14 -0000)]
awk: experimentally modify "global" trick to make code smaller
by minimizing data offsets
function old new delta
parse_expr 752 782 +30
syntax_error 23 26 +3
nvfree 151 154 +3
nvalloc 172 175 +3
fsrealloc 111 114 +3
chain_node 99 102 +3
chain_loop 121 124 +3
chain_group 628 631 +3
awk_main 1002 1005 +3
awk_exit 99 102 +3
parse_program 308 310 +2
split_f0 172 170 -2
awk_split 510 507 -3
getvar_s 108 102 -6
awk_sub 643 637 -6
awk_getline 706 700 -6
next_token 943 927 -16
handle_special 470 446 -24
next_input_file 252 213 -39
evaluate 6703 6633 -70
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 11/9 up/down: 59/-172) Total: -113 bytes
# size */*/awk.o
text data bss dec hex filename
18247 0 0 18247 4747 busybox.t0/editors/awk.o
18134 0 0 18134 46d6 busybox.t1/editors/awk.o
Bernhard Reutner-Fischer [Thu, 7 Jun 2007 13:12:51 +0000 (13:12 -0000)]
- update defconfig
Bernhard Reutner-Fischer [Thu, 7 Jun 2007 12:11:24 +0000 (12:11 -0000)]
- i need this disabled code for testing a patch. Please leave it in.
Bernhard Reutner-Fischer [Wed, 6 Jun 2007 19:27:58 +0000 (19:27 -0000)]
- fix wrong not operator which was essentially ignored. got introduced in r18282
http://busybox.net/lists/busybox/2007-June/027652.html
Denis Vlasenko [Wed, 6 Jun 2007 17:01:00 +0000 (17:01 -0000)]
awk: move all data to malloc space
function old new delta
evaluate 6448 6728 +280
awk_getline 676 705 +29
parse_expr 726 752 +26
next_token 917 943 +26
next_input_file 237 252 +15
awk_split 498 510 +12
awk_sub 632 643 +11
split_f0 160 170 +10
getvar_s 98 108 +10
...
chain_loop 128 121 -7
nvalloc 179 171 -8
chain_node 107 99 -8
mainseq 12 - -12
endseq 12 - -12
chain_group 640 628 -12
beginseq 12 - -12
awk_exit 112 100 -12
fsrealloc 127 110 -17
static.v 20 - -20
static.rsm 24 - -24
ttt 28 - -28
parse_program 339 311 -28
static.sreg 32 - -32
intvar 76 - -76
static.tspl 84 - -84
rsplitter 84 - -84
fsplitter 84 - -84
------------------------------------------------------------------------------
(add/remove: 0/39 grow/shrink: 16/11 up/down: 439/-685) Total: -246 bytes
Denis Vlasenko [Wed, 6 Jun 2007 07:50:51 +0000 (07:50 -0000)]
echo: fix non-fancy echo
Denis Vlasenko [Wed, 6 Jun 2007 07:40:16 +0000 (07:40 -0000)]
ps: fix -Z (by Yuichi Nakamura <ynakam@hitachisoft.jp>)
Denis Vlasenko [Tue, 5 Jun 2007 22:29:14 +0000 (22:29 -0000)]
remove bashisms from testsuite
Denis Vlasenko [Tue, 5 Jun 2007 20:08:11 +0000 (20:08 -0000)]
nc: make connecting to IPv4 from IPv6-enabled hosts easier
(was requiring -s <local addr>)
Bernhard Reutner-Fischer [Tue, 5 Jun 2007 17:28:56 +0000 (17:28 -0000)]
- kiltedknight writes: Busybox incorrectly parses a line from the status file, claiming that a required package is not installed or tagged to be installed when it actually is.
Closes #1221
Bernhard Reutner-Fischer [Tue, 5 Jun 2007 17:07:01 +0000 (17:07 -0000)]
- fix typo in error message. Closes #1308
Denis Vlasenko [Mon, 4 Jun 2007 23:32:35 +0000 (23:32 -0000)]
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
Denis Vlasenko [Mon, 4 Jun 2007 21:03:51 +0000 (21:03 -0000)]
snprintf(... "%s"...) => safe_strncpy
Denis Vlasenko [Mon, 4 Jun 2007 18:23:59 +0000 (18:23 -0000)]
syslogd: move some vectors from data to text. Needs uclibc patch
to have any effect (patch is submitted to uclibc ml).
# size *[67]/*/syslog*.o
text data bss dec hex filename
3169 288 0 3457 d81 busybox.t6/sysklogd/syslogd.o
3457 0 0 3457 d81 busybox.t7/sysklogd/syslogd.o
Denis Vlasenko [Mon, 4 Jun 2007 12:21:53 +0000 (12:21 -0000)]
diff: stop using data/bss
function old new delta
do_diff 385 436 +51
diff_main 850 895 +45
dump_unified_vec 437 457 +20
prepare 335 334 -1
anychange 1 - -1
suff 4 - -4
status 135 131 -4
static.max_context 4 - -4
start 12 8 -4
pref 4 - -4
member 4 - -4
label2 4 - -4
label1 4 - -4
klist 4 - -4
ixold 4 - -4
ixnew 4 - -4
dl_count 4 - -4
dl 4 - -4
context_vec_start 4 - -4
context_vec_ptr 4 - -4
context_vec_end 4 - -4
context 4 - -4
clistlen 4 - -4
clist 4 - -4
clen 4 - -4
class 4 - -4
J 4 - -4
add_to_dirlist 71 64 -7
slen 8 - -8
sfile 8 - -8
len 8 - -8
file 8 - -8
get_dir 196 185 -11
newcand 97 85 -12
change 351 331 -20
stb2 96 - -96
stb1 96 - -96
diffreg 2835 2717 -118
------------------------------------------------------------------------------
(add/remove: 0/27 grow/shrink: 3/8 up/down: 116/-482) Total: -366 bytes
# size */*/diff.o
text data bss dec hex filename
7055 8 305 7368 1cc8 busybox.t2/coreutils/diff.o
7002 0 0 7002 1b5a busybox.t3/coreutils/diff.o
Denis Vlasenko [Mon, 4 Jun 2007 10:33:48 +0000 (10:33 -0000)]
ping: stop using data/bss
function old new delta
ping_main 375 392 +17
unpack_tail 317 320 +3
ping4 525 528 +3
ping6 772 773 +1
sendping6 99 98 -1
sendping4 184 183 -1
myid 2 - -2
sendping_tail 154 151 -3
tsum 4 - -4
tmin 4 - -4
tmax 4 - -4
source_lsa 4 - -4
pingsock 4 - -4
pingcount 4 - -4
ntransmitted 4 - -4
nrepeats 4 - -4
nreceived 4 - -4
if_index 4 - -4
hostname 8 4 -4
dotted 4 - -4
datalen 4 - -4
pingaddr 28 - -28
rcvd_tbl 128 - -128
------------------------------------------------------------------------------
(add/remove: 0/15 grow/shrink: 4/4 up/down: 24/-215) Total: -191 bytes
text data bss dec hex filename
679835 2728 16736 699299 aaba3 busybox_old
679851 2720 16536 699107 aaae3 busybox_unstripped
Denis Vlasenko [Mon, 4 Jun 2007 10:16:52 +0000 (10:16 -0000)]
Audit bb_common_bufsiz usage, add script which looks for misuse.
tr: stop using globals needlessly.
code: -103 bytes
Denis Vlasenko [Sun, 3 Jun 2007 22:30:22 +0000 (22:30 -0000)]
find_stray_communal_vars: script which finds communal variables
resize: remove globals var
mdev: remove globals var
Denis Vlasenko [Sat, 2 Jun 2007 12:54:09 +0000 (12:54 -0000)]
start 1.7.x version
Denis Vlasenko [Sat, 2 Jun 2007 12:46:55 +0000 (12:46 -0000)]
fdisk: make it work with big disks (read: typical today's disks)
even if CONFIG_LFS is unset.
Denis Vlasenko [Fri, 1 Jun 2007 14:40:03 +0000 (14:40 -0000)]
website: announce 1.6.0
Denis Vlasenko [Thu, 31 May 2007 23:55:39 +0000 (23:55 -0000)]
less: less <HUGEFILE + [End] busy loops, fix it
Denis Vlasenko [Thu, 31 May 2007 23:06:18 +0000 (23:06 -0000)]
less: forgot trivial #if ENABLE_xxxx
Denis Vlasenko [Thu, 31 May 2007 22:42:12 +0000 (22:42 -0000)]
delete tons of extra #includes
Denis Vlasenko [Thu, 31 May 2007 22:16:38 +0000 (22:16 -0000)]
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
Denis Vlasenko [Thu, 31 May 2007 21:31:56 +0000 (21:31 -0000)]
more: stop using bss
# make && make bloatcheck
function old new delta
gotsig 86 107 +21
more_main 777 781 +4
cin_fileno 4 - -4
set_tty_to_initial_mode 25 - -25
new_settings 120 60 -60
initial_settings 120 60 -60
------------------------------------------------------------------------------
(add/remove: 0/2 grow/shrink: 2/2 up/down: 25/-149) Total: -124 bytes
Denis Vlasenko [Thu, 31 May 2007 15:56:10 +0000 (15:56 -0000)]
less: fix very obscure memory corruption bug
Denis Vlasenko [Thu, 31 May 2007 15:55:03 +0000 (15:55 -0000)]
less: stop using data/bss. Code got smaller too.
# size busybox_old busybox_unstripped
text data bss dec hex filename
700719 2896 17880 721495 b0257 busybox_old
700547 2832 17432 720811 affab busybox_unstripped
# size */*/less.o
text data bss dec hex filename
6861 50 344 7255 1c57 busybox.t0/miscutils/less.o
6657 0 0 6657 1a01 busybox.t1/miscutils/less.o
Denis Vlasenko [Wed, 30 May 2007 14:48:38 +0000 (14:48 -0000)]
nmeter: stop using data/bss; reduce amount of reads from /proc
# size */*/nmeter.o
text data bss dec hex filename
4366 80 16 4462 116e busybox.t0/miscutils/nmeter.o
4386 0 0 4386 1122 busybox.t2/miscutils/nmeter.o
Denis Vlasenko [Wed, 30 May 2007 02:01:40 +0000 (02:01 -0000)]
vi: move some data to malloc'ed space: ~500 less bss, code
size is smaller too (subject to arch differenced I guess)
Denis Vlasenko [Wed, 30 May 2007 00:55:52 +0000 (00:55 -0000)]
hush: trivial buglet found by randomconfig testing
Denis Vlasenko [Wed, 30 May 2007 00:29:55 +0000 (00:29 -0000)]
whitespace fixes
Denis Vlasenko [Tue, 29 May 2007 21:41:28 +0000 (21:41 -0000)]
verror_msg: don't printf(NULL)
Denis Vlasenko [Sun, 27 May 2007 03:39:50 +0000 (03:39 -0000)]
test: close bug 1371
test: plug a memory leak
Denis Vlasenko [Sun, 27 May 2007 00:53:41 +0000 (00:53 -0000)]
ping: fix wrong sign extension of packet id (bug 1373)