diff options
| author | Dag-Erling Smørgrav <des@FreeBSD.org> | 2014-01-28 14:32:04 +0000 |
|---|---|---|
| committer | Dag-Erling Smørgrav <des@FreeBSD.org> | 2014-01-28 14:32:04 +0000 |
| commit | c2ea176dac56517cb41d102fc89e7a7a337c372d (patch) | |
| tree | 5e71d698d9ec27820a7ba59f9c9222a07819d91d /usr.bin/fetch | |
| parent | 2043423cd1c2ca8697d549ac7b8b948f1d0e9597 (diff) | |
Notes
Diffstat (limited to 'usr.bin/fetch')
| -rw-r--r-- | usr.bin/fetch/fetch.1 | 6 | ||||
| -rw-r--r-- | usr.bin/fetch/fetch.c | 3 |
2 files changed, 5 insertions, 4 deletions
diff --git a/usr.bin/fetch/fetch.1 b/usr.bin/fetch/fetch.1 index 6053518a8dad..b9d47855edc4 100644 --- a/usr.bin/fetch/fetch.1 +++ b/usr.bin/fetch/fetch.1 @@ -1,5 +1,5 @@ .\"- -.\" Copyright (c) 2000-2013 Dag-Erling Smørgrav +.\" Copyright (c) 2000-2014 Dag-Erling Smørgrav .\" Copyright (c) 2013 Michael Gmelin <freebsd@grem.de> .\" All rights reserved. .\" Portions Copyright (c) 1999 Massachusetts Institute of Technology; used @@ -30,7 +30,7 @@ .\" .\" $FreeBSD$ .\" -.Dd July 30, 2013 +.Dd January 28, 2014 .Dt FETCH 1 .Os .Sh NAME @@ -118,7 +118,7 @@ Automatically retry the transfer upon soft failures. Allow SSL version 2 when negotiating the connection. .It Fl B Ar bytes , Fl -buffer-size= Ns Ar bytes Specify the read buffer size in bytes. -The default is 4096 bytes. +The default is 16,384 bytes. Attempts to set a buffer size lower than this will be silently ignored. The number of reads actually performed is reported at verbosity level diff --git a/usr.bin/fetch/fetch.c b/usr.bin/fetch/fetch.c index 3236431ca1af..3f64151fef16 100644 --- a/usr.bin/fetch/fetch.c +++ b/usr.bin/fetch/fetch.c @@ -49,7 +49,7 @@ __FBSDID("$FreeBSD$"); #include <fetch.h> -#define MINBUFSIZE 4096 +#define MINBUFSIZE 16384 #define TIMEOUT 120 /* Option flags */ @@ -716,6 +716,7 @@ fetch(char *URL, const char *path) sigalrm = siginfo = sigint = 0; /* suck in the data */ + setvbuf(f, NULL, _IOFBF, B_size); signal(SIGINFO, sig_handler); while (!sigint) { if (us.size != -1 && us.size - count < B_size && |
