diff options
-rw-r--r-- | libbb/copyfd.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/libbb/copyfd.c b/libbb/copyfd.c index 2538d496d..82622c06f 100644 --- a/libbb/copyfd.c +++ b/libbb/copyfd.c | |||
@@ -17,19 +17,21 @@ static off_t bb_full_fd_action(int src_fd, int dst_fd, off_t size) | |||
17 | { | 17 | { |
18 | int status = -1; | 18 | int status = -1; |
19 | off_t total = 0; | 19 | off_t total = 0; |
20 | bool continue_on_write_error = 0; | ||
20 | #if CONFIG_FEATURE_COPYBUF_KB <= 4 | 21 | #if CONFIG_FEATURE_COPYBUF_KB <= 4 |
21 | char buffer[CONFIG_FEATURE_COPYBUF_KB * 1024]; | 22 | char buffer[CONFIG_FEATURE_COPYBUF_KB * 1024]; |
22 | enum { buffer_size = sizeof(buffer) }; | 23 | enum { buffer_size = sizeof(buffer) }; |
23 | #else | 24 | #else |
24 | char *buffer; | 25 | char *buffer; |
25 | int buffer_size; | 26 | int buffer_size; |
26 | bool continue_on_write_error = 0; | 27 | #endif |
27 | 28 | ||
28 | if (size < 0) { | 29 | if (size < 0) { |
29 | size = -size; | 30 | size = -size; |
30 | continue_on_write_error = 1; | 31 | continue_on_write_error = 1; |
31 | } | 32 | } |
32 | 33 | ||
34 | #if CONFIG_FEATURE_COPYBUF_KB > 4 | ||
33 | if (size > 0 && size <= 4 * 1024) | 35 | if (size > 0 && size <= 4 * 1024) |
34 | goto use_small_buf; | 36 | goto use_small_buf; |
35 | /* We want page-aligned buffer, just in case kernel is clever | 37 | /* We want page-aligned buffer, just in case kernel is clever |