Bernhard Reutner-Fischer
51a06c07da
- accept ip l s ib0 addr 00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00
2008-05-16 17:19:03 +00:00
Bernhard Reutner-Fischer
b8635e28b5
- very minor shrinkage
...
odd that this saved 1byte. And there could be something wrong with
ifcombine or the like since omitting the braces produces bigger code?
2008-05-16 16:55:17 +00:00
Bernhard Reutner-Fischer
dff6190112
- add appropriate string for arp header #32 for use by ip(8)
2008-05-16 16:21:00 +00:00
Denis Vlasenko
6b06cb80be
more of -Wall fixes from Cristian Ionescu-Idbohrn.
...
Some are fixing real bugs.
function old new delta
syslogd_main 938 958 +20
get_signum 136 143 +7
obj_load 777 782 +5
recv_from_to 210 214 +4
get_next_block 1795 1799 +4
display_topmem_process_list 1117 1121 +4
logread_main 484 487 +3
buffer_fill_and_print 73 76 +3
kill_main 687 689 +2
ll_remember_index 240 241 +1
do_stats 452 453 +1
if_readconf 166 165 -1
display_process_list 1192 1191 -1
run_applet_and_exit 507 505 -2
print_signames 33 31 -2
parse_one_line 1092 1090 -2
find_out_spec 57 55 -2
add_ksymoops_symbols 421 419 -2
ash_main 1407 1402 -5
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 11/8 up/down: 54/-17) Total: 37 bytes
2008-05-15 21:30:45 +00:00
Denis Vlasenko
98636eb08c
Use intra-DSO calls when we build libbusybox. No-op for normal build.
...
This was Bernhard Fischer' idea.
text data bss dec hex filename
773549 7781 9740 791070 c121e busybox.t7/0_lib/libbusybox.so.1.11.0.svn_unstripped
769683 7397 9740 786820 c0184 busybox.t9t/0_lib/libbusybox.so.1.11.0.svn_unstripped
2008-05-09 17:59:34 +00:00
Denis Vlasenko
6c10657c4a
style fixes. no code changes
2008-04-19 19:05:12 +00:00
Denis Vlasenko
f90ab183d6
*: use fopen_or_warn in few more places
2008-03-20 21:19:35 +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
284d0faed6
random s/short/int/
...
add_cmd 1189 1190 +1
xconnect_ftpdata 118 117 -1
data_align 86 84 -2
process_files 2101 2096 -5
forkexec 1345 1334 -11
2008-02-16 13:18:17 +00:00
Bernhard Reutner-Fischer
f470196a41
- fix conflicting decls of syslog related facilitynames and prioritynames tables
2008-01-27 12:50:12 +00:00
Denis Vlasenko
83c44229d2
ip route: "ip route" was misbehaving (extra argv+1 ate 1st env var)
2008-01-04 15:28:28 +00:00
Denis Vlasenko
8723a94c25
libnetlink: comment out unused code; don't use 8k stack buffers
...
function old new delta
ipaddr_modify 1305 1297 -8
do_iprule 963 955 -8
do_iproute 2193 2169 -24
xrtnl_dump_filter 418 391 -27
rtnl_talk 671 536 -135
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 0/5 up/down: 0/-202) Total: -202 bytes
2007-12-02 06:30:57 +00:00
Denis Vlasenko
79c6904faf
ip route: add comment, no code changes
2007-11-27 09:42:33 +00:00
Denis Vlasenko
186c2b3d0e
iproute: fix a bug where "ip r flush table main" was rejected,
...
add "ip r flush cache" (however I'm unsure it is really valid syntax)
Add a few comments and stop mixing params and params' keywords.
2007-11-26 18:29:52 +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
dfc0740b04
ll_types.c: optimize link type table, make it conditional
...
on FEATURE_IP_RARE_PROTOCOLS
function old new delta
static.arphrd_name - 373 +373
static.arphrd_type - 124 +124
ll_type_n2a 58 78 +20
static.arphrd_names 496 - -496
------------------------------------------------------------------------------
(add/remove: 2/1 grow/shrink: 1/0 up/down: 517/-496) Total: 21 bytes
text data bss dec hex filename
776880 974 9420 787274 c034a busybox_old
776594 974 9420 786988 c022c busybox_unstripped
2007-10-29 19:33:26 +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
605b20e277
replace printf with fputs where appropriate
2007-09-30 16:22:36 +00:00
Denis Vlasenko
1eecaf26b0
libiproute: add missing break's
2007-09-30 16:04:21 +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
856be770a6
assorted fixes for breakage found by randomconfig
2007-08-17 08:29:48 +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
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
Denis Vlasenko
80b8b39899
Consolidate ARRAY_SIZE macro; remove one unneeded global var (walter harms <wharms@bfs.de>)
2007-06-25 10:55:35 +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
Bernhard Reutner-Fischer
cd0e80ce90
- move iprule and ipaddress from matches() to index_in_str_array
...
text data bss dec hex filename
2544 0 0 2544 9f0 networking/libiproute/iprule.o.oorig
2356 0 0 2356 934 networking/libiproute/iprule.o
6481 0 0 6481 1951 networking/libiproute/ipaddress.o.oorig
6464 0 0 6464 1940 networking/libiproute/ipaddress.o
2007-06-20 14:53:49 +00:00
Bernhard Reutner-Fischer
761ce14fd2
- remove another user of the deprecated matches() func by moving it to use index_in_str_array. Untested.
...
text data bss dec hex filename
445 0 4 449 1c1 ip_parse_common_args.o.oorig
391 0 4 395 18b ip_parse_common_args.o
2007-06-20 12:42:03 +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
8c1aaf3297
snprintf(... "%s"...) => safe_strncpy
2007-06-04 21:03:51 +00:00
Denis Vlasenko
9a7d38fe24
delete tons of extra #includes
2007-05-31 22:42:12 +00:00
Denis Vlasenko
fad2b86c9e
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
2007-05-31 22:16:38 +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
Bernhard Reutner-Fischer
c2b3e370d6
- apply hunk that fixes an issue with (wrong?) dependencies. Initial notes were:
...
There is something wrong in the new buildsys: If one selects ip and has e.g.
rule or route unset, ip still wants to build those.
This fails (correctly) since rtnl_rttable_n2a and rtnl_rtrealm_n2a aren't
available if they were turned off. TODO: Talk to vda about this
2007-05-15 09:33:32 +00:00
Bernhard Reutner-Fischer
ab51bf4e28
- fix compilation when ENABLE_FEATURE_IP_RULE was off
2007-04-16 14:56:01 +00:00
Bernhard Reutner-Fischer
c98c31783c
- shrink iproute a bit (-200 bytes). Untested
2007-04-12 11:36:56 +00:00
Bernhard Reutner-Fischer
b290889f02
- add xsendto and use where appropriate; shrink iplink; sanitize libiproute a bit.
...
-916 byte
2007-04-12 11:34:39 +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
Bernhard Reutner-Fischer
12c96a64a4
- set the scope properly. Thanks to Jean Wolter, who wrote:
...
busybox ip and the original ip utility behave differently when setting
the following route (verified with ip route show using the original ip
utility):
ip route add 10.0.0.138 dev eth0
Result for busybox ip:
# ip route add 10.0.0.138 dev eth0
# /usr/local/bin/ip route show
10.0.0.138 dev eth0
Result for ip:
# /usr/local/bin/ip route add 10.0.0.138 dev eth0
# /usr/local/bin/ip route show
10.0.0.138 dev eth0 scope link
A following "ip route add default via 10.0.0.138" fails for busybox
ip, since the kernel can not find a route to 10.0.0.138 (it replies
with Network is unreachable).
The reasons seems to be that the original ip utility explicitly sets
the scope after parsing all parameters. This is missing in busybox,
the attached patch fixes this. I took this from the original iproute
sources and removed some variables, which are not needed for busybox.
2007-04-11 16:23:57 +00:00
Bernhard Reutner-Fischer
e87d7955f8
- rewrite the ip applet to be less bloaty
...
- mark libiproute's matches() as deprecated. Convert to index_in_(sub)str_array()!
text data bss dec hex filename
314 0 0 314 13a ip.o.orig
200 0 0 200 c8 ip.o
Using a smallint for the key would save another byte.
2007-04-10 18:43:27 +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
27a131e08e
preparatory patch for -Wwrite-strings #8 (missed part)
2007-01-30 00:44:41 +00:00
Denis Vlasenko
322661d025
preparatory patch for -Wwrite-strings #6
2007-01-29 23:43:52 +00:00
Denis Vlasenko
89ef65f024
preparatory patch for -Wwrite-strings #5
2007-01-29 23:43:18 +00:00
Denis Vlasenko
ab2aea4447
preparatory patch for -Wwrite-strings #4
2007-01-29 22:51:58 +00:00
Denis Vlasenko
b6aae0f381
preparatory patch for -Wwrite-strings #2
2007-01-29 22:51:25 +00:00
Bernhard Reutner-Fischer
2806b2368c
- reinstate static for the command string arrray to be gentle to gcc-3.x
2007-01-28 11:14:26 +00:00
Bernhard Reutner-Fischer
4d9a358ec1
- use uint32_t as suggested by vda.
...
- minor size- and readability tweaks while at it:
text data bss dec hex filename
2631 0 0 2631 a47 networking/libiproute/iprule.o.orig
2596 0 0 2596 a24 networking/libiproute/iprule.o
2007-01-28 00:20:46 +00:00
Denis Vlasenko
fd94efa41f
fix numbering in switch(): we don't have "del" anymore,
...
substring match on "delete" handles it ok. But we (I?)
forgot to renumber case labels...
2007-01-27 13:13:45 +00:00
Denis Vlasenko
218f2f4882
accumulated post-1.4.0 fixes
2007-01-24 22:02:01 +00:00
Bernhard Reutner-Fischer
425997223c
- rtnl_rttable_a2n wants an unsigned int32
2007-01-23 01:27:17 +00:00
Bernhard Reutner-Fischer
620e57b421
- forgot to include ip_common.h
2007-01-22 17:42:37 +00:00
Denis Vlasenko
3a34d0c08a
random small size optimizations
2007-01-12 22:10:34 +00:00
Denis Vlasenko
f7996f3b70
Trailing whitespace removal over entire tree
2007-01-11 17:20:00 +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
e27f15615f
msh: double "static char line[LINELIM]" etc deleted.
...
massive amounts of assignments-in-ifs deleted
(some of which were VERY nasty)
2007-01-01 06:00:38 +00:00
Denis Vlasenko
d1a302b52f
rt_names: stop allocating 5k in rwdata
...
objsizes: don't show build machinery's object modules
2006-12-31 20:40:20 +00:00
Denis Vlasenko
c519320000
iproute: remove double get_hz optimization
2006-12-31 19:07:23 +00:00
Denis Vlasenko
13463af29f
remove commented out #includes etc
...
move get_hz to the only caller
2006-12-31 18:58:32 +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
bf0a201008
style fixes
...
last xcalloc replaced by xzalloc
2006-12-26 10:42:51 +00:00
Denis Vlasenko
1dc1b37b33
use xbind, xconnect where appropriate.
...
small edits to arping
2006-12-23 02:48:44 +00:00
Denis Vlasenko
bf66fbc8e2
introduce LONE_CHAR (optimized strcmp with one-char string)
2006-12-21 13:23:14 +00:00
Denis Vlasenko
83e5d6f772
A bunch of defined(__GLIBC__) added. static-linking warning expanded
2006-12-18 21:49:06 +00:00
Denis Vlasenko
9f739445cd
inline strcmp(s, "-") [actually macro-ize it for now - gcc is too stupid]
2006-12-16 23:49:13 +00:00
Denis Vlasenko
cda6c636ca
re-applying first post-1.3.x change
...
version change to 1.4.0.svn
2006-12-15 00:59:35 +00:00
Denis Vlasenko
44b2ea786e
back out last change - need to make busybox-1_3-stable branch first
2006-12-15 00:02:30 +00:00
Bernhard Reutner-Fischer
728534b3cb
- table support for ip route
2006-12-14 15:41:29 +00:00
Bernhard Reutner-Fischer
1819eee436
- Improve wording in error message.
2006-12-07 12:18:36 +00:00
Bernhard Reutner-Fischer
bb59f02218
- make sure we pickup the correct defines. Guards against 2.6.19 kernel-headers.
2006-12-04 15:57:17 +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
7ca3921e5e
bb_INET_default[] is really just a const "default",
...
nothing INET-specific
2006-11-21 20:34:21 +00:00
Bernhard Reutner-Fischer
921f5df25f
- add 'ip rule' support. First take..
...
text data bss dec hex filename
2999 0 0 2999 bb7 networking/libiproute/iprule.o
2006-11-21 15:36:08 +00:00
Denis Vlasenko
a7189f01a4
add -Wundef, fix uncovered bugs
2006-11-17 20:29:00 +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
9225854144
mostly style fixes
2006-11-01 10:25:35 +00:00
Denis Vlasenko
d3d004dd35
last nail into error_msg() (de)capitalization
2006-10-27 09:02:31 +00:00
Denis Vlasenko
940b2e4b73
ip: "ip addr del" and "ip addr delete" both should work
2006-10-26 00:38:22 +00:00
Denis Vlasenko
c6f188def8
silly size savings and capitalization fixes
2006-10-26 00:37:00 +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
ea62077b85
add open_read_close() and similar stuff
2006-10-14 02:23:43 +00:00
Denis Vlasenko
7d219aab70
build system overhaul
2006-10-05 10:17:08 +00:00
Denis Vlasenko
9275814a9e
lots of silly indent fixes
2006-10-03 19:56:34 +00:00
Denis Vlasenko
7935a5a992
libiproute/ll_map.c: fix bug 279
...
("On-demand net module loading fails with CONFIG_FEATURE_IFUPDOWN_IP")
2006-09-30 00:18:16 +00:00
Denis Vlasenko
981b24db5e
rt_names.c: move few strings into rodata
2006-09-28 22:36:23 +00:00
Denis Vlasenko
c16bd212e3
silly switch style fix
2006-09-27 19:51:06 +00:00
Denis Vlasenko
3538b9a882
Implement optional syslog logging using ordinary
...
bb_xx_msg calls, and convert networking/* to it.
The rest of bbox will be converted gradually.
2006-09-06 18:36:50 +00:00
Denis Vlasenko
27af5a0dd3
replacing func() with xfunc() where appropriate
2006-09-03 12:21:59 +00:00
Bernhard Reutner-Fischer
d591a360d3
- merge -r15463:15564 from busybox_scratch branch through these changesets:
...
------------------------------------------------------------------------
r15465 | aldot | 2006-06-21 20:48:06 +0200 (Wed, 21 Jun 2006) | 3 lines
- use CONFIG_BUSYBOX_EXEC_PATH as before it one was broken by a recent revert.
- use xchdir() since all is invain if it fails there anyways, supposedly
------------------------------------------------------------------------
r15466 | aldot | 2006-06-21 20:55:16 +0200 (Wed, 21 Jun 2006) | 2 lines
- adjust docs to take CONFIG_BUSYBOX_EXEC_PATH into account.
------------------------------------------------------------------------
r15467 | aldot | 2006-06-21 21:31:24 +0200 (Wed, 21 Jun 2006) | 18 lines
- partial fallout of my TREE_USED touchup against gcc-4.2: rip unused vars, save
s 144 bytes
text data bss dec hex filename
862434 10156 645924 1518514 172bb2 busybox.old
862322 10156 645892 1518370 172b22 busybox
function old new delta
z_len 4 - -4
textend 4 - -4
part_nb 4 - -4
insize 4 - -4
ifile_size 4 - -4
do_link 4 - -4
new_text 70 60 -10
ipaddr_list_link 33 23 -10
gzip_main 898 822 -76
------------------------------------------------------------------------------
(add/remove: 0/6 grow/shrink: 0/3 up/down: 0/-120) Total: -120 bytes
------------------------------------------------------------------------
r15468 | aldot | 2006-06-21 21:43:05 +0200 (Wed, 21 Jun 2006) | 19 lines
- remove useless global exports
function old new delta
rpm_main 940 1601 +661
rpm_getstring 107 112 +5
rpm_getint 148 153 +5
loop_through_files 103 106 +3
fileaction_dobackup 115 113 -2
fileaction_list 5 - -5
rpm_getcount 42 - -42
extract_cpio_gz 161 - -161
rpm_gettags 504 - -504
------------------------------------------------------------------------------
(add/remove: 0/4 grow/shrink: 4/1 up/down: 674/-714) Total: -40 bytes
text data bss dec hex filename
862322 10156 645892 1518370 172b22 busybox.old
862290 10156 645892 1518338 172b02 busybox
------------------------------------------------------------------------
r15555 | aldot | 2006-06-30 14:10:11 +0200 (Fri, 30 Jun 2006) | 22 lines
- shrink syslog a little bit, move a big buffer (for 'line') off the bss, fold s
emaphore stuff into single caller manually.
stats:
function old new delta
logMessage 395 427 +32
message 1245 1257 +12
opts - 4 +4
small 1 - -1
local_logging 4 - -4
doRemoteLog 4 - -4
circular_logging 4 - -4
syslogd_main 1299 1285 -14
static.res 36 16 -20
.rodata 186650 186586 -64
static.line 1025 - -1025
------------------------------------------------------------------------------
(add/remove: 1/5 grow/shrink: 2/3 up/down: 48/-1136) Total: -1088 bytes
cow@s37:~/src/busybox_scratch$ size sysklogd/syslogd.o{.orig,}
text data bss dec hex filename
3723 348 5242 9313 2461 sysklogd/syslogd.o.orig
3697 348 4188 8233 2029 sysklogd/syslogd.o
==============================================================================
Overall bloatcheck for the changeset mentioned above:
function old new delta
rpm_main 953 1608 +655
logMessage 395 427 +32
message 1245 1257 +12
opts - 4 +4
rpm_getstring 107 110 +3
rpm_getint 148 151 +3
loop_through_files 103 104 +1
small 1 - -1
fileaction_dobackup 115 113 -2
z_len 4 - -4
textend 4 - -4
part_nb 4 - -4
local_logging 4 - -4
insize 4 - -4
ifile_size 4 - -4
do_link 4 - -4
doRemoteLog 4 - -4
circular_logging 4 - -4
fileaction_list 5 - -5
new_text 70 60 -10
ipaddr_list_link 33 23 -10
clear_bufs 31 21 -10
syslogd_main 1287 1273 -14
builtin_help 190 176 -14
static.res 36 16 -20
builtin_source 229 199 -30
rpm_getcount 42 - -42
gzip_main 842 786 -56
.rodata 227176 227112 -64
lash_main 609 527 -82
busy_loop 3883 3739 -144
extract_cpio_gz 155 - -155
rpm_gettags 501 - -501
static.line 1025 - -1025
------------------------------------------------------------------------------
(add/remove: 1/15 grow/shrink: 6/12 up/down: 710/-2221) Total: -1511 bytes
2006-08-20 17:35:13 +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
Rob Landley
ea224be6aa
skip_whitespace() shouldn't claim its return value is const, it doesn't know
...
that and callers wind up typecasting it back.
2006-06-18 20:20:07 +00:00
Bernhard Reutner-Fischer
fd4b61d5f3
- add needed includes and include busybox.h needed for the ATTRIBUTE define.
2006-06-16 12:28:39 +00:00
Bernhard Reutner-Fischer
f1bd42a305
- correct typo
2006-06-14 16:51:50 +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
Rob Landley
a6e131dab3
Size reductions, mostly switching things to use libbb functions.
2006-05-29 06:43:55 +00:00
Rob Landley
7723019c6b
Patch from Bernhard Fischer to remove some useless bits.
2006-05-17 20:24:53 +00:00
Mike Frysinger
d9b6b844e5
pull Rules.mak from top_srcdir as pointed out by Robert P. J. Day on the mailing list
2006-05-13 02:33:41 +00:00
Bernhard Reutner-Fischer
fa939aae81
- include proper headers.
2006-04-05 16:21:37 +00:00
Bernhard Reutner-Fischer
9a67ca309c
- janitorial: include proper prototypes in libiproute.
2006-04-02 21:14:19 +00:00
Bernhard Reutner-Fischer
df10094870
- revert back to r14406
2006-03-13 19:04:00 +00:00
Bernhard Reutner-Fischer
39a9fddb53
- fix typo
2006-03-09 16:49:01 +00:00
Bernhard Reutner-Fischer
07a79e75f5
- backout using features which are not available with the previous stable
...
version of make (3.71.1).
2006-03-09 09:03:37 +00:00
Rob Landley
dfba741457
Robert P. Day removed 8 gazillion occurrences of "extern" on function
...
definitions. (That should only be on prototypes.)
2006-03-06 20:47:33 +00:00
Eric Andersen
cbd1c85744
Kill off some unused code that was wasting several k, as noticed by
...
Denis Vlasenko when building with -ffunction-sections -fdata-sections
2006-03-03 18:37:39 +00:00
Bernhard Reutner-Fischer
022eb311d5
- use absolute path for top_builddir and top_srcdir.
...
Fixes make trying to include the very same file in an endless loop.
2006-03-02 17:33:25 +00:00
Bernhard Reutner-Fischer
5d26126b9e
- fixes parallel builds (make -j)
...
- use less resources for the buildsystem itself
2006-03-01 22:54:48 +00:00
Rob Landley
0a7c8ef6e2
Patch from Denis Vlasenko to constify things and fix a few typos.
2006-02-22 17:01:00 +00:00
Mike Frysinger
b38673fb9f
make the build system puuuuuuuuuuurty
2006-02-02 01:41:53 +00:00
Eric Andersen
d78aea8b8e
sort out yet more type issues
2006-01-30 18:00:02 +00:00
Bernhard Reutner-Fischer
20f4000086
- add some ATTRIBUTE_UNUSED.
...
- use shorter boilerplate while at it.
2006-01-30 17:17:14 +00:00
Tim Riker
c1ef7bdd8d
just whitespace
2006-01-25 00:08:53 +00:00
Bernhard Reutner-Fischer
86f5c9906b
- add platform.h.
...
- use shorter boilerplate while at it.
2006-01-22 22:55:11 +00:00
Bernhard Reutner-Fischer
7ca61b6f33
- shared libbusybox.
...
- IMA compilation option (aka IPO, IPA,..)
Please holler if i broke something..
2006-01-15 14:04:57 +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
d1d23a6e67
- mark argument who of print_route as unused.
2006-01-12 12:08:46 +00:00
Rob Landley
483027f166
Patch from dlively (whoever that is, see bug 591) to fix
...
"ip link set <dev> addr".
2005-12-15 05:29:48 +00:00
"Vladimir N. Oleynik"
2f0a5f947a
restore compare_string_array new interface (make broken by landley)
2005-12-06 12:00:39 +00:00
Bernhard Reutner-Fischer
ab1878245c
* uniq.c: remove unneeded include and use short boilerplate.
...
* coreutils.h: remove prototype of non-existing xgetoptfile_sort_uniq
and add boilerplate.
* networking/{ipaddr,ip,iplink,iproute,iptunnel}.c: touch includes
and use short boilerplate.
* libiproute/iproute.c: rename round to avoid clashes with older
SuSE gcc and use short boilerplate.
2005-10-26 10:47:26 +00:00
Bernhard Reutner-Fischer
1d62d3b7b9
- make libiproute compile..
2005-10-08 20:47:15 +00:00
"Vladimir N. Oleynik"
007a011647
network "default" --> bb_INET_default. Reduce 2 exported from find applet
2005-09-22 11:11:11 +00:00
Mike Frysinger
4d00896d05
use toplevel ARFLAGS and update default ARFLAGS to be quiet
2005-07-27 01:09:24 +00:00
Paul Fox
5dc0ceeb9e
applying fix for:
...
0000203: 'ip route flush cache' not implemented
2005-07-20 19:01:05 +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
Mike Frysinger
4e5936ef95
In Bug 208, bernhardf writes:
...
On machines with only ANSI compliant compilers, not explitily delcaring
an empty parameter list 'void' causes failure.
2005-04-16 04:30:38 +00:00
Eric Andersen
7daa076d3e
egor duda writes:
...
Hi!
I've created a patch to busybox' build system to allow building it in
separate tree in a manner similar to kbuild from kernel version 2.6.
That is, one runs command like
'make O=/build/some/where/for/specific/target/and/options'
and everything is built in this exact directory, provided that it exists.
I understand that applyingc such invasive changes during 'release
candidates' stage of development is at best unwise. So, i'm currently
asking for comments about this patch, starting from whether such thing
is needed at all to whether it coded properly.
'make check' should work now, and one make creates Makefile in build
directory, so one can run 'make' in build directory after that.
One possible caveat is that if we build in some directory other than
source one, the source directory should be 'distclean'ed first.
egor
2004-10-08 07:46:08 +00:00
Glenn L McGrath
4014ab1c60
Set default command to list rather than get, its default behaviour now
...
coincides with upstream. Patch from debian diff.
2004-08-11 08:10:58 +00:00
Eric Andersen
6c8161d69f
Steve Grubb writes:
...
Hello,
Last November a bug was found in iproute. CAN-2003-0856 has more information.
Basically, netlink packets can come from any user. If a program performs action
based on netlink packets, they must be examined to make sure they came from the
place they are expected (the kernel).
Attached is a patch against pre8. Please apply this before releasing 1.00 final.
All users of busy box may be vulnerable to local attacks without it.
Best Regards,
Steve Grubb
2004-05-05 07:05:32 +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
Glenn L McGrath
36c7478992
Fix up conditional compile of files needed by ip applets
2004-04-12 02:22:39 +00:00
Eric Andersen
c7bda1ce65
Remove trailing whitespace. Update copyright to include 2004.
2004-03-15 08:29:22 +00:00
Eric Andersen
1a834be1ce
Use proper C99 types
2004-01-30 22:59:50 +00:00
Eric Andersen
1a773a656e
Manousaridis Angelos writes:
...
Another issue I found was with the iproute utility. While using another
program I found that it failed because the "ip route del" command was
not found. I looked at the full iproute implementation and this command
exists. The busybox version has the "ip route delete" command. I have
created a patch which makes the "ip route del" command an alias to the
"ip route delete" command.
2003-12-19 10:47:40 +00:00
Glenn L McGrath
08dea3e5a7
"This function was not updating the argc and argv pointers to reflect
...
the arguments it consumed, which means the calling function encountered
them as well. As a result, a command like "ip -6 addr" was yielding a usage
error." - Philip Blundell
2003-08-29 10:58:46 +00:00
Eric Andersen
cb81e6484d
Update a bunch of docs. Run a script to update my email addr.
2003-07-14 21:21:08 +00:00
Eric Andersen
feb283a437
On second thought, this is a better way to fix things
2003-07-14 08:49:43 +00:00
Eric Andersen
9059e3a37b
Don't use Linux kernel headers
...
-Erik
2003-07-14 08:46:30 +00:00
Eric Andersen
0f08e53535
Patch from Lars Kellogg-Stedman:
...
I'm building BusyBox using a development kit for MontaVista Hardhat Linux
(PPC) -- which, at least in this instance, is based around kernel 2.2.14.
I've had to massage a few files in networking/libiproute/ to make it
compile. Specifically:
(1) Added a #include <sys/uio.h> for the iovec structure in
libnetlink.c,
(2) Put ifdefs in ll_types.c and ll_proto.c around various
constants (ETH_P_xxx and ARPHRD_xxx) that weren't defined,
(3) Make do_changename() in iplink.c require a kernel >=
2.4.0 -- the ifr structure in my environment doesn't
have the ifr_name attribute. I've assumed this is
a kernel dependency -- let me know if I ought to be
checking something else.
In the absence of the correct kernel, do_changename()
always returns 0.
Attached is a patch against the current CVS that will make these changes.
-- Lars
2003-06-20 09:05:00 +00:00
Glenn L McGrath
fbf0b8af41
iPatch from waldi, fixes usage of ip route flush (from)? (match|exact)
2003-04-26 02:22:19 +00:00
Manuel Novoa III
cad5364599
Major coreutils update.
2003-03-19 09:13:01 +00:00
Glenn L McGrath
4a4c677fcc
Patch from Bastian Blank
...
- ip route flush
- different usage for telnetd in inetd mode
- changes for the default flags of the ip features
- if no /usr requested, udhcpc should use the script also without /usr.
2003-02-15 11:50:33 +00:00
Eric Andersen
496411b489
Don't use HZ -- use sysconf(_SC_CLK_TCK)
2003-02-12 10:56:53 +00:00
Eric Andersen
66a3af9d7c
This seems sufficient for ifup and ifdown to actually work
...
as advertised. Works for me (at least with glibc)
2003-01-27 17:41:19 +00:00
Eric Andersen
d8fdf0c57d
Fix a typo that broke it so busybox won't build
2003-01-22 01:20:35 +00:00
Glenn L McGrath
5cc9ada0e4
header update
2003-01-21 00:03:05 +00:00
Eric Andersen
ab4e19afc6
Eliminate most instances where we use linux kernel headers
...
-Erik
2003-01-14 08:54:08 +00:00
Eric Andersen
8004bb7661
Eliminate use of kernel header file
...
-Erik
2003-01-14 08:06:07 +00:00
Glenn L McGrath
d66370cd73
Option to allow ifupdown use ip commands instead of ifconfig, add flush
...
command to ipaddr, patch by Bastian Blank
2003-01-13 21:40:38 +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
1e132dd4dd
fix warning
2002-12-16 06:40:37 +00:00
Glenn L McGrath
84cc4e7e3e
undefine sysinfo to prevent breakage on ia64
2002-12-11 03:55:52 +00:00
Glenn L McGrath
2626ef613e
Use compare_string_array in ipaddress to save a few bytes, minor cleanups
2002-12-02 01:40:05 +00:00
Glenn L McGrath
18eae0031a
Save a few more bytes
2002-12-02 00:54:10 +00:00
Glenn L McGrath
c82f2324bd
Save a hundred bytes or so on the do_iproute function
2002-12-02 00:35:23 +00:00
Glenn L McGrath
f112daa232
Enable ip commands to be compiled seperate from ip, modifed patch from Bastian Blank
2002-12-01 23:04:06 +00:00
Glenn L McGrath
82d2cd4ead
Clean up error messages
2002-11-28 12:45:48 +00:00
Glenn L McGrath
1b0813ab61
Minor error messages changes
2002-11-28 12:39:19 +00:00
Glenn L McGrath
d4de975cd2
Cleanup error messages
2002-11-28 12:35:46 +00:00
Glenn L McGrath
8b6024449f
Cleanup error messages
2002-11-28 12:19:51 +00:00
Glenn L McGrath
e3e2a7b41c
Syntax error
2002-11-28 12:01:25 +00:00
Glenn L McGrath
1652855fbc
Style, error_msg
2002-11-28 11:17:19 +00:00
Glenn L McGrath
9048ae5923
Use standard error messages
2002-11-28 10:56:38 +00:00
Glenn L McGrath
df72536f8e
Use error_msg instead of fprintf(stderr
2002-11-28 10:49:14 +00:00
Glenn L McGrath
50c00f4b45
Use error_msg_and_die, style
2002-11-18 07:26:42 +00:00
Eric Andersen
5780adb586
Patch from Bastian Blank:
...
hi erik
the following patch fixes the handling of iproute add <route> dev <dev>.
the code got lost while removing things.
bastian
2002-11-15 09:12:47 +00:00
Glenn L McGrath
8ae75013c8
Only compile the files in this dir if the IP applet is enabled
2002-11-10 10:20:45 +00:00
Glenn L McGrath
9a2d27249c
IP applet by Bastian Blank <waldi@debian.org>
2002-11-10 01:33:55 +00:00