diff options
author | Denis Vlasenko <vda.linux@googlemail.com> | 2008-03-12 23:13:50 +0000 |
---|---|---|
committer | Denis Vlasenko <vda.linux@googlemail.com> | 2008-03-12 23:13:50 +0000 |
commit | 4cf1d08fc2e50f9abda999d468c5e972ff4995c2 (patch) | |
tree | 58dd8efdd7d0f0990d30d8b5f5f53cf2ee35d444 /networking/nc_bloaty.c | |
parent | 4e6d5117b839cef41cd3919966f95bf25d24d8d9 (diff) | |
download | busybox-w32-4cf1d08fc2e50f9abda999d468c5e972ff4995c2.tar.gz busybox-w32-4cf1d08fc2e50f9abda999d468c5e972ff4995c2.tar.bz2 busybox-w32-4cf1d08fc2e50f9abda999d468c5e972ff4995c2.zip |
nc: remove a bit of bloat
inetd: more NOMMU fixes
rx: shrink
devfsd: minor shrink
vlock: shrink
tcpudp: narrow down window where we have no wildcard socket
parse_one_line 1015 1102 +87
init_ring - 53 +53
xzalloc_lsa - 48 +48
read_byte 51 50 -1
rearm_alarm 28 25 -3
nc_main 1028 1000 -28
initring 53 - -53
vlock_main 583 496 -87
reread_config_file 1089 991 -98
rx_main 1046 912 -134
------------------------------------------------------------------------------
(add/remove: 2/1 grow/shrink: 1/6 up/down: 188/-404) Total: -216 bytes
text data bss dec hex filename
800120 661 7428 808209 c5511 busybox_old
799796 661 7428 807885 c53cd busybox_unstripped
Diffstat (limited to 'networking/nc_bloaty.c')
-rw-r--r-- | networking/nc_bloaty.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/networking/nc_bloaty.c b/networking/nc_bloaty.c index 2ee833e3f..ce4829584 100644 --- a/networking/nc_bloaty.c +++ b/networking/nc_bloaty.c | |||
@@ -751,6 +751,11 @@ int nc_main(int argc, char **argv) | |||
751 | if (option_mask32 & OPT_s) { /* local address */ | 751 | if (option_mask32 & OPT_s) { /* local address */ |
752 | /* if o_lport is still 0, then we will use random port */ | 752 | /* if o_lport is still 0, then we will use random port */ |
753 | ouraddr = xhost2sockaddr(str_s, o_lport); | 753 | ouraddr = xhost2sockaddr(str_s, o_lport); |
754 | #ifdef BLOAT | ||
755 | /* prevent spurious "UDP listen needs !0 port" */ | ||
756 | o_lport = get_nport(ouraddr); | ||
757 | o_lport = ntohs(o_lport); | ||
758 | #endif | ||
754 | x = xsocket(ouraddr->u.sa.sa_family, x, 0); | 759 | x = xsocket(ouraddr->u.sa.sa_family, x, 0); |
755 | } else { | 760 | } else { |
756 | /* We try IPv6, then IPv4, unless addr family is | 761 | /* We try IPv6, then IPv4, unless addr family is |
@@ -771,12 +776,14 @@ int nc_main(int argc, char **argv) | |||
771 | setsockopt(netfd, SOL_SOCKET, SO_SNDBUF, &o_sndbuf, sizeof o_sndbuf); | 776 | setsockopt(netfd, SOL_SOCKET, SO_SNDBUF, &o_sndbuf, sizeof o_sndbuf); |
772 | #endif | 777 | #endif |
773 | 778 | ||
779 | #ifdef BLOAT | ||
774 | if (OPT_l && (option_mask32 & (OPT_u|OPT_l)) == (OPT_u|OPT_l)) { | 780 | if (OPT_l && (option_mask32 & (OPT_u|OPT_l)) == (OPT_u|OPT_l)) { |
775 | /* apparently UDP can listen ON "port 0", | 781 | /* apparently UDP can listen ON "port 0", |
776 | but that's not useful */ | 782 | but that's not useful */ |
777 | if (!o_lport) | 783 | if (!o_lport) |
778 | bb_error_msg_and_die("UDP listen needs nonzero -p port"); | 784 | bb_error_msg_and_die("UDP listen needs nonzero -p port"); |
779 | } | 785 | } |
786 | #endif | ||
780 | 787 | ||
781 | FD_SET(0, &ding1); /* stdin *is* initially open */ | 788 | FD_SET(0, &ding1); /* stdin *is* initially open */ |
782 | if (proggie) { | 789 | if (proggie) { |