-O append: append to output flag
authorAndrey Rys <rys@lynxlynx.ru>
Sun, 28 Nov 2021 13:57:26 +0000 (14:57 +0100)
committerAndrey Rys <rys@lynxlynx.ru>
Sun, 28 Nov 2021 13:57:26 +0000 (14:57 +0100)
VERSION
tfc_error.c
tfcrypt.c

diff --git a/VERSION b/VERSION
index c3f407c0955bb5738e40a82664c79b63f04a9adb..f6b91e0e1f8dddaac700b51aa7a66f29fc135a02 100644 (file)
--- a/VERSION
+++ b/VERSION
@@ -1 +1 @@
-55
+56
index ba36658baa08838904bb5c4619b8d496ff3cb38c..01cca1ac5c153247ae02b86cacbd31abec3cd7af 100644 (file)
@@ -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.");
index 5630a391a6c1798393308d810599512645f9f69b..e8514391b8036b8168c5f85d7ef32e8383c59542 100644 (file)
--- 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"))