From: Andrey Rys Date: Sun, 28 Nov 2021 00:50:05 +0000 (+0100) Subject: fix quiet mode and final reporting when using -O count. X-Git-Url: https://jxself.org/git/?p=tfcrypt.git;a=commitdiff_plain;h=c218fb98af0fbcba962101873756f76f66f4e4e9 fix quiet mode and final reporting when using -O count. --- diff --git a/VERSION b/VERSION index d81cc07..920a139 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -42 +43 diff --git a/tfcrypt.c b/tfcrypt.c index 3a7d303..719eff8 100644 --- a/tfcrypt.c +++ b/tfcrypt.c @@ -1219,7 +1219,10 @@ _wagain: lio = xwrite(dfd, pblk, lrem); _nowrite: total_processed_dst += ldone; delta_processed += ldone; - if (maxlen != NOFSIZE && total_processed_src >= maxlen) break; + if (maxlen != NOFSIZE && total_processed_src >= maxlen) { + do_stop = YES; + break; + } } errno = 0; @@ -1374,7 +1377,7 @@ _macwagain: lio = xwrite(dfd, pblk, lrem); memset(tmpdata, 0, sizeof(tmpdata)); } - if (verbose || status_timer || do_stop == YES) print_crypt_status(0); + if (verbose || status_timer || (do_stop == YES && quiet == NO)) print_crypt_status(0); xexit(exitcode); return -1;