Denis Vlasenko
76140a77c9
networking/libiproute/*: code shrink by optimizing numeric conversions
...
and other misc stuff
function old new delta
print_tunnel 660 656 -4
format_host 5 - -5
get_unsigned 70 54 -16
get_u32 70 54 -16
do_iplink 1173 1151 -22
get_prefix 417 393 -24
print_rule 800 771 -29
print_addrinfo 1374 1342 -32
print_route 1745 1709 -36
iprule_modify 905 866 -39
iproute_modify 1105 1048 -57
get_integer 70 - -70
parse_args 1684 1440 -244
------------------------------------------------------------------------------
(add/remove: 0/2 grow/shrink: 0/11 up/down: 0/-594) Total: -594 bytes
text data bss dec hex filename
817378 476 7892 825746 c9992 busybox_old
816784 476 7892 825152 c9740 busybox_unstripped
2009-03-05 09:21:57 +00:00
Denis Vlasenko
196a953f21
iptunnel: fix problems with including linux/ip_tunnel.h
...
on some systems
2008-12-03 20:16:11 +00:00
Denis Vlasenko
360d9661b6
libbb: add strncpy_IFNAMSIZ
...
function old new delta
...
udhcp_read_interface 225 220 -5
brctl_main 1151 1146 -5
add_interface 109 104 -5
ipaddr_list_or_flush 2174 2167 -7
do_add_ioctl 88 80 -8
vconfig_main 249 240 -9
do_del_ioctl 78 68 -10
do_iplink 1186 1173 -13
do_if_fetch 766 753 -13
buffer_fill_and_print 196 179 -17
parse_args 1709 1684 -25
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 2/20 up/down: 11/-140) Total: -129 bytes
2008-12-02 18:18:50 +00:00
Bernhard Reutner-Fischer
470dc1d7e2
- minor shrinkage (~-60)
2008-10-30 17:42:49 +00:00
Bernhard Reutner-Fischer
636a1f85e8
- use EXIT_{SUCCESS,FAILURE}. No object-code changes
2008-05-19 09:29:47 +00:00
Denis Vlasenko
6c10657c4a
style fixes. no code changes
2008-04-19 19:05:12 +00:00
Denis Vlasenko
ed6a49c657
ip: stop propagating argc; optimize ip_parse_common_args
...
function old new delta
find_pair 167 187 +20
static.families - 17 +17
die_must_be_on_off - 11 +11
...
on_off 33 22 -11
do_ipaddr 103 90 -13
do_iptunnel 1001 986 -15
iproute_list_or_flush 1237 1217 -20
static.ip_common_commands 43 22 -21
do_iproute 2217 2193 -24
parse_args 1444 1414 -30
ip_do 47 16 -31
do_iprule 994 963 -31
ip_main 153 113 -40
ipaddr_modify 1357 1305 -52
ipaddr_list_or_flush 2543 2490 -53
ip_parse_common_args 294 159 -135
------------------------------------------------------------------------------
(add/remove: 4/1 grow/shrink: 4/24 up/down: 85/-563) Total: -478 bytes
text data bss dec hex filename
775561 966 9236 785763 bfd63 busybox_old
775073 962 9236 785271 bfb77 busybox_unstripped
2007-11-18 22:56:25 +00:00
Denis Vlasenko
db60bcf1b7
ip tunnel parameter parsing fix by Jean Wolter <jw5@os.inf.tu-dresden.de>
2007-10-10 14:43:03 +00:00
Denis Vlasenko
4daad9004d
introduce bb_putchar(). saves ~1800 on uclibc (less on glibc).
2007-09-27 10:20:47 +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
fb79a2e2cf
xioctl and friends by Tito <farmatito@tiscali.it>
...
function old new delta
do_iptunnel 203 977 +774
process_dev 5328 5494 +166
ioctl_or_perror - 54 +54
ioctl_or_perror_and_die - 51 +51
ioctl_alt_func - 49 +49
bb_ioctl_or_warn - 47 +47
do_add_ioctl 102 145 +43
bb_xioctl - 39 +39
print_value_on_off - 31 +31
get_lcm 105 123 +18
arp_main 2155 2167 +12
..................
zcip_main 1576 1566 -10
setlogcons_main 92 82 -10
dumpkmap_main 263 253 -10
do_get_ioctl 85 75 -10
setkeycodes_main 165 154 -11
write_table 244 232 -12
vconfig_main 318 306 -12
do_del_ioctl 93 81 -12
set_address 75 62 -13
maybe_set_utc 30 16 -14
loadfont_main 495 479 -16
slattach_main 712 695 -17
do_loadfont 191 174 -17
do_iplink 1155 1136 -19
getty_main 2583 2562 -21
fbset_main 2058 2035 -23
do_time 588 565 -23
xioctl 25 - -25
read_rtc 186 160 -26
parse_conf 1299 1270 -29
udhcp_read_interface 269 239 -30
bb_ioctl 45 - -45
bb_ioctl_alt 70 - -70
bb_ioctl_on_off 78 - -78
.rodata 129370 129018 -352
do_show 799 - -799
------------------------------------------------------------------------------
(add/remove: 6/5 grow/shrink: 13/49 up/down: 1316/-1864) Total: -548 bytes
text data bss dec hex filename
675352 2740 13968 692060 a8f5c busybox_old
674804 2740 13968 691512 a8d38 busybox_unstripped
2007-07-14 22:07:14 +00:00
Bernhard Reutner-Fischer
789b87edf5
- remove matches() from networking/. Untested.
...
text data bss dec hex filename
1705 0 0 1705 6a9 networking/libiproute/utils.o.orig
1676 0 0 1676 68c networking/libiproute/utils.o
766 0 0 766 2fe networking/libiproute/rtm_map.o.orig
670 0 0 670 29e networking/libiproute/rtm_map.o
4942 0 0 4942 134e networking/libiproute/iptunnel.o.orig
4687 0 0 4687 124f networking/libiproute/iptunnel.o
2007-06-21 10:20:13 +00:00
Denis Vlasenko
9a7d38fe24
delete tons of extra #includes
2007-05-31 22:42:12 +00:00
Denis Vlasenko
50f7f446ec
bb_full_fd_action: remove potential xmalloc from NOFORK path
...
cat: stop using stdio.h opens
libbb: introduce & use open[3]_or_warn
function old new delta
open3_or_warn - 54 +54
bb_cat 115 144 +29
open_or_warn - 25 +25
unlzma 2404 2412 +8
chattr_main 334 339 +5
xstrtoul_range_sfx 251 255 +4
telnet_main 1514 1510 -4
static.opt 4 - -4
qgravechar 122 118 -4
fuser_add_pid 61 54 -7
fuser_add_inode 154 147 -7
writeFileToTarball 1542 1534 -8
refresh 1156 1148 -8
do_show 856 846 -10
read_leases 212 200 -12
setup_redirects 236 222 -14
iproute_list_or_flush 1582 1568 -14
read_config 427 411 -16
write_leases 284 264 -20
hash_file 338 318 -20
copy_file 1760 1740 -20
do_iproute 2610 2588 -22
bb_full_fd_action 320 269 -51
open_to_or_warn 103 49 -54
fuser_main 1660 1596 -64
.rodata 131160 131096 -64
------------------------------------------------------------------------------
(add/remove: 2/1 grow/shrink: 4/19 up/down: 125/-423) Total: -298 bytes
2007-04-11 23:20:53 +00:00
Denis Vlasenko
540a2a1f3b
libiproute: audit callgraph, shortcut error paths into die() functions.
...
Kill a few statics, made other globals smaller:
oneline is smallint, _SL_ is char
function old new delta
print_tunnel 693 731 +38
print_route 1775 1777 +2
print_addrinfo 1495 1497 +2
ipaddr_list_or_flush 2826 2828 +2
oneline 4 1 -3
_SL_ 4 1 -3
ipaddr_modify 1476 1472 -4
parse_address 124 119 -5
ip_parse_common_args 429 423 -6
on_off 53 46 -7
do_del_ioctl 113 106 -7
do_add_ioctl 120 113 -7
do_show 864 856 -8
iprule_list 157 148 -9
do_iptunnel 310 299 -11
do_add 143 126 -17
get_ctl_fd 95 76 -19
set_address 108 84 -24
ip_main 351 323 -28
static.ifr 32 - -32
parse_args 1992 1949 -43
iproute_list_or_flush 1673 1582 -91
do_iplink 1583 1485 -98
filter 280 - -280
------------------------------------------------------------------------------
(add/remove: 0/2 grow/shrink: 4/18 up/down: 44/-702) Total: -658 bytes
2007-04-07 01:14:45 +00:00
Denis Vlasenko
ab2aea4447
preparatory patch for -Wwrite-strings #4
2007-01-29 22:51:58 +00:00
Denis Vlasenko
ace35eeb88
Remove networking/libiproute/linux/pkt_sched.h
...
(and networking/libiproute/linux/ since it become empty).
Style fixes.
2007-01-02 16:32:16 +00:00
Denis Vlasenko
98ee06d3d4
stop using __u32 etc. uint32_t is there for a reason
2006-12-31 18:57:37 +00:00
Denis Vlasenko
229b3d2072
do not overflow ifr_name. maybe it was safe in some places,
...
but not everywhere. err to the safe side.
2006-11-27 23:44:57 +00:00
Denis Vlasenko
c6f188def8
silly size savings and capitalization fixes
2006-10-26 00:37:00 +00:00
Denis Vlasenko
27af5a0dd3
replacing func() with xfunc() where appropriate
2006-09-03 12:21:59 +00:00
"Robert P. J. Day"
63fc1a9e08
Standardize on the vi editing directives being on the first line.
2006-07-02 19:47:05 +00:00
Bernhard Reutner-Fischer
19008b8373
- reuse strings and messages. Saves about 600B
2006-06-07 20:17:41 +00:00
Rob Landley
ecae66ac16
Header cleanup: don't #include headers that libbb.h already includes.
2006-06-02 20:53:38 +00:00
Bernhard Reutner-Fischer
eedd1be730
- remove warning about redeclaration of __constant_htons
...
- remove warning about format '%ld' expects type 'long int *', but argument #num
has type 'long unsigned int *'
2006-01-12 13:15:49 +00:00
Bernhard Reutner-Fischer
1d62d3b7b9
- make libiproute compile..
2005-10-08 20:47:15 +00:00
Eric Andersen
14f5c8d764
Patch from Bernhard Fischer to make a bunch of symbols static
...
which were otherwise cluttering the global namespace.
2005-04-16 19:39:00 +00:00
Eric Andersen
f71ad6c9e4
Thomas Koeller writes:
...
Hi,
the following output is from BusyBox 1.0.0-pre10:
~ # ip link help
ip: Command "help" is unknown, try "ip link help".
tk
This patch fixes it by removing the advertisements for
the "ip blah help" stuff that is not implemented.
2004-04-26 19:32:49 +00:00
Eric Andersen
c7bda1ce65
Remove trailing whitespace. Update copyright to include 2004.
2004-03-15 08:29:22 +00:00
Manuel Novoa III
cad5364599
Major coreutils update.
2003-03-19 09:13:01 +00:00
Eric Andersen
ab4e19afc6
Eliminate most instances where we use linux kernel headers
...
-Erik
2003-01-14 08:54:08 +00:00
Glenn L McGrath
ea2a1064b3
fixes for ia64
2003-01-05 00:43:00 +00:00
Glenn L McGrath
275be87be7
Only included headers that are used.
2002-12-16 07:37:21 +00:00
Glenn L McGrath
8b6024449f
Cleanup error messages
2002-11-28 12:19:51 +00:00
Glenn L McGrath
9a2d27249c
IP applet by Bastian Blank <waldi@debian.org>
2002-11-10 01:33:55 +00:00