X-Git-Url: https://jxself.org/git/?a=blobdiff_plain;f=tfc_error.c;h=d95f420f2f13d33dc00716a31d58a70964eab560;hb=e48de7c114fc724a6c1e45fd8716dc6111d01372;hp=f69fdbe4ed0bf0800fcad4a101f14a3633f6a4e3;hpb=cd6f1f9a84c17dbdf6ab320a04eae300502b898d;p=tfcrypt.git diff --git a/tfc_error.c b/tfc_error.c index f69fdbe..d95f420 100644 --- a/tfc_error.c +++ b/tfc_error.c @@ -62,6 +62,8 @@ _ex: void xexit(int status) { + if (status > 1) goto _do_clean_and_exit; + xclose(sfd); if (do_ftrunc > TFC_NO_FTRUNC) { if (do_ftrunc == TFC_FTRUNC_TAIL) ftrunc_dfd = total_processed_dst; @@ -70,6 +72,7 @@ void xexit(int status) if (do_preserve_time) fcopy_matime(dfd, &s_stat); xclose(dfd); +_do_clean_and_exit: memset(srcblk, 0, sizeof(srcblk)); memset(dstblk, 0, sizeof(dstblk)); @@ -313,6 +316,7 @@ void usage(void) tfc_say(" statless: emit less information in status line (only processed data)."); tfc_say(" norepeat: do not ask for any possible password confirmations."); tfc_say(" showsecrets: show passwords in plaintext instead of masking them."); + tfc_say(" finished: add \"finished\" word before status line when work is finished."); tfc_say(" prompt=str: set main password prompts to this string."); tfc_say(" macprompt=str: set MAC password prompts to this string."); tfc_say(" shorthex: with -H, do not print printable characters, dump only hex string.");