]> git.ipfire.org Git - thirdparty/rsync.git/commitdiff
Adding the long options that BackupPC likes to use.
authorWayne Davison <wayned@samba.org>
Thu, 4 Sep 2014 20:06:13 +0000 (13:06 -0700)
committerWayne Davison <wayned@samba.org>
Thu, 4 Sep 2014 20:44:50 +0000 (13:44 -0700)
options.c
packaging/cull_options
support/rrsync

index 62dfe4f022474ad08b13988fa7fd8875c4cff2b6..19c2b7db10d44c6d05b408071748a469fd6fabcf 100644 (file)
--- a/options.c
+++ b/options.c
@@ -2480,9 +2480,11 @@ void server_options(char **args, int *argc_p)
         * but checking the pre-negotiated value allows the user to use a
         * --protocol=29 override to avoid the use of this -eFLAGS opt. */
        if (protocol_version >= 30) {
+               /* Use "eFlags" alias so that cull_options doesn't think that these are no-arg option letters. */
+#define eFlags argstr
                /* We make use of the -e option to let the server know about
                 * any pre-release protocol version && some behavior flags. */
-               argstr[x++] = 'e';
+               eFlags[x++] = 'e';
 #if SUBPROTOCOL_VERSION != 0
                if (protocol_version == PROTOCOL_VERSION) {
                        x += snprintf(argstr+x, sizeof argstr - x,
@@ -2490,17 +2492,18 @@ void server_options(char **args, int *argc_p)
                                      PROTOCOL_VERSION, SUBPROTOCOL_VERSION);
                } else
 #endif
-                       argstr[x++] = '.';
+                       eFlags[x++] = '.';
                if (allow_inc_recurse)
-                       argstr[x++] = 'i';
+                       eFlags[x++] = 'i';
 #ifdef CAN_SET_SYMLINK_TIMES
-               argstr[x++] = 'L'; /* symlink time-setting support */
+               eFlags[x++] = 'L'; /* symlink time-setting support */
 #endif
 #ifdef ICONV_OPTION
-               argstr[x++] = 's'; /* symlink iconv translation support */
+               eFlags[x++] = 's'; /* symlink iconv translation support */
 #endif
-               argstr[x++] = 'f'; /* flist I/O-error safety support */
-               argstr[x++] = 'x'; /* xattr hardlink optimization not desired */
+               eFlags[x++] = 'f'; /* flist I/O-error safety support */
+               eFlags[x++] = 'x'; /* xattr hardlink optimization not desired */
+#undef eFlags
        }
 
        if (x >= (int)sizeof argstr) { /* Not possible... */
index 44b48d10195cad728ab1b0a406df9c17820f68d9..388d33f0dbd8e6b00576b3506e93a26087212580 100755 (executable)
@@ -6,12 +6,23 @@ use strict;
 
 our %short_no_arg;
 our %short_with_num;
-our %long_opt = (
+our %long_opt = ( # These include some extra long-args that BackupPC uses:
+    'block-size' => 1,
     'daemon' => -1,
     'debug' => 1,
     'fake-super' => 0,
+    'fuzzy' => 0,
+    'group' => 0,
+    'hard-links' => 0,
+    'ignore-times' => 0,
     'info' => 1,
+    'links' => 0,
     'log-file' => 3,
+    'one-file-system' => 0,
+    'owner' => 0,
+    'perms' => 0,
+    'recursive' => 0,
+    'times' => 0,
 );
 our $last_long_opt;
 
index 6f83f9d46e6e46960ce8aea0ab90ead4462008cc..5d2b8ae0ab089ff24c1ed7bb02769c37197793a8 100644 (file)
@@ -60,6 +60,7 @@ our $short_with_num = 'B'; # DO NOT REMOVE ANY
 our %long_opt = (
   'append' => 0,
   'backup-dir' => 2,
+  'block-size' => 1,
   'bwlimit' => 1,
   'checksum-seed' => 1,
   'compare-dest' => 2,
@@ -82,14 +83,18 @@ our %long_opt = (
   'force' => 0,
   'from0' => 0,
   'fuzzy' => 0,
+  'group' => 0,
   'groupmap' => 1,
+  'hard-links' => 0,
   'iconv' => 1,
   'ignore-errors' => 0,
   'ignore-existing' => 0,
   'ignore-missing-args' => 0,
+  'ignore-times' => 0,
   'info' => 1,
   'inplace' => 0,
   'link-dest' => 2,
+  'links' => 0,
   'list-only' => 0,
   'log-file' => 3,
   'log-format' => 1,
@@ -103,10 +108,14 @@ our %long_opt = (
   'no-relative' => 0,
   'no-specials' => 0,
   'numeric-ids' => 0,
+  'one-file-system' => 0,
   'only-write-batch' => 1,
+  'owner' => 0,
   'partial' => 0,
   'partial-dir' => 2,
+  'perms' => 0,
   'preallocate' => 0,
+  'recursive' => 0,
   'remove-sent-files' => $ro ? -1 : 0,
   'remove-source-files' => $ro ? -1 : 0,
   'safe-links' => 0,
@@ -120,6 +129,7 @@ our %long_opt = (
   'super' => 0,
   'temp-dir' => 2,
   'timeout' => 1,
+  'times' => 0,
   'use-qsort' => 0,
   'usermap' => 1,
 );