From 79d14d3764b69938121d3c7652dd1885b77fe9a4 Mon Sep 17 00:00:00 2001 From: Wayne Davison Date: Tue, 17 Jan 2006 02:55:32 +0000 Subject: [PATCH] Fixed failing hunks. --- fname-convert.diff | 38 +++++++++++++++++++------------------- threaded-receiver.diff | 34 +++++++++++++++++----------------- 2 files changed, 36 insertions(+), 36 deletions(-) diff --git a/fname-convert.diff b/fname-convert.diff index 13075cc..116c807 100644 --- a/fname-convert.diff +++ b/fname-convert.diff @@ -47,7 +47,7 @@ some utility functions. Note that you'll need to run 'make proto' after applying this patch. ---- orig/Makefile.in 2005-11-07 04:29:00 +--- orig/Makefile.in 2006-01-14 08:14:29 +++ Makefile.in 2005-11-07 04:36:50 @@ -34,7 +34,7 @@ OBJS1=rsync.o generator.o receiver.o cle main.o checksum.o match.o syscall.o log.o backup.o @@ -58,7 +58,7 @@ Note that you'll need to run 'make proto' after applying this patch. DAEMON_OBJ = params.o loadparm.o clientserver.o access.o connection.o authenticate.o popt_OBJS=popt/findme.o popt/popt.o popt/poptconfig.o \ popt/popthelp.o popt/poptparse.o ---- orig/cleanup.c 2005-11-10 16:58:36 +--- orig/cleanup.c 2006-01-14 08:14:29 +++ cleanup.c 2005-01-10 10:40:51 @@ -25,6 +25,7 @@ extern int io_error; extern int keep_partial; @@ -87,7 +87,7 @@ Note that you'll need to run 'make proto' after applying this patch. #define RERR_SIGNAL1 19 /* status returned when sent SIGUSR1 */ #define RERR_SIGNAL 20 /* status returned when sent SIGINT, SIGTERM, SIGHUP */ ---- orig/flist.c 2005-11-10 16:58:36 +--- orig/flist.c 2006-01-17 02:15:59 +++ flist.c 2005-03-05 00:29:08 @@ -57,6 +57,7 @@ extern int copy_unsafe_links; extern int protocol_version; @@ -97,19 +97,19 @@ Note that you'll need to run 'make proto' after applying this patch. extern struct stats stats; extern struct file_list *the_file_list; -@@ -336,7 +337,10 @@ void send_file_entry(struct file_struct +@@ -335,7 +336,10 @@ void send_file_entry(struct file_struct io_write_phase = "send_file_entry"; -- f_name_to(file, fname); +- f_name(file, fname); + if (fname_convert_cmd && !am_server) /* fname conversion always done on client */ -+ convert_fname(fname, f_name(file), MAXPATHLEN); ++ convert_fname(fname, f_name(file, NULL), MAXPATHLEN); + else -+ f_name_to(file, fname); ++ f_name(file, fname); flags = base_flags; -@@ -544,6 +548,9 @@ static struct file_struct *receive_file_ +@@ -543,6 +547,9 @@ static struct file_struct *receive_file_ strlcpy(lastname, thisname, MAXPATHLEN); @@ -119,7 +119,7 @@ Note that you'll need to run 'make proto' after applying this patch. clean_fname(thisname, 0); if (sanitize_paths) -@@ -1074,6 +1081,9 @@ struct file_list *send_file_list(int f, +@@ -1072,6 +1079,9 @@ struct file_list *send_file_list(int f, start_write = stats.total_written; gettimeofday(&start_tv, NULL); @@ -129,7 +129,7 @@ Note that you'll need to run 'make proto' after applying this patch. flist = flist_new(WITH_HLINK, "send_file_list"); io_start_buffering_out(); -@@ -1286,6 +1296,9 @@ struct file_list *send_file_list(int f, +@@ -1283,6 +1293,9 @@ struct file_list *send_file_list(int f, stats.flist_size = stats.total_written - start_write; stats.num_files = flist->count; @@ -139,7 +139,7 @@ Note that you'll need to run 'make proto' after applying this patch. if (verbose > 3) output_flist(flist); -@@ -1306,6 +1319,9 @@ struct file_list *recv_file_list(int f) +@@ -1303,6 +1316,9 @@ struct file_list *recv_file_list(int f) start_read = stats.total_read; @@ -149,7 +149,7 @@ Note that you'll need to run 'make proto' after applying this patch. flist = flist_new(WITH_HLINK, "recv_file_list"); flist->count = 0; -@@ -1357,6 +1373,9 @@ struct file_list *recv_file_list(int f) +@@ -1354,6 +1370,9 @@ struct file_list *recv_file_list(int f) io_error |= read_int(f); } @@ -382,7 +382,7 @@ Note that you'll need to run 'make proto' after applying this patch. + if (verbose > 2) + rprintf(FINFO, "Converted filename: %s -> %s\n", src, dest); +} ---- orig/generator.c 2005-12-16 04:03:06 +--- orig/generator.c 2006-01-14 20:27:09 +++ generator.c 2005-03-05 00:29:37 @@ -761,7 +761,13 @@ static int phase = 0; * When fname is non-null, it must point to a MAXPATHLEN buffer! @@ -399,7 +399,7 @@ Note that you'll need to run 'make proto' after applying this patch. static void recv_generator(char *fname, struct file_struct *file, int ndx, int itemizing, int maybe_PERMS_REPORT, enum logcode code, int f_out) ---- orig/log.c 2005-12-16 23:48:44 +--- orig/log.c 2006-01-17 02:16:40 +++ log.c 2005-12-16 23:49:07 @@ -68,6 +68,7 @@ struct { { RERR_IPC , "error in IPC code" }, @@ -409,7 +409,7 @@ Note that you'll need to run 'make proto' after applying this patch. { RERR_SIGNAL1 , "received SIGUSR1" }, { RERR_SIGNAL , "received SIGINT, SIGTERM, or SIGHUP" }, { RERR_WAITCHILD , "waitpid() failed" }, ---- orig/main.c 2005-12-16 23:48:44 +--- orig/main.c 2006-01-15 14:46:15 +++ main.c 2004-07-22 00:31:47 @@ -414,7 +414,7 @@ static pid_t do_cmd(char *cmd, char *mac whole_file = 1; @@ -420,7 +420,7 @@ Note that you'll need to run 'make proto' after applying this patch. if (dir) free(dir); ---- orig/options.c 2005-12-16 23:48:44 +--- orig/options.c 2006-01-14 08:14:30 +++ options.c 2005-10-26 16:49:33 @@ -142,6 +142,7 @@ char *basis_dir[MAX_BASIS_DIRS+1]; char *config_file = NULL; @@ -446,7 +446,7 @@ Note that you'll need to run 'make proto' after applying this patch. {"compress", 'z', POPT_ARG_NONE, 0, 'z', 0, 0 }, {"compress-level", 0, POPT_ARG_INT, &def_compress_level, 'z', 0, 0 }, {0, 'P', POPT_ARG_NONE, 0, 'P', 0, 0 }, ---- orig/pipe.c 2005-10-24 21:04:45 +--- orig/pipe.c 2006-01-14 08:14:31 +++ pipe.c 2004-07-03 20:18:02 @@ -23,7 +23,6 @@ @@ -514,9 +514,9 @@ Note that you'll need to run 'make proto' after applying this patch. + + return result; +} ---- orig/util.c 2005-11-12 20:13:05 +--- orig/util.c 2006-01-14 08:14:31 +++ util.c 2004-07-03 20:18:02 -@@ -1411,3 +1411,55 @@ uint32 fuzzy_distance(const char *s1, in +@@ -1373,3 +1373,55 @@ uint32 fuzzy_distance(const char *s1, in return a[len2-1]; } diff --git a/threaded-receiver.diff b/threaded-receiver.diff index 4db4cb4..57d5e5f 100644 --- a/threaded-receiver.diff +++ b/threaded-receiver.diff @@ -60,7 +60,7 @@ Be sure to run "make proto" before running "make". #define RERR_SIGNAL 20 /* status returned when sent SIGINT, SIGTERM, SIGHUP */ #define RERR_WAITCHILD 21 /* some error returned by waitpid() */ #define RERR_MALLOC 22 /* error allocating core memory buffers */ ---- orig/generator.c 2006-01-14 08:14:30 +--- orig/generator.c 2006-01-14 20:27:09 +++ generator.c 2005-12-08 23:17:08 @@ -65,7 +65,6 @@ extern OFF_T min_size; extern int io_error; @@ -705,7 +705,7 @@ Be sure to run "make proto" before running "make". - write_batch_monitor_out = -1; - write_batch_monitor_in = -1; -} ---- orig/log.c 2006-01-14 08:14:30 +--- orig/log.c 2006-01-17 02:16:40 +++ log.c 2005-12-16 23:49:57 @@ -35,7 +35,6 @@ extern int am_sender; extern int local_server; @@ -723,9 +723,9 @@ Be sure to run "make proto" before running "make". { RERR_SIGNAL , "received SIGINT, SIGTERM, or SIGHUP" }, { RERR_WAITCHILD , "waitpid() failed" }, { RERR_MALLOC , "error allocating core memory buffers" }, -@@ -206,8 +204,8 @@ void rwrite(enum logcode code, char *buf - - buf[len] = 0; +@@ -224,8 +222,8 @@ void rwrite(enum logcode code, char *buf + if (len < 0) + exit_cleanup(RERR_MESSAGEIO); - if (am_server && msg_fd_out >= 0) { - /* Pass the message to our sibling. */ @@ -734,7 +734,7 @@ Be sure to run "make proto" before running "make". send_msg((enum msgcode)code, buf, len); return; } ---- orig/main.c 2006-01-14 08:14:30 +--- orig/main.c 2006-01-15 14:46:15 +++ main.c 2005-12-16 23:50:33 @@ -30,7 +30,6 @@ extern int list_only; extern int am_root; @@ -774,7 +774,7 @@ Be sure to run "make proto" before running "make". return; if (am_daemon) { -@@ -558,12 +568,30 @@ static void do_server_sender(int f_in, i +@@ -609,12 +619,30 @@ static void do_server_sender(int f_in, i exit_cleanup(0); } @@ -808,7 +808,7 @@ Be sure to run "make proto" before running "make". /* The receiving side mustn't obey this, or an existing symlink that * points to an identical file won't be replaced by the referent. */ -@@ -572,70 +600,16 @@ static int do_recv(int f_in,int f_out,st +@@ -623,70 +651,16 @@ static int do_recv(int f_in,int f_out,st if (preserve_hard_links) init_hard_links(); @@ -884,7 +884,7 @@ Be sure to run "make proto" before running "make". generate_files(f_out, flist, local_name); handle_stats(-1); -@@ -646,10 +620,13 @@ static int do_recv(int f_in,int f_out,st +@@ -697,10 +671,13 @@ static int do_recv(int f_in,int f_out,st } io_flush(FULL_FLUSH); @@ -902,7 +902,7 @@ Be sure to run "make proto" before running "make". } -@@ -1011,22 +988,6 @@ static int start_client(int argc, char * +@@ -1062,22 +1039,6 @@ static int start_client(int argc, char * return ret; } @@ -925,7 +925,7 @@ Be sure to run "make proto" before running "make". static RETSIGTYPE sigchld_handler(UNUSED(int val)) { #ifdef WNOHANG -@@ -1109,8 +1070,6 @@ int main(int argc,char *argv[]) +@@ -1160,8 +1121,6 @@ int main(int argc,char *argv[]) int orig_argc = argc; char **orig_argv = argv; @@ -1018,7 +1018,7 @@ Be sure to run "make proto" before running "make". if (pid == -1) { rsyserr(FERROR, errno, "fork"); exit_cleanup(RERR_IPC); ---- orig/receiver.c 2006-01-14 08:14:31 +--- orig/receiver.c 2006-01-14 20:27:09 +++ receiver.c 2006-01-14 08:30:29 @@ -24,7 +24,7 @@ extern int verbose; extern int do_xfers; @@ -1156,12 +1156,12 @@ Be sure to run "make proto" before running "make". - return am_sender ? "sender" : am_generator ? "generator" : "receiver"; + return am_sender ? "sender" : am_generator() ? "generator" : "receiver"; } ---- orig/rsync.h 2006-01-14 08:14:31 -+++ rsync.h 2005-12-10 19:02:58 -@@ -165,10 +165,8 @@ enum msgcode { +--- orig/rsync.h 2006-01-14 20:27:10 ++++ rsync.h 2006-01-17 02:46:03 +@@ -166,10 +166,8 @@ enum msgcode { MSG_DATA=0, /* raw data on the multiplexed stream */ MSG_ERROR=FERROR, MSG_INFO=FINFO, /* remote logging */ - MSG_LOG=FLOG, MSG_FCLIENT=FCLIENT, /* sibling logging */ + MSG_LOG=FLOG, /* sibling logging */ - MSG_REDO=9, /* reprocess indicated flist index */ MSG_SUCCESS=100,/* successfully updated indicated flist index */ MSG_DELETED=101,/* successfully deleted a file on receiving side */ @@ -1169,7 +1169,7 @@ Be sure to run "make proto" before running "make". }; #include "errcode.h" -@@ -319,6 +317,7 @@ enum msgcode { +@@ -320,6 +318,7 @@ enum msgcode { #endif #include -- 2.34.1