X-Git-Url: https://mattmccutchen.net/rsync/rsync-patches.git/blobdiff_plain/e9d4ab8849c465e766a494765b29e26564f284d0..cc3e685d09b2095099fc396157d19172ab3ef7c4:/log-checksum.diff diff --git a/log-checksum.diff b/log-checksum.diff index 5e3b1a3..530ca18 100644 --- a/log-checksum.diff +++ b/log-checksum.diff @@ -6,9 +6,10 @@ compute them. -- Matt McCutchen ---- old/log.c -+++ new/log.c -@@ -55,6 +55,9 @@ extern char curr_dir[]; +diff --git a/log.c b/log.c +--- a/log.c ++++ b/log.c +@@ -56,6 +56,9 @@ extern char curr_dir[]; extern char *module_dir; extern unsigned int module_dirlen; @@ -18,7 +19,7 @@ compute them. static int log_initialised; static int logfile_was_closed; static FILE *logfile_fp; -@@ -610,6 +613,19 @@ static void log_formatted(enum logcode c +@@ -621,6 +624,19 @@ static void log_formatted(enum logcode code, const char *format, const char *op, snprintf(buf2, sizeof buf2, fmt, (double)b); n = buf2; break; @@ -38,9 +39,10 @@ compute them. case 'i': if (iflags & ITEM_DELETED) { n = "*deleting"; ---- old/match.c -+++ new/match.c -@@ -286,6 +286,10 @@ static void hash_search(int f,struct sum +diff --git a/match.c b/match.c +--- a/match.c ++++ b/match.c +@@ -312,6 +312,10 @@ static void hash_search(int f,struct sum_struct *s, map_ptr(buf, len-1, 1); } @@ -51,7 +53,7 @@ compute them. /** * Scan through a origin file, looking for sections that match -@@ -303,9 +307,6 @@ static void hash_search(int f,struct sum +@@ -329,9 +333,6 @@ static void hash_search(int f,struct sum_struct *s, **/ void match_sums(int f, struct sum_struct *s, struct map_struct *buf, OFF_T len) { @@ -61,7 +63,7 @@ compute them. last_match = 0; false_alarms = 0; hash_hits = 0; -@@ -353,14 +354,26 @@ void match_sums(int f, struct sum_struct +@@ -379,14 +380,26 @@ void match_sums(int f, struct sum_struct *s, struct map_struct *buf, OFF_T len) matched(f, s, buf, len, -1); } @@ -93,9 +95,10 @@ compute them. if (verbose > 2) rprintf(FINFO, "false_alarms=%d hash_hits=%d matches=%d\n", ---- old/options.c -+++ new/options.c -@@ -1439,7 +1439,8 @@ int parse_arguments(int *argc, const cha +diff --git a/options.c b/options.c +--- a/options.c ++++ b/options.c +@@ -1469,7 +1469,8 @@ int parse_arguments(int *argc_p, const char ***argv_p, int frommain) else if (log_format_has(stdout_format, 'i')) stdout_format_has_i = itemize_changes | 1; if (!log_format_has(stdout_format, 'b') @@ -105,11 +108,12 @@ compute them. log_before_transfer = !am_server; } else if (itemize_changes) { stdout_format = "%i %n%L"; ---- old/receiver.c -+++ new/receiver.c +diff --git a/receiver.c b/receiver.c +--- a/receiver.c ++++ b/receiver.c @@ -62,6 +62,9 @@ static int phase = 0, redoing = 0; /* We're either updating the basis file or an identical copy: */ - static int updating_basis; + static int updating_basis_or_equiv; +extern char sender_file_sum[MAX_DIGEST_LEN]; +extern int file_sum_len; @@ -117,7 +121,7 @@ compute them. /* * get_tmpname() - create a tmp filename for a given filename * -@@ -128,10 +131,9 @@ static int receive_data(int f_in, char * +@@ -165,10 +168,9 @@ static int receive_data(int f_in, char *fname_r, int fd_r, OFF_T size_r, const char *fname, int fd, OFF_T total_size) { static char file_sum1[MAX_DIGEST_LEN]; @@ -129,7 +133,7 @@ compute them. OFF_T offset = 0; OFF_T offset2; char *data; -@@ -261,15 +263,15 @@ static int receive_data(int f_in, char * +@@ -298,15 +300,15 @@ static int receive_data(int f_in, char *fname_r, int fd_r, OFF_T size_r, exit_cleanup(RERR_FILEIO); } @@ -148,9 +152,10 @@ compute them. return 0; return 1; } ---- old/rsync.yo -+++ new/rsync.yo -@@ -1970,7 +1970,7 @@ by the server and defaults to the curren +diff --git a/rsync.yo b/rsync.yo +--- a/rsync.yo ++++ b/rsync.yo +@@ -2046,7 +2046,7 @@ by the server and defaults to the current code(time()). This option is used to set a specific checksum seed, which is useful for applications that want repeatable block and file checksums, or in the case where the user wants a more random checksum seed. @@ -159,9 +164,10 @@ compute them. for checksum seed. enddit() ---- old/rsyncd.conf.yo -+++ new/rsyncd.conf.yo -@@ -421,7 +421,8 @@ quote(itemization( +diff --git a/rsyncd.conf.yo b/rsyncd.conf.yo +--- a/rsyncd.conf.yo ++++ b/rsyncd.conf.yo +@@ -460,7 +460,8 @@ quote(itemization( it() %a the remote IP address it() %b the number of bytes actually transferred it() %B the permission bits of the file (e.g. rwxrwxrwt)