From 20360ed200b894e3464bca11dfe0ebac60b4d4f2 Mon Sep 17 00:00:00 2001 From: smitsohu Date: Tue, 17 Sep 2019 14:47:39 +0200 Subject: fix the fix: tune file copy limit width --- src/fcopy/main.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/fcopy') diff --git a/src/fcopy/main.c b/src/fcopy/main.c index a08cc66b3..00cbe8d12 100644 --- a/src/fcopy/main.c +++ b/src/fcopy/main.c @@ -28,8 +28,8 @@ int arg_quiet = 0; int arg_debug = 0; static int arg_follow_link = 0; -static unsigned long long copy_limit = 500 * 1024 * 1024; // 500 MB -static unsigned long long size_cnt = 0; +static unsigned long copy_limit = 500 * 1024 * 1024; // 500 MB +static unsigned long size_cnt = 0; static int size_limit_reached = 0; static unsigned file_cnt = 0; @@ -186,7 +186,7 @@ static int fs_copydir(const char *infname, const struct stat *st, int ftype, str // recalculate size if ((s.st_size + size_cnt) > copy_limit) { - fprintf(stderr, "Error fcopy: size limit of %lluMB reached\n", (copy_limit / 1024) / 1024); + fprintf(stderr, "Error fcopy: size limit of %lu MB reached\n", (copy_limit / 1024) / 1024); size_limit_reached = 1; free(outfname); return 0; @@ -393,7 +393,7 @@ int main(int argc, char **argv) { if (cl) { copy_limit = strtoul(cl, NULL, 10) * 1024 * 1024; if (arg_debug) - printf("file copy limit %llu bytes\n", copy_limit); + printf("file copy limit %lu bytes\n", copy_limit); } // copy files -- cgit v1.2.3-54-g00ecf