X-Git-Url: https://mattmccutchen.net/rsync/rsync.git/blobdiff_plain/e844a4a8a8500e6e1cbb53c2a932c2c57bc0ca9f..9217ce30e308db28dc4789ef009ecf553f35097c:/main.c diff --git a/main.c b/main.c index 92b5c44b..8ca164bd 100644 --- a/main.c +++ b/main.c @@ -41,7 +41,7 @@ extern int remove_source_files; extern int need_messages_from_generator; extern int kluge_around_eof; extern int do_stats; -extern int log_got_error; +extern int got_xfer_error; extern int module_id; extern int copy_links; extern int copy_dirlinks; @@ -63,6 +63,7 @@ extern int read_batch; extern int write_batch; extern int batch_fd; extern int filesfrom_fd; +extern int connect_timeout; extern pid_t cleanup_child_pid; extern struct stats stats; extern char *filesfrom_host; @@ -272,9 +273,10 @@ static void output_summary(void) "sent %s bytes received %s bytes %s bytes/sec\n", human_num(total_written), human_num(total_read), human_dnum((total_written + total_read)/(0.5 + (endtime - starttime)), 2)); - rprintf(FINFO, "total size is %s speedup is %.2f\n", + rprintf(FINFO, "total size is %s speedup is %.2f%s\n", human_num(stats.total_size), - (double)stats.total_size / (total_written+total_read)); + (double)stats.total_size / (total_written+total_read), + dry_run ? " (DRY RUN)" : ""); } fflush(stdout); @@ -925,10 +927,10 @@ static void do_server_recv(int f_in, int f_out, int argc, char *argv[]) if (sanitize_paths) { char **dir; for (dir = basis_dir; *dir; dir++) { - *dir = sanitize_path(NULL, *dir, NULL, curr_dir_depth, NULL); + *dir = sanitize_path(NULL, *dir, NULL, curr_dir_depth); } if (partial_dir) { - partial_dir = sanitize_path(NULL, partial_dir, NULL, curr_dir_depth, NULL); + partial_dir = sanitize_path(NULL, partial_dir, NULL, curr_dir_depth); } } fix_basis_dirs(); @@ -1263,6 +1265,12 @@ static int start_client(int argc, char *argv[]) exit_cleanup(RERR_SYNTAX); } + if (connect_timeout) { + rprintf(FERROR, "The --contimeout option may only be " + "used when connecting to an rsync daemon.\n"); + exit_cleanup(RERR_SYNTAX); + } + if (shell_machine) { p = strrchr(shell_machine,'@'); if (p) { @@ -1309,7 +1317,7 @@ static RETSIGTYPE sigusr2_handler(UNUSED(int val)) if (!am_server) output_summary(); close_all(); - if (log_got_error) + if (got_xfer_error) _exit(RERR_PARTIAL); _exit(0); }