From d92643524de6aa37083e7b6f8be276d2f96dbd9f Mon Sep 17 00:00:00 2001 From: Andreas Ericsson Date: Tue, 27 Apr 2010 15:03:22 +0200 Subject: [PATCH] import: Use uint64_t for counting bytes and lines in logfiles Otherwise we run out of storage space when we encounter logs that total more than 4GB of data, which a lot of our customers have. This will have weird impact on the progress output, to say the least. Signed-off-by: Andreas Ericsson --- import.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/import.c b/import.c index f995af6..0c7fd92 100644 --- a/import.c +++ b/import.c @@ -30,7 +30,7 @@ static int only_notifications; -static uint imported, totsize, totlines; +static uint64_t imported, totsize, totlines; static int lines_since_progress, do_progress; static struct timeval import_start; static time_t daemon_start, daemon_stop, incremental; @@ -203,7 +203,7 @@ static void end_progress(void) mins = (tv.tv_sec - import_start.tv_sec) / 60; secs /= 1000000; secs -= (mins * 60); - printf("%s in %u lines imported in ", tobytes(totsize), totlines); + printf("%s in %llu lines imported in ", tobytes(totsize), totlines); if (mins) printf("%dm ", mins); printf("%.3fs\n", secs); -- 2.11.4.GIT