From 9ac86c906f37b9b9dce4f018c90d420f947e05a9 Mon Sep 17 00:00:00 2001 From: Andrey Rys Date: Sun, 28 Nov 2021 14:57:26 +0100 Subject: [PATCH] -O append: append to output flag --- VERSION | 2 +- tfc_error.c | 2 ++ tfcrypt.c | 2 ++ 3 files changed, 5 insertions(+), 1 deletion(-) diff --git a/VERSION b/VERSION index c3f407c..f6b91e0 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -55 +56 diff --git a/tfc_error.c b/tfc_error.c index ba36658..01cca1a 100644 --- a/tfc_error.c +++ b/tfc_error.c @@ -151,6 +151,7 @@ void usage(void) tfc_say(" sync: request a synchronous I/O for a output,"); tfc_say(" fsync: on each write() call a corresponding fsync(fd),"); tfc_say(" trunc: open(O_WRONLY) will truncate output file to zero size."); + tfc_say(" append: open(O_APPEND) will append data to output file."); tfc_say(" pad: pad incomplete (l.t. %u bytes) block with zeroes.", TFC_U(TF_BLOCK_SIZE)); tfc_say(" xtime: copy timestamps from source to destination files."); tfc_say(" gibsize: use SI units of size: 1k = 1000. Applies only to size prefixes."); @@ -317,6 +318,7 @@ void usage(void) tfc_say(" sync: request a synchronous I/O for a output,"); tfc_say(" fsync: on each write() call a corresponding fsync(fd),"); tfc_say(" trunc: open(O_WRONLY) will truncate output file to zero size."); + tfc_say(" append: open(O_APPEND) will append data to output file."); tfc_say(" pad: pad incomplete (l.t. %u bytes) block with zeroes.", TFC_U(TF_BLOCK_SIZE)); tfc_say(" xtime: copy timestamps from source to destination files."); tfc_say(" gibsize: use SI units of size: 1k = 1000. Applies only to size prefixes."); diff --git a/tfcrypt.c b/tfcrypt.c index 5630a39..e851439 100644 --- a/tfcrypt.c +++ b/tfcrypt.c @@ -311,6 +311,8 @@ _baddfname: write_flags |= O_SYNC; else if (!strcmp(s, "trunc")) write_flags |= O_TRUNC; + else if (!strcmp(s, "append")) + write_flags |= O_APPEND; else if (!strcmp(s, "fsync")) do_fsync = YES; else if (!strcmp(s, "pad")) -- 2.31.1