Denis Vlasenko
52ec4b98d5
whitespace fixes
2008-07-12 23:02:43 +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
a60f84ebf0
*: rename ATTRIBUTE_XXX to just XXX.
2008-07-05 09:18:54 +00:00
Denis Vlasenko
a60936da06
libunarchive: stop using static data in archivers - archive_handle_t
...
can trivially provide space for that.
rpm: code shrink
tar: simplify autodetection of bz2/.gz
function old new delta
static.not_first 1 - -1
static.end 1 - -1
bb_makedev 51 49 -2
static.saved_hardlinks_created 4 - -4
static.saved_hardlinks 4 - -4
longname 4 - -4
linkname 4 - -4
hash_file 251 247 -4
get_header_tar 1528 1521 -7
rpm_main 1711 1697 -14
get_header_cpio 965 944 -21
------------------------------------------------------------------------------
(add/remove: 0/6 grow/shrink: 0/5 up/down: 0/-66) Total: -66 bytes
text data bss dec hex filename
804926 611 6868 812405 c6575 busybox_old
804878 611 6852 812341 c6535 busybox_unstripped
2008-06-28 05:04:09 +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
c87339d584
dpkg: trivial code shrinkage, and redo G trick correctly.
...
function old new delta
run_package_script_or_die - 72 +72
fill_package_struct 303 309 +6
search_package_hashtable 122 125 +3
get_status 112 111 -1
status_hashtable 4 - -4
set_status 162 158 -4
package_hashtable 4 - -4
name_hashtable 4 - -4
package_satisfies_dependency 112 106 -6
search_name_hashtable 118 110 -8
configure_package 121 106 -15
remove_package 333 317 -16
search_status_hashtable 133 111 -22
purge_package 247 217 -30
unpack_package 552 521 -31
run_package_script 62 - -62
dpkg_main 3991 3867 -124
------------------------------------------------------------------------------
(add/remove: 1/4 grow/shrink: 2/10 up/down: 81/-331) Total: -250 bytes
text data bss dec hex filename
807972 611 6924 815507 c7193 busybox_old
807603 611 6908 815122 c7012 busybox_unstripped
2008-06-21 23:15:43 +00:00
Denis Vlasenko
d235f58ac2
dpkg: code shrink
...
dpkg: add documentation from bug 3644
function old new delta
remove_package 318 333 +15
unpack_package 541 552 +11
purge_package 242 247 +5
all_control_list 55 53 -2
all_control_files 44 40 -4
add_split_dependencies 709 703 -6
search_status_hashtable 148 133 -15
search_package_hashtable 137 122 -15
search_name_hashtable 134 118 -16
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 3/6 up/down: 31/-58) Total: -27 bytes
text data bss dec hex filename
808093 611 6924 815628 c720c busybox_old
807972 611 6924 815507 c7193 busybox_unstripped
2008-06-21 22:46:58 +00:00
Denis Vlasenko
20273138fc
dpkg: code shrink (by Peter Korsgaard <jacmet@uclibc.org>)
...
function old new delta
create_list 104 86 -18
2008-06-21 22:10:52 +00:00
Bernhard Reutner-Fischer
f0d6068086
- The conffiles control file isn't required in Debian packages, so don't
...
error out if it's missing. (Peter Korsgaard)
2008-06-05 12:18:42 +00:00
Denis Vlasenko
8ee649a02e
*: more uniform naming: s/xmalloc_getline/xmalloc_fgetline/
2008-03-26 20:04:27 +00:00
Denis Vlasenko
68404f13d4
*: add -Wunused-parameter; fix resulting breakage
...
function old new delta
procps_scan 1265 1298 +33
aliascmd 278 283 +5
parse_file_cmd 116 120 +4
dname_enc 373 377 +4
setcmd 90 93 +3
execcmd 57 60 +3
count_lines 72 74 +2
process_command_subs 340 339 -1
test_main 409 407 -2
mknod_main 179 177 -2
handle_incoming_and_exit 2653 2651 -2
argstr 1312 1310 -2
shiftcmd 131 128 -3
exitcmd 46 43 -3
dotcmd 297 294 -3
breakcmd 86 83 -3
evalpipe 353 349 -4
evalcommand 1180 1176 -4
evalcmd 109 105 -4
send_tree 374 369 -5
mkfifo_main 82 77 -5
evalsubshell 152 147 -5
typecmd 75 69 -6
letcmd 61 55 -6
add_cmd 1190 1183 -7
main 891 883 -8
ash_main 1415 1407 -8
parse_stream 1377 1367 -10
alloc_procps_scan 55 - -55
------------------------------------------------------------------------------
(add/remove: 0/1 grow/shrink: 7/21 up/down: 54/-148) Total: -94 bytes
text data bss dec hex filename
797195 658 7428 805281 c49a1 busybox_old
797101 658 7428 805187 c4943 busybox_unstripped
2008-03-17 09:00:54 +00:00
Denis Vlasenko
b3b0753593
dpkg: fix bug where existence check was reversed
2008-02-17 14:29:25 +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
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
fe7cd642b0
don't pass argc in getopt32, it's superfluous
...
(add/remove: 0/0 grow/shrink: 12/131 up/down: 91/-727) Total: -636 bytes
text data bss dec hex filename
773469 1058 11092 785619 bfcd3 busybox_old
772644 1058 11092 784794 bf99a busybox_unstripped
2007-08-18 15:32:12 +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
e324184c05
s/#ifdef CONFIG_/#if ENABLE_/g
2007-08-13 10:36:25 +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
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
b71c668c57
style fix (stray space before ';')
2007-07-21 15:08:09 +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
Bernhard Reutner-Fischer
6c501a71ae
- 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
2007-06-05 17:28:56 +00:00
Bernhard Reutner-Fischer
fa5f20755c
- fix typo in error message. Closes #1308
2007-06-05 17:07:01 +00:00
Denis Vlasenko
b6adbf1be2
usage.c: remove reference to busybox.h
...
*: s/include "busybox.h"/include "libbb.h"
2007-05-26 19:00:18 +00:00
Denis Vlasenko
ac678ec2f1
style fixes, no code changes
2007-04-16 22:32:04 +00:00
Denis Vlasenko
334fa9bcb5
dpkg: use nitfields which are a bit closer to typical ushort.
...
Code size -800.
2007-04-13 23:22:58 +00:00
Denis Vlasenko
53f83d68fb
dpkg: run_package_script() returns 0 if all ok and non-zero if failure.
...
The result code was checked incorrectly in two places.
(from "Kim B. Heino" <Kim.Heino@bluegiga.com>)
2007-03-29 19:42:19 +00:00
Denis Vlasenko
88a2aa98e0
dpkg: free_package(NULL) is ok, so don't test for NULL, just free.
2007-03-19 21:48:56 +00:00
Bernhard Reutner-Fischer
de8a6a01d8
Kim B. Heino writes:
...
When installing a new package with dpkg dependencies are checked
correctly. But when I try to update an existing package, the
dependencies are checked against the old package, not against new
package. Thus the new package can break dependencies.
2007-03-19 13:44:18 +00:00
Denis Vlasenko
baca175912
kill superfluous returns at the end of void functions
2007-03-11 13:43:10 +00:00
Denis Vlasenko
7fd00cbff7
dpkg: fix segfault on "dpkg -i"
2007-02-15 21:19:50 +00:00
Denis Vlasenko
06af216528
suppress warnings about easch <applet>_main() having
...
no preceding prototype
2007-02-03 17:28:39 +00:00
Denis Vlasenko
b6aae0f381
preparatory patch for -Wwrite-strings #2
2007-01-29 22:51:25 +00:00
Denis Vlasenko
4cccc03768
remove useless casts (type*) xzalloc(...)
2006-12-22 18:37:07 +00:00
Denis Vlasenko
a6df5907d2
dpkg: getopt32-ification etc, -100 bytes
2006-12-22 18:32:40 +00:00
Denis Vlasenko
b95636c52f
remove casts from xmalloc()
2006-12-19 23:36:04 +00:00
Denis Vlasenko
5af906e7c8
rename: compare_string_array -> index_in_str_array
...
introduce index_in_substr_array and use it in
iproute2
2006-11-05 18:05:09 +00:00
Denis Vlasenko
ddec5af6b0
rename functions to more understandable names
2006-10-26 23:25:17 +00:00
Denis Vlasenko
e1a0d486e4
message string changes, mostly for consistency, also -32 bytes in .rodata
2006-10-20 13:28:22 +00:00
Denis Vlasenko
2d5ca60bfb
bb_get_[chomped]line_from_file wasn't descriptive enough.
...
Renaming...
2006-10-12 22:43:20 +00:00
Denis Vlasenko
a6dbb08a48
small style fixes
2006-10-12 19:29:44 +00:00
Denis Vlasenko
aecabffb8b
dpkg: fix use-after-free (bug 939)
2006-09-30 21:05:25 +00:00
Denis Vlasenko
5492884311
dpkg: style fixes; short -> int (generated code is smaller)
2006-09-28 22:35:42 +00:00
Denis Vlasenko
57308afb5b
dpkg: reduce bss usage by ~130 kbytes (yes, kilobytes!)
...
at the cost of ~100 bytes of text.
Improves friendliness to nommu systems.
(Dunno whether nommu people ever use dpkg, though...)
2006-09-28 22:34:46 +00:00
Denis Vlasenko
c16bd212e3
silly switch style fix
2006-09-27 19:51:06 +00:00
Denis Vlasenko
9213a9e0f2
whitespace cleanup
2006-09-17 16:28:10 +00:00
Denis Vlasenko
6d655be5df
removed a lot of trailing \n in bb_msg() calls. It is added
...
automatically by function itself.
2006-09-06 19:02:46 +00:00
Rob Landley
02496aa69e
The bb_ prefixes were removed from xasprintf() and xopen() a month ago (in
...
svn 15767).
2006-09-05 13:48:21 +00:00
Denis Vlasenko
1da6a21666
dpkg: fix buffer overflow (bug 983)
2006-09-03 16:33:58 +00:00
Rob Landley
d921b2ecc0
Remove bb_ prefixes from xfuncs.c (and a few other places), consolidate
...
things like xasprintf() into xfuncs.c, remove xprint_file_by_name() (it only
had one user), clean up lots of #includes... General cleanup pass. What I've
been doing for the last couple days.
And it conflicts! I've removed httpd.c from this checkin due to somebody else
touching that file. It builds for me. I have to catch a bus. (Now you know
why I'm looking forward to Mercurial.)
2006-08-03 15:41:12 +00:00