X-Git-Url: https://mattmccutchen.net/rsync/rsync.git/blobdiff_plain/264042760bd909eeca281dc8c937357e98bf6bf8..edb977215ba3ac0d64dc7208f67791afe11bb55d:/options.c diff --git a/options.c b/options.c index fc8d6056..0a0261b9 100644 --- a/options.c +++ b/options.c @@ -117,7 +117,6 @@ int inplace = 0; int delay_updates = 0; long block_size = 0; /* "long" because popt can't set an int32. */ - /** Network address family. **/ #ifdef INET6 int default_af_hint = 0; /* Any protocol */ @@ -227,19 +226,15 @@ static void print_rsync_version(enum logcode f) RSYNC_NAME, RSYNC_VERSION, PROTOCOL_VERSION); rprintf(f, "Copyright (C) 1996-2006 by Andrew Tridgell, Wayne Davison, and others.\n"); rprintf(f, "\n"); - rprintf(f, "Capabilities: %d-bit files, %ssocketpairs, " - "%shard links, %ssymlinks, batchfiles,\n", - (int) (sizeof (OFF_T) * 8), - got_socketpair, hardlinks, links); - - /* Note that this field may not have type ino_t. It depends - * on the complicated interaction between largefile feature - * macros. */ - rprintf(f, " %sinplace, %sIPv6, " - "%d-bit system inums, %d-bit internal inums\n", - have_inplace, ipv6, - (int) (sizeof dumstat->st_ino * 8), - (int) (sizeof (int64) * 8)); + rprintf(f, "Capabilities: %d-bit files, %d-bit system inums, %d-bit internal inums,\n", + (int)(sizeof (OFF_T) * 8), + (int)(sizeof dumstat->st_ino * 8), /* Don't check ino_t! */ + (int)(sizeof (int64) * 8)); + rprintf(f, " %ssocketpairs, %shardlinks, %ssymlinks, %sIPv6, batchfiles, %sinplace,\n", + got_socketpair, hardlinks, links, ipv6, have_inplace); + rprintf(f, " %sappend\n", + have_inplace); + #ifdef MAINTAINER_MODE rprintf(f, "Panic Action: \"%s\"\n", get_panic_action()); #endif @@ -328,6 +323,7 @@ void usage(enum logcode F) rprintf(F," --delete delete extraneous files from destination dirs\n"); rprintf(F," --delete-before receiver deletes before transfer (default)\n"); rprintf(F," --delete-during receiver deletes during transfer, not before\n"); + rprintf(F," --delete-delay find deletions during, delete after\n"); rprintf(F," --delete-after receiver deletes after transfer, not before\n"); rprintf(F," --delete-excluded also delete excluded files from destination dirs\n"); rprintf(F," --ignore-errors delete even if there are I/O errors\n"); @@ -374,7 +370,7 @@ void usage(enum logcode F) rprintf(F," --out-format=FORMAT output updates using the specified FORMAT\n"); rprintf(F," --log-file=FILE log what we're doing to the specified FILE\n"); rprintf(F," --log-file-format=FMT log updates using the specified FMT\n"); - rprintf(F," --password-file=FILE read password from FILE\n"); + rprintf(F," --password-file=FILE read daemon-access password from FILE\n"); rprintf(F," --list-only list the files instead of copying them\n"); rprintf(F," --bwlimit=KBPS limit I/O bandwidth; KBytes per second\n"); rprintf(F," --write-batch=FILE write a batched update to FILE\n"); @@ -476,7 +472,8 @@ static struct poptOption long_options[] = { {"del", 0, POPT_ARG_NONE, &delete_during, 0, 0, 0 }, {"delete", 0, POPT_ARG_NONE, &delete_mode, 0, 0, 0 }, {"delete-before", 0, POPT_ARG_VAL, &delete_before, 2, 0, 0 }, - {"delete-during", 0, POPT_ARG_NONE, &delete_during, 0, 0, 0 }, + {"delete-during", 0, POPT_ARG_VAL, &delete_during, 1, 0, 0 }, + {"delete-delay", 0, POPT_ARG_VAL, &delete_during, 2, 0, 0 }, {"delete-after", 0, POPT_ARG_NONE, &delete_after, 0, 0, 0 }, {"delete-excluded", 0, POPT_ARG_NONE, &delete_excluded, 0, 0, 0 }, {"remove-sent-files",0, POPT_ARG_VAL, &remove_source_files, 2, 0, 0 }, /* deprecated */ @@ -1185,7 +1182,7 @@ int parse_arguments(int *argc, const char ***argv, int frommain) if (!relative_paths) implied_dirs = 0; - if (!!delete_before + delete_during + delete_after > 1) { + if (!!delete_before + !!delete_during + delete_after > 1) { snprintf(err_buf, sizeof err_buf, "You may not combine multiple --delete-WHEN options.\n"); return 0; @@ -1663,9 +1660,11 @@ void server_options(char **args,int *argc) args[ac++] = "--delete"; if (delete_before > 1) args[ac++] = "--delete-before"; - if (delete_during) + else if (delete_during == 2) + args[ac++] = "--delete-delay"; + else if (delete_during) args[ac++] = "--delete-during"; - if (delete_after) + else if (delete_after) args[ac++] = "--delete-after"; if (force_delete) args[ac++] = "--force";