diff options
author | Denis Vlasenko <vda.linux@googlemail.com> | 2006-11-23 13:10:23 +0000 |
---|---|---|
committer | Denis Vlasenko <vda.linux@googlemail.com> | 2006-11-23 13:10:23 +0000 |
commit | 4e4662cc73bbc17c714307b234e781096ec82973 (patch) | |
tree | cbfe42f5f5fb3b45334044e43a56e0b3012759a2 /networking/wget.c | |
parent | c90c3f30a899b5f0aae58e54839109aa9b3eaee6 (diff) | |
download | busybox-w32-4e4662cc73bbc17c714307b234e781096ec82973.tar.gz busybox-w32-4e4662cc73bbc17c714307b234e781096ec82973.tar.bz2 busybox-w32-4e4662cc73bbc17c714307b234e781096ec82973.zip |
wget: -O - still outputs progressbar (to stderr)
Noticed dead code. -100 bytes.
Diffstat (limited to 'networking/wget.c')
-rw-r--r-- | networking/wget.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/networking/wget.c b/networking/wget.c index 0c547c651..f9a94627f 100644 --- a/networking/wget.c +++ b/networking/wget.c | |||
@@ -210,17 +210,18 @@ int wget_main(int argc, char **argv) | |||
210 | curfile = bb_get_last_path_component(fname_out); | 210 | curfile = bb_get_last_path_component(fname_out); |
211 | #endif | 211 | #endif |
212 | } | 212 | } |
213 | /* Impossible? | ||
213 | if ((opt & WGET_OPT_CONTINUE) && !fname_out) | 214 | if ((opt & WGET_OPT_CONTINUE) && !fname_out) |
214 | bb_error_msg_and_die("cannot specify continue (-c) without a filename (-O)"); | 215 | bb_error_msg_and_die("cannot specify continue (-c) without a filename (-O)"); */ |
215 | 216 | ||
216 | /* | 217 | /* |
217 | * Determine where to start transfer. | 218 | * Determine where to start transfer. |
218 | */ | 219 | */ |
219 | if (!strcmp(fname_out, "-")) { | 220 | if (fname_out[0] == '-' && !fname_out[1]) { |
220 | output_fd = 1; | 221 | output_fd = 1; |
221 | opt |= WGET_OPT_QUIET; | ||
222 | opt &= ~WGET_OPT_CONTINUE; | 222 | opt &= ~WGET_OPT_CONTINUE; |
223 | } else if (opt & WGET_OPT_CONTINUE) { | 223 | } |
224 | if (opt & WGET_OPT_CONTINUE) { | ||
224 | output_fd = open(fname_out, O_WRONLY); | 225 | output_fd = open(fname_out, O_WRONLY); |
225 | if (output_fd >= 0) { | 226 | if (output_fd >= 0) { |
226 | beg_range = xlseek(output_fd, 0, SEEK_END); | 227 | beg_range = xlseek(output_fd, 0, SEEK_END); |
@@ -235,7 +236,7 @@ int wget_main(int argc, char **argv) | |||
235 | bb_lookup_host(&s_in, server.host); | 236 | bb_lookup_host(&s_in, server.host); |
236 | s_in.sin_port = server.port; | 237 | s_in.sin_port = server.port; |
237 | if (!(opt & WGET_OPT_QUIET)) { | 238 | if (!(opt & WGET_OPT_QUIET)) { |
238 | printf("Connecting to %s[%s]:%d\n", | 239 | fprintf(stderr, "Connecting to %s[%s]:%d\n", |
239 | server.host, inet_ntoa(s_in.sin_addr), ntohs(server.port)); | 240 | server.host, inet_ntoa(s_in.sin_addr), ntohs(server.port)); |
240 | } | 241 | } |
241 | 242 | ||