X-Git-Url: https://mattmccutchen.net/rsync/rsync.git/blobdiff_plain/ea5164d18118edc0d980795bfa760e5384c8d286..136c5c5ec3b3cc56d3952c3ce463f58615f00f8f:/options.c diff --git a/options.c b/options.c index 772a87fa..7c39d76b 100644 --- a/options.c +++ b/options.c @@ -21,6 +21,8 @@ #include "rsync.h" #include "popt.h" +extern struct exclude_struct **exclude_list; + int make_backups = 0; /** @@ -77,7 +79,7 @@ int do_progress=0; int keep_partial=0; int safe_symlinks=0; int copy_unsafe_links=0; -int block_size=BLOCK_SIZE; +int block_size=0; int size_only=0; int bwlimit=0; int delete_after=0; @@ -254,6 +256,7 @@ void usage(enum logcode F) rprintf(F," --modify-window=NUM Timestamp window (seconds) for file match (default=%d)\n",modify_window); rprintf(F," -T --temp-dir=DIR create temporary files in directory DIR\n"); rprintf(F," --compare-dest=DIR also compare destination files relative to DIR\n"); + rprintf(F," --link-dest=DIR create hardlinks to DIR for unchanged files\n"); rprintf(F," -P equivalent to --partial --progress\n"); rprintf(F," -z, --compress compress file data\n"); rprintf(F," -C, --cvs-exclude auto ignore files in the same way CVS does\n"); @@ -507,19 +510,23 @@ int parse_arguments(int *argc, const char ***argv, int frommain) break; case OPT_EXCLUDE: - add_exclude(poptGetOptArg(pc), 0); + add_exclude(&exclude_list, poptGetOptArg(pc), + ADD_EXCLUDE); break; case OPT_INCLUDE: - add_exclude(poptGetOptArg(pc), 1); + add_exclude(&exclude_list, poptGetOptArg(pc), + ADD_INCLUDE); break; case OPT_EXCLUDE_FROM: - add_exclude_file(poptGetOptArg(pc), 1, 0); + add_exclude_file(&exclude_list, poptGetOptArg(pc), + MISSING_FATAL, ADD_EXCLUDE); break; case OPT_INCLUDE_FROM: - add_exclude_file(poptGetOptArg(pc), 1, 1); + add_exclude_file(&exclude_list, poptGetOptArg(pc), + MISSING_FATAL, ADD_INCLUDE); break; case 'h': @@ -775,7 +782,7 @@ void server_options(char **args,int *argc) if (x != 1) args[ac++] = argstr; - if (block_size != BLOCK_SIZE) { + if (block_size) { snprintf(bsize,sizeof(bsize),"-B%d",block_size); args[ac++] = bsize; } @@ -908,5 +915,3 @@ char *find_colon(char *s) return p; } - -