X-Git-Url: https://jxself.org/git/?a=blobdiff_plain;f=tfcrypt.h;h=58d77d56f7ccd9aba43c72535ff45a4024ceffe6;hb=92b6bb91a5be9fc1b4d300f99b239cb8e3a6398d;hp=67b4956cf83d8952289afdb3a4682d1161559d93;hpb=96e6e88fd94af95e15d143e4a86d5a9e858d340d;p=tfcrypt.git diff --git a/tfcrypt.h b/tfcrypt.h index 67b4956..58d77d5 100644 --- a/tfcrypt.h +++ b/tfcrypt.h @@ -132,6 +132,7 @@ extern tfc_yesno do_full_key; extern char *progname; extern int exitcode; +extern pid_t progpid; extern tfc_byte key[TF_KEY_SIZE], ctr[TF_BLOCK_SIZE], xtskey[TF_KEY_SIZE], mackey[TF_FROM_BITS(TF_MAX_BITS)], tweak[TF_TWEAK_SIZE]; extern struct skein sk; extern struct tfe_stream tfe; @@ -157,8 +158,8 @@ extern int do_edcrypt, do_stop, quiet, error_action; extern int counter_opt, mackey_opt, do_mac, do_outfmt, rawkey; extern int idx, write_flags; extern tfc_yesno catch_all_errors, ignore_seek_errors, password, overwrite_source, do_fsync, do_pad, do_ftrunc; -extern tfc_yesno do_preserve_time, do_stats_in_gibs, do_statline_dynamic, do_less_stats; -extern tfc_yesno no_repeat, do_full_hexdump, verbose, statline_was_shown, show_secrets; +extern tfc_yesno do_preserve_time, do_stats_in_gibs, do_statline_dynamic, do_less_stats, show_pid; +extern tfc_yesno no_repeat, do_full_hexdump, verbose, statline_was_shown, show_secrets, show_when_done; extern char *srcfname, *dstfname, *do_mac_file, *counter_file, *sksum_hashlist_file; extern char *saltf, *genkeyf, *mackeyf, *tweakf; extern char *pw_prompt, *mac_pw_prompt; @@ -169,6 +170,8 @@ extern struct getpasswd_state getps; size_t xread(int fd, void *data, size_t szdata); size_t xwrite(int fd, const void *data, size_t szdata); +extern tfc_yesno xexit_no_nl; + void xerror(tfc_yesno noexit, tfc_yesno noerrno, tfc_yesno nostats, const char *fmt, ...); void xexit(int status); void usage(void); @@ -190,6 +193,7 @@ void xclose(int fd); const char *tfc_modename(int mode); void tfc_getcurtime(tfc_useconds *tx); char *tfc_format_time(tfc_useconds t); +char *tfc_format_pid(const char *str); tfc_fsize tfc_fdsize(int fd); tfc_fsize tfc_fdgetpos(int fd); tfc_fsize tfc_fnamesize(char *fname, tfc_yesno noexit); @@ -221,7 +225,7 @@ enum { NO, YES }; enum { TFC_ERRACT_EXIT, TFC_ERRACT_CONT, TFC_ERRACT_SYNC, TFC_ERRACT_LSYNC }; enum { TFC_DO_PLAIN, TFC_DO_ENCRYPT, TFC_DO_DECRYPT }; -enum { TFC_MAC_DROP = -1, TFC_MAC_SIGN = 1, TFC_MAC_VRFY, TFC_MAC_JUST_VRFY, TFC_MAC_JUST_VRFY2 }; +enum { TFC_MAC_DROP2 = -2, TFC_MAC_DROP = -1, TFC_MAC_SIGN = 1, TFC_MAC_VRFY, TFC_MAC_JUST_VRFY, TFC_MAC_JUST_VRFY2 }; enum { TFC_MACKEY_RAWKEY = 1, TFC_MACKEY_PASSWORD, TFC_MACKEY_FILE }; enum { TFC_RAWKEY_KEYFILE = 1, TFC_RAWKEY_ASKSTR, TFC_RAWKEY_ASKHEX }; enum { TFC_OUTFMT_HEX = 1, TFC_OUTFMT_B64, TFC_OUTFMT_RAW };