aboutsummaryrefslogtreecommitdiff
path: root/coreutils/tee.c
diff options
context:
space:
mode:
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);