Commit Graph

2062 Commits

Author SHA1 Message Date
Pere Orga
5369563bf9 wget: reduce bloat
Signed-off-by: Pere Orga <gotrunks@gmail.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-02-19 23:56:39 +01:00
Vladislav Grishenko
5827167338 udhcpd: optional IP selection based on MAC hash
function                                             old     new   delta
find_free_or_expired_nip                             153     225     +72

Signed-off-by: Vladislav Grishenko <themiron@mail.ru>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-02-16 13:31:30 +01:00
Denys Vlasenko
28556b95fe wget: check for final write errors for -O FILE too
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-02-15 11:03:53 +01:00
Denys Vlasenko
2384a357f4 wget: make "wget -O FILE URL1 URL2" concatenate output
Also fixes a few cases where URL1's data (like start pos)
was leaking into URL2

function                                             old     new   delta
wget_main                                           2303    2321     +18
progress_meter                                       140     152     +12
retrieve_file_data                                   397     396      -1
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 2/1 up/down: 30/-1)              Total: 29 bytes

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-02-15 00:58:36 +01:00
Pere Orga
57b4909db9 wget: fix SEGV with multiple urls and redirection
Signed-off-by: Pere Orga <gotrunks@gmail.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-02-14 23:56:07 +01:00
Vladislav Grishenko
713e6d78e1 udhcpc: use more correct, and more importantly, more understandable BPF code
Signed-off-by: Vladislav Grishenko <themiron@mail.ru>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-02-14 04:50:30 +01:00
Denys Vlasenko
9a5b7f636d wget: support multiple URLs on command line even without -O :)
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-02-13 02:49:43 +01:00
Denys Vlasenko
a3661096f2 wget: support multiple URLs on command line
function                                             old     new   delta
wget_main                                           2190    2310    +120
progress_meter                                       124     140     +16
parse_url                                            288     304     +16
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 3/0 up/down: 152/0)             Total: 152 bytes

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-02-13 02:33:11 +01:00
Denys Vlasenko
a84eadf9bf typo fix in comment
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-02-12 23:40:31 +01:00
Denys Vlasenko
88ad9da65e wget: display 100% at the _end_ of chunked download
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-02-11 23:06:21 +01:00
Denys Vlasenko
c60f4460bb wget: chunked mode fix. Closes bug 3229
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-02-11 22:23:23 +01:00
Denys Vlasenko
f9af375668 wget: explain clearerr more clearly
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-02-11 22:01:33 +01:00
Denys Vlasenko
8766a791e8 wget: correctly handle rare case when we get EAGAIN _on first_ read
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-02-11 21:42:00 +01:00
Denys Vlasenko
ab8d00d64f progress meter: fix bugs found in stall detection and unknown size logic
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-02-11 19:09:30 +01:00
Denys Vlasenko
d55e139649 progress meter: move file name to bb_progress_t. +20 bytes
We were doing expensive unicode conversion on every update

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-02-11 18:56:13 +01:00
Denys Vlasenko
f836f01cc3 wget: shrink progress meter code; strink wget and add debug logging
function                                             old     new   delta
fgets_and_trim                                         -      73     +73
retrieve_file_data                                   367     349     -18
bb_progress_update                                   723     699     -24
wget_main                                           2220    2190     -30
ftpcmd                                               133      87     -46
gethdr                                               200     153     -47
------------------------------------------------------------------------------
(add/remove: 1/0 grow/shrink: 0/5 up/down: 73/-165)           Total: -92 bytes

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-02-10 23:02:28 +01:00
Denys Vlasenko
9213a55bf0 wget: use closed HTTP/1.1 connection, stop when we dl'ed $content_len bytes
function                                             old     new   delta
retrieve_file_data                                   353     367     +14

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-02-10 13:23:45 +01:00
Denys Vlasenko
dee0fc9da1 save 10 bytes on strings
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-02-10 10:01:49 +01:00
Denys Vlasenko
0fac2f7b5b wget: remove functions which retry on EINTR
function                                             old     new   delta
retrieve_file_data                                   392     353     -39
safe_fgets                                            58       -     -58
------------------------------------------------------------------------------
(add/remove: 0/1 grow/shrink: 0/1 up/down: 0/-97)             Total: -97 bytes

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-02-10 09:55:05 +01:00
Denys Vlasenko
e3ece7878b fix trivial build failure
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-02-10 09:50:07 +01:00
Denys Vlasenko
df4e16c9af wget: use FEATURE_COPYBUF_KB-sized buffer. Much faster for local transfers
function                                             old     new   delta
base64enc                                              -      53     +53
gethdr                                               190     200     +10
ftpcmd                                               129     133      +4
progress_meter                                       160     122     -38
retrieve_file_data                                   431     392     -39
base64enc_512                                         46       -     -46
wget_main                                           2456    2220    -236
------------------------------------------------------------------------------
(add/remove: 1/1 grow/shrink: 2/3 up/down: 67/-359)          Total: -292 bytes

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-02-10 06:29:06 +01:00
Denys Vlasenko
77350aa933 tc: less ugly check for bad sizeof(G)
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-02-10 06:28:09 +01:00
Denys Vlasenko
f133471302 iproute: fix handling of "dev IFACE" selector
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-02-09 04:39:09 +01:00
Denys Vlasenko
fbea220560 udhcpc: fix a problem with binary-encoded options
function                                             old     new   delta
attach_option                                        395     413     +18

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-02-06 18:00:58 +01:00
Denys Vlasenko
281e7b8848 ping: trivial simplification. -2 bytes
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-02-06 17:51:45 +01:00
Denys Vlasenko
1bb52a9b73 ping: fix IPv6 pinging. Closes bug 3187
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-02-05 03:58:43 +01:00
Denys Vlasenko
b7c9fb27cb whitespace fixes
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-02-03 00:05:48 +01:00
Denys Vlasenko
8d0e0cdadf move utmp.h include to libbb.h
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-01-25 23:21:46 +01:00
Denys Vlasenko
dd169e8468 eliminate aliasing warnings in traceroute.c and udhcp/socket.c
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-01-20 12:13:23 +01:00
Denys Vlasenko
b3b6c8bdf2 eliminate aliasing warning in networking/route.c
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-01-20 11:29:00 +01:00
Denys Vlasenko
53f30b41ec ifplugd: eliminate aliasing warnings
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-01-20 01:20:36 +01:00
Denys Vlasenko
b9f2d9f7d9 mass removal of underscores from _BB_DIR_foo and _BB_SUID_foo
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-01-18 13:58:01 +01:00
Denys Vlasenko
df1689138e remove a few aliasing warnings
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-01-16 01:25:34 +01:00
Denys Vlasenko
8030a14849 httpd: send correct mtime for .gz files
Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
2011-01-11 17:59:45 +01:00
Denys Vlasenko
dc7e5c46b0 libbb unicode: comment out usused function and unused parameter
Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
2011-01-11 13:08:28 +01:00
Denys Vlasenko
84dba9c5bb tftp: fix bad interaction betweel poll() and alarm(). Closes bug 3061
This was breaking timeout handling.

function                                             old     new   delta
tftp_progress_update                                   -      45     +45
tftp_progress_done                                     -      32     +32
tftp_protocol                                       1839    1858     +19
tftp_progress_init                                     9      15      +6
tftp_main                                            298     286     -12
------------------------------------------------------------------------------
(add/remove: 2/0 grow/shrink: 2/1 up/down: 102/-12)            Total: 90 bytes

Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
2011-01-10 12:51:44 +01:00
Denys Vlasenko
6100b51ca8 explain every non-SUID_DROP applet. No code changes
Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
2011-01-03 13:57:49 +01:00
Denys Vlasenko
8993c3f260 udhcpc: document SIGUSRn effect in help text
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-12-25 06:21:54 +01:00
Denys Vlasenko
58c3d21c2e telnetd: write utmp record with correct pid
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-11-30 09:17:30 +01:00
Denys Vlasenko
3c8799b8a4 ping: set not only IP_TTL, but also IP_MULTICAST_TTL
Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
2010-11-29 12:07:12 +01:00
Joachim Nilsson
714e2b7e6a ping: add -t TTL option
function                                             old     new   delta
common_ping_main                                    1755    1796     +41
packed_usage                                       27954   27971     +17
bbconfig_config_bz2                                 4965    4966      +1
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 3/0 up/down: 59/0)               Total: 59 bytes

Signed-off-by: Joachim Nilsson <joachim.nilsson@vmlinux.org>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-11-28 23:01:18 +01:00
Denys Vlasenko
713d241852 dhcpd: reply with NAK to clients in INIT-REBOOT state w/o existing lease
We were not responding to them at all.

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-11-28 21:51:44 +01:00
Denys Vlasenko
1c31e9e82b use BB_EXECVP_or_die where appropriate
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-11-28 04:34:09 +01:00
Denys Vlasenko
fa5e295600 dhcpd: smaller code: do not look for REQUESTED_IP twice
text    data     bss     dec     hex filename
 883235     936   17192  901363   dc0f3 busybox_old
 883219     936   17192  901347   dc0e3 busybox_unstripped

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-11-28 01:10:51 +01:00
Denys Vlasenko
1e23f32453 nc: fix SEGV on -v when NC_EXTRA is off
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-11-22 05:30:54 +01:00
Mike Frysinger
a945f6190b inetd: if argv[0] is not specified, set it to program name
With inetd.conf files that skip argv[], inetd execs programs with argc==0.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-11-22 04:57:37 +01:00
Christian Hornung
3bbfb58bec ip: Fix command line option parsing of "ip route get ..."
I found and fixed a bug in the command line options parsing of "ip route get":
It was impossible to get any option other than the IP address
recognized correctly, and e.g. the command "ip route get connected"
just hung up infinitely in the options parsing loop instead of
printing an error message.

Signed-off-by: Christian Hornung <chhornung@googlemail.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-11-04 08:59:42 +01:00
Denys Vlasenko
11872cab32 networking/*: remove superfluous comments
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-10-30 02:24:48 +02:00
Denys Vlasenko
fb132e4737 whitespace cleanup
Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
2010-10-29 11:46:52 +02:00
Denys Vlasenko
66cb7bed33 ifupdown: add manual method for IPv6. Closes bug 2497.
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-10-29 02:42:20 +02:00