From: Andrey Rys Date: Sun, 28 Nov 2021 13:57:26 +0000 (+0100) Subject: -O append: append to output flag X-Git-Url: https://jxself.org/git/?a=commitdiff_plain;h=9ac86c906f37b9b9dce4f018c90d420f947e05a9;p=tfcrypt.git -O append: append to output flag --- 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"))