From: Wayne Davison Date: Thu, 4 Sep 2014 20:06:13 +0000 (-0700) Subject: Adding the long options that BackupPC likes to use. X-Git-Tag: v3.1.2pre1~37 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=aca7dd3bff75e7acd3912e0e9e084b350ee04ee8;p=thirdparty%2Frsync.git Adding the long options that BackupPC likes to use. --- diff --git a/options.c b/options.c index 62dfe4f0..19c2b7db 100644 --- 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... */ diff --git a/packaging/cull_options b/packaging/cull_options index 44b48d10..388d33f0 100755 --- a/packaging/cull_options +++ b/packaging/cull_options @@ -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; diff --git a/support/rrsync b/support/rrsync index 6f83f9d4..5d2b8ae0 100644 --- a/support/rrsync +++ b/support/rrsync @@ -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, );