summaryrefslogtreecommitdiffhomepage
path: root/libbb/copy_file_chunk.c
diff options
context:
space:
mode:
authorGlenn L McGrath <bug1@ihug.co.nz>2001-04-12 13:47:12 +0000
committerGlenn L McGrath <bug1@ihug.co.nz>2001-04-12 13:47:12 +0000
commitc9cac5be236475e91af1865a2dae2c2af5f19fd6 (patch)
tree833220c0e3e5fda94f60b9c4ce22a965a341c172 /libbb/copy_file_chunk.c
parent6785b51280d6b0c00e964e1e9b24ff05d92f5bcc (diff)
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.c5
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 @@
/*
* Copy chunksize bytes between two file descriptors
+ *
+ * unsigned long is used so that if -1 is passed as chunksize it will read as
+ * much as possible, and it will work with off_t or off64_t
*/
-extern int copy_file_chunk(FILE *src_file, FILE *dst_file, off_t chunksize)
+extern int copy_file_chunk(FILE *src_file, FILE *dst_file, unsigned long long chunksize)
{
off_t size, amount_written;
char buffer[BUFSIZ]; /* BUFSIZ is declared in stdio.h */