-O nobuf: disable IO buffering
[tfcrypt.git] / tfcrypt.h
index 58d77d56f7ccd9aba43c72535ff45a4024ceffe6..280661480c65787ed1a545e9bdbadc1dd25f278a 100644 (file)
--- a/tfcrypt.h
+++ b/tfcrypt.h
@@ -158,7 +158,7 @@ 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, show_pid;
+extern tfc_yesno do_preserve_time, do_stats_in_gibs, do_statline_dynamic, do_less_stats, show_pid, read_only;
 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;
@@ -189,8 +189,11 @@ void tfc_describescale(tfc_fsize num, double *w, int *scale);
 size_t blk_len_adj(tfc_fsize filelen, tfc_fsize read_already, size_t blklen);
 tfc_yesno xor_shrink(void *dst, size_t szdst, const void *src, size_t szsrc);
 tfc_yesno str_empty(const char *str);
+int xxopen(tfc_yesno noerr, const char *pathname, int flags);
+int xopen(const char *pathname, int flags);
 void xclose(int fd);
 const char *tfc_modename(int mode);
+tfc_yesno tfc_is_freestream(int mode);
 void tfc_getcurtime(tfc_useconds *tx);
 char *tfc_format_time(tfc_useconds t);
 char *tfc_format_pid(const char *str);
@@ -231,7 +234,7 @@ enum { TFC_RAWKEY_KEYFILE = 1, TFC_RAWKEY_ASKSTR, TFC_RAWKEY_ASKHEX };
 enum { TFC_OUTFMT_HEX = 1, TFC_OUTFMT_B64, TFC_OUTFMT_RAW };
 enum {
        TFC_MODE_SKSUM = -2, TFC_MODE_PLAIN = -1, TFC_MODE_CTR = 1,
-       TFC_MODE_STREAM, TFC_MODE_XTS, TFC_MODE_ECB, TFC_MODE_CBC, TFC_MODE_OCB
+       TFC_MODE_STREAM, TFC_MODE_XTS, TFC_MODE_ECB, TFC_MODE_CBC
 };
 enum { TFC_CTR_SHOW = 1, TFC_CTR_HEAD, TFC_CTR_RAND, TFC_CTR_ZERO, TFC_CTR_SSET };
 enum { TFC_NO_FTRUNC, TFC_DO_FTRUNC, TFC_FTRUNC_TAIL };