diff options
author | Glenn L McGrath <bug1@ihug.co.nz> | 2001-04-12 13:47:12 +0000 |
---|---|---|
committer | Glenn L McGrath <bug1@ihug.co.nz> | 2001-04-12 13:47:12 +0000 |
commit | c9cac5be236475e91af1865a2dae2c2af5f19fd6 (patch) | |
tree | 833220c0e3e5fda94f60b9c4ce22a965a341c172 /libbb/copy_file_chunk.c | |
parent | 6785b51280d6b0c00e964e1e9b24ff05d92f5bcc (diff) | |
download | busybox-w32-c9cac5be236475e91af1865a2dae2c2af5f19fd6.tar.gz busybox-w32-c9cac5be236475e91af1865a2dae2c2af5f19fd6.tar.bz2 busybox-w32-c9cac5be236475e91af1865a2dae2c2af5f19fd6.zip |
Change size to unsinged long long, so if -1 is passed it will read as much as possible.
Diffstat (limited to 'libbb/copy_file_chunk.c')
-rw-r--r-- | libbb/copy_file_chunk.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/libbb/copy_file_chunk.c b/libbb/copy_file_chunk.c index 90b6b8238..e9663c354 100644 --- a/libbb/copy_file_chunk.c +++ b/libbb/copy_file_chunk.c | |||
@@ -31,8 +31,11 @@ | |||
31 | 31 | ||
32 | /* | 32 | /* |
33 | * Copy chunksize bytes between two file descriptors | 33 | * Copy chunksize bytes between two file descriptors |
34 | * | ||
35 | * unsigned long is used so that if -1 is passed as chunksize it will read as | ||
36 | * much as possible, and it will work with off_t or off64_t | ||
34 | */ | 37 | */ |
35 | extern int copy_file_chunk(FILE *src_file, FILE *dst_file, off_t chunksize) | 38 | extern int copy_file_chunk(FILE *src_file, FILE *dst_file, unsigned long long chunksize) |
36 | { | 39 | { |
37 | off_t size, amount_written; | 40 | off_t size, amount_written; |
38 | char buffer[BUFSIZ]; /* BUFSIZ is declared in stdio.h */ | 41 | char buffer[BUFSIZ]; /* BUFSIZ is declared in stdio.h */ |