aboutsummaryrefslogtreecommitdiff
path: root/coreutils/tee.c
diff options
context:
space:
mode:
authorRon Yorston <rmy@pobox.com>2016-05-16 09:33:03 +0100
committerRon Yorston <rmy@pobox.com>2016-05-16 09:33:03 +0100
commit35d2f5bccb0f3dde600702ebcdb5424d4d50be4a (patch)
tree6e0ff0341c69839e268459a199682628bae734ed /coreutils/tee.c
parent248a2600a2f4b442101ad568d1994b908bb28d4b (diff)
parentf2559e5c2b7bd2c5fa0dd8e88d0a931da92a23af (diff)
downloadbusybox-w32-35d2f5bccb0f3dde600702ebcdb5424d4d50be4a.tar.gz
busybox-w32-35d2f5bccb0f3dde600702ebcdb5424d4d50be4a.tar.bz2
busybox-w32-35d2f5bccb0f3dde600702ebcdb5424d4d50be4a.zip
Merge branch 'busybox' into merge
Diffstat (limited to 'coreutils/tee.c')
-rw-r--r--coreutils/tee.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/coreutils/tee.c b/coreutils/tee.c
index 48cc0508f..a68e9446f 100644
--- a/coreutils/tee.c
+++ b/coreutils/tee.c
@@ -23,6 +23,7 @@
23//usage: "Hello\n" 23//usage: "Hello\n"
24 24
25#include "libbb.h" 25#include "libbb.h"
26#include "common_bufsiz.h"
26 27
27int tee_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE; 28int tee_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
28int tee_main(int argc, char **argv) 29int tee_main(int argc, char **argv)
@@ -37,6 +38,7 @@ int tee_main(int argc, char **argv)
37#if ENABLE_FEATURE_TEE_USE_BLOCK_IO 38#if ENABLE_FEATURE_TEE_USE_BLOCK_IO
38 ssize_t c; 39 ssize_t c;
39# define buf bb_common_bufsiz1 40# define buf bb_common_bufsiz1
41 setup_common_bufsiz();
40#else 42#else
41 int c; 43 int c;
42#endif 44#endif
@@ -79,7 +81,7 @@ int tee_main(int argc, char **argv)
79 /* names[0] will be filled later */ 81 /* names[0] will be filled later */
80 82
81#if ENABLE_FEATURE_TEE_USE_BLOCK_IO 83#if ENABLE_FEATURE_TEE_USE_BLOCK_IO
82 while ((c = safe_read(STDIN_FILENO, buf, sizeof(buf))) > 0) { 84 while ((c = safe_read(STDIN_FILENO, buf, COMMON_BUFSIZE)) > 0) {
83 fp = files; 85 fp = files;
84 do 86 do
85 fwrite(buf, 1, c, *fp); 87 fwrite(buf, 1, c, *fp);