Fixed a failing hunk.
authorWayne Davison <wayned@samba.org>
Fri, 16 Dec 2005 04:05:18 +0000 (04:05 +0000)
committerWayne Davison <wayned@samba.org>
Fri, 16 Dec 2005 04:05:18 +0000 (04:05 +0000)
fname-convert.diff
threaded-receiver.diff

index ba5cfc5..4c4fd3f 100644 (file)
@@ -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-03-05 18:58:38
+--- orig/cleanup.c     2005-11-10 16:58:36
 +++ 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_SIGNAL     20      /* status returned when sent SIGUSR1, SIGINT */
  #define RERR_WAITCHILD  21      /* some error returned by waitpid() */
---- orig/flist.c       2005-11-07 04:29:01
+--- orig/flist.c       2005-11-10 16:58:36
 +++ flist.c    2005-03-05 00:29:08
 @@ -57,6 +57,7 @@ extern int copy_unsafe_links;
  extern int protocol_version;
@@ -97,7 +97,7 @@ Note that you'll need to run 'make proto' after applying this patch.
  extern struct stats stats;
  extern struct file_list *the_file_list;
  
-@@ -334,7 +335,10 @@ void send_file_entry(struct file_struct 
+@@ -336,7 +337,10 @@ void send_file_entry(struct file_struct 
  
        io_write_phase = "send_file_entry";
  
@@ -109,7 +109,7 @@ Note that you'll need to run 'make proto' after applying this patch.
  
        flags = base_flags;
  
-@@ -543,6 +547,9 @@ static struct file_struct *receive_file_
+@@ -544,6 +548,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)
-@@ -1073,6 +1080,9 @@ struct file_list *send_file_list(int f, 
+@@ -1074,6 +1081,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();
-@@ -1285,6 +1295,9 @@ struct file_list *send_file_list(int f, 
+@@ -1286,6 +1296,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);
  
-@@ -1305,6 +1318,9 @@ struct file_list *recv_file_list(int f)
+@@ -1306,6 +1319,9 @@ struct file_list *recv_file_list(int f)
  
        start_read = stats.total_read;
  
@@ -382,10 +382,10 @@ 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-10-30 22:30:28
+--- orig/generator.c   2005-12-16 04:03:06
 +++ generator.c        2005-03-05 00:29:37
-@@ -594,7 +594,13 @@ static int phase = 0;
-  * start sending checksums.
+@@ -761,7 +761,13 @@ static int phase = 0;
+  * When fname is non-null, it must point to a MAXPATHLEN buffer!
   *
   * Note that f_out is set to -1 when doing final directory-permission and
 - * modification-time repair. */
@@ -399,19 +399,19 @@ 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-10-26 16:49:08
-+++ log.c      2005-09-29 17:23:54
-@@ -67,6 +67,7 @@ struct {
+--- orig/log.c 2005-12-16 04:03:06
++++ log.c      2005-12-16 04:03:49
+@@ -68,6 +68,7 @@ struct {
        { RERR_IPC        , "error in IPC code" },
        { RERR_CRASHED    , "sibling process crashed" },
        { RERR_TERMINATED , "sibling process terminated abnormally" },
 +      { RERR_FNAMECONV  , "error in filename conversion" },
-       { RERR_SIGNAL     , "received SIGUSR1 or SIGINT" },
+       { RERR_SIGNAL     , "received SIGINT, SIGTERM, SIGHUP, or SIGUSR1" },
        { RERR_WAITCHILD  , "waitpid() failed" },
        { RERR_MALLOC     , "error allocating core memory buffers" },
---- orig/main.c        2005-11-02 07:22:12
+--- orig/main.c        2005-12-15 07:55:39
 +++ main.c     2004-07-22 00:31:47
-@@ -388,7 +388,7 @@ static pid_t do_cmd(char *cmd, char *mac
+@@ -414,7 +414,7 @@ static pid_t do_cmd(char *cmd, char *mac
                        whole_file = 1;
                ret = local_child(argc, args, f_in, f_out, child_main);
        } else
@@ -420,9 +420,9 @@ Note that you'll need to run 'make proto' after applying this patch.
  
        if (dir)
                free(dir);
---- orig/options.c     2005-11-07 04:29:01
+--- orig/options.c     2005-11-15 18:21:22
 +++ options.c  2005-10-26 16:49:33
-@@ -141,6 +141,7 @@ char *basis_dir[MAX_BASIS_DIRS+1];
+@@ -142,6 +142,7 @@ char *basis_dir[MAX_BASIS_DIRS+1];
  char *config_file = NULL;
  char *shell_cmd = NULL;
  char *log_format = NULL;
@@ -430,7 +430,7 @@ Note that you'll need to run 'make proto' after applying this patch.
  char *password_file = NULL;
  char *rsync_path = RSYNC_PATH;
  char *backup_dir = NULL;
-@@ -329,6 +330,7 @@ void usage(enum logcode F)
+@@ -330,6 +331,7 @@ void usage(enum logcode F)
    rprintf(F,"     --compare-dest=DIR      also compare destination files relative to DIR\n");
    rprintf(F,"     --copy-dest=DIR         ... and include copies of unchanged files\n");
    rprintf(F,"     --link-dest=DIR         hardlink to files in DIR when unchanged\n");
@@ -438,7 +438,7 @@ Note that you'll need to run 'make proto' after applying this patch.
    rprintf(F," -z, --compress              compress file data during the transfer\n");
    rprintf(F,"     --compress-level=NUM    explicitly set compression level\n");
    rprintf(F," -C, --cvs-exclude           auto-ignore files the same way CVS does\n");
-@@ -459,6 +461,7 @@ static struct poptOption long_options[] 
+@@ -464,6 +466,7 @@ static struct poptOption long_options[] 
    {"copy-dest",        0,  POPT_ARG_STRING, 0, OPT_COPY_DEST, 0, 0 },
    {"link-dest",        0,  POPT_ARG_STRING, 0, OPT_LINK_DEST, 0, 0 },
    {"fuzzy",           'y', POPT_ARG_NONE,   &fuzzy_basis, 0, 0, 0 },
@@ -514,9 +514,9 @@ Note that you'll need to run 'make proto' after applying this patch.
 +
 +      return result;
 +}
---- orig/util.c        2005-10-16 22:38:40
+--- orig/util.c        2005-11-12 20:13:05
 +++ util.c     2004-07-03 20:18:02
-@@ -1353,3 +1353,55 @@ uint32 fuzzy_distance(const char *s1, in
+@@ -1411,3 +1411,55 @@ uint32 fuzzy_distance(const char *s1, in
  
        return a[len2-1];
  }
index 07b9131..6d6f60c 100644 (file)
@@ -50,7 +50,7 @@ Be sure to run "make proto" before running "make".
        if (cleanup_pid && cleanup_pid == getpid()) {
                char *pidf = lp_pid_file();
                if (pidf && *pidf)
---- orig/generator.c   2005-11-12 20:31:04
+--- orig/generator.c   2005-12-16 04:03:06
 +++ generator.c        2005-12-08 23:17:08
 @@ -65,7 +65,6 @@ extern OFF_T min_size;
  extern int io_error;
@@ -60,9 +60,9 @@ Be sure to run "make proto" before running "make".
  extern int protocol_version;
  extern int fuzzy_basis;
  extern int always_checksum;
-@@ -94,6 +93,11 @@ extern struct filter_list_struct server_
- static int deletion_count = 0; /* used to implement --max-delete */
+@@ -96,6 +95,11 @@ static int deletion_count = 0; /* used t
+ static int can_link_symlinks = 1; /* start out optimistic */
+ static int can_link_devices = 1;
  
 +/* These vars are local copies so that the receiver can use the originals. */
 +static int GEN_append_mode;
@@ -72,7 +72,7 @@ Be sure to run "make proto" before running "make".
  /* For calling delete_file() */
  #define DEL_FORCE_RECURSE     (1<<1) /* recurse even w/o --force */
  #define DEL_TERSE             (1<<3)
-@@ -446,8 +450,8 @@ static void sum_sizes_sqroot(struct sum_
+@@ -445,8 +449,8 @@ static void sum_sizes_sqroot(struct sum_
        }
  
        if (protocol_version < 27) {
@@ -83,7 +83,7 @@ Be sure to run "make proto" before running "make".
                s2length = SUM_LENGTH;
        } else {
                int32 c;
-@@ -457,7 +461,7 @@ static void sum_sizes_sqroot(struct sum_
+@@ -456,7 +460,7 @@ static void sum_sizes_sqroot(struct sum_
                for (c = blength; c >>= 1 && b; b--) {}
                /* add a bit, subtract rollsum, round up. */
                s2length = (b + 1 - 32 + 7) / 8; /* --optimize in compiler-- */
@@ -92,7 +92,7 @@ Be sure to run "make proto" before running "make".
                s2length = MIN(s2length, SUM_LENGTH);
        }
  
-@@ -491,7 +495,7 @@ static void generate_and_send_sums(int f
+@@ -490,7 +494,7 @@ static void generate_and_send_sums(int f
        sum_sizes_sqroot(&sum, len);
        write_sum_head(f_out, &sum);
  
@@ -101,7 +101,7 @@ Be sure to run "make proto" before running "make".
                return;
  
        if (len > 0)
-@@ -510,7 +514,7 @@ static void generate_and_send_sums(int f
+@@ -509,7 +513,7 @@ static void generate_and_send_sums(int f
  
                if (f_copy >= 0) {
                        full_write(f_copy, map, n1);
@@ -110,7 +110,7 @@ Be sure to run "make proto" before running "make".
                                continue;
                }
  
-@@ -1063,7 +1067,7 @@ static void recv_generator(char *fname, 
+@@ -1143,7 +1147,7 @@ static void recv_generator(char *fname, 
                return;
        }
  
@@ -118,8 +118,8 @@ Be sure to run "make proto" before running "make".
 +      if (GEN_append_mode && st.st_size > file->length)
                return;
  
-       if (!compare_dest && fnamecmp_type <= FNAMECMP_BASIS_DIR_HIGH)
-@@ -1124,7 +1128,7 @@ static void recv_generator(char *fname, 
+       if (fnamecmp_type <= FNAMECMP_BASIS_DIR_HIGH)
+@@ -1198,7 +1202,7 @@ static void recv_generator(char *fname, 
                goto notify_others;
        }
  
@@ -128,7 +128,7 @@ Be sure to run "make proto" before running "make".
                if (!(backupptr = get_backup_name(fname))) {
                        close(fd);
                        return;
-@@ -1214,7 +1218,10 @@ void generate_files(int f_out, struct fi
+@@ -1288,7 +1292,10 @@ void generate_files(int f_out, struct fi
        int save_ignore_existing = ignore_existing;
        int save_ignore_non_existing = ignore_non_existing;
        int save_do_progress = do_progress;
@@ -140,7 +140,7 @@ Be sure to run "make proto" before running "make".
  
        if (protocol_version >= 29) {
                itemizing = 1;
-@@ -1243,7 +1250,7 @@ void generate_files(int f_out, struct fi
+@@ -1317,7 +1324,7 @@ void generate_files(int f_out, struct fi
                do_delete_pass(flist);
        do_progress = 0;
  
@@ -149,7 +149,7 @@ Be sure to run "make proto" before running "make".
                whole_file = 0;
        if (verbose >= 2) {
                rprintf(FINFO, "delta-transmission %s\n",
-@@ -1252,12 +1259,6 @@ void generate_files(int f_out, struct fi
+@@ -1326,12 +1333,6 @@ void generate_files(int f_out, struct fi
                        : "enabled");
        }
  
@@ -162,7 +162,7 @@ Be sure to run "make proto" before running "make".
        for (i = 0; i < flist->count; i++) {
                struct file_struct *file = flist->files[i];
  
-@@ -1301,23 +1302,34 @@ void generate_files(int f_out, struct fi
+@@ -1375,23 +1376,34 @@ void generate_files(int f_out, struct fi
                delete_in_dir(NULL, NULL, NULL);
  
        phase++;
@@ -203,7 +203,7 @@ Be sure to run "make proto" before running "make".
                if (local_name)
                        strlcpy(fbuf, local_name, sizeof fbuf);
                else
-@@ -1329,27 +1341,43 @@ void generate_files(int f_out, struct fi
+@@ -1403,27 +1415,43 @@ void generate_files(int f_out, struct fi
        phase++;
        ignore_non_existing = save_ignore_non_existing;
        ignore_existing = save_ignore_existing;
@@ -695,8 +695,8 @@ Be sure to run "make proto" before running "make".
 -      write_batch_monitor_out = -1;
 -      write_batch_monitor_in = -1;
 -}
---- orig/log.c 2005-10-26 16:49:08
-+++ log.c      2005-12-08 23:17:09
+--- orig/log.c 2005-12-16 04:03:06
++++ log.c      2005-12-16 04:04:49
 @@ -35,7 +35,6 @@ extern int am_sender;
  extern int local_server;
  extern int quiet;
@@ -704,17 +704,17 @@ Be sure to run "make proto" before running "make".
 -extern int msg_fd_out;
  extern int protocol_version;
  extern int preserve_times;
- extern int log_format_has_o_or_i;
-@@ -67,7 +66,7 @@ struct {
+ extern int log_format_has_i;
+@@ -68,7 +67,7 @@ struct {
        { RERR_IPC        , "error in IPC code" },
        { RERR_CRASHED    , "sibling process crashed" },
        { RERR_TERMINATED , "sibling process terminated abnormally" },
--      { RERR_SIGNAL     , "received SIGUSR1 or SIGINT" },
-+      { RERR_SIGNAL     , "received SIGINT, SIGHUP, or SIGTERM" },
+-      { RERR_SIGNAL     , "received SIGINT, SIGTERM, SIGHUP, or SIGUSR1" },
++      { RERR_SIGNAL     , "received SIGINT, SIGTERM, or SIGHUP" },
        { RERR_WAITCHILD  , "waitpid() failed" },
        { RERR_MALLOC     , "error allocating core memory buffers" },
        { RERR_PARTIAL    , "some files could not be transferred" },
-@@ -204,8 +203,8 @@ void rwrite(enum logcode code, char *buf
+@@ -205,8 +204,8 @@ void rwrite(enum logcode code, char *buf
  
        buf[len] = 0;
  
@@ -1150,9 +1150,9 @@ 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       2005-11-12 20:31:04
+--- orig/rsync.h       2005-12-15 23:00:49
 +++ rsync.h    2005-12-10 19:02:58
-@@ -166,10 +166,8 @@ enum msgcode {
+@@ -165,10 +165,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 */
@@ -1163,7 +1163,7 @@ Be sure to run "make proto" before running "make".
  };
  
  #include "errcode.h"
-@@ -320,6 +318,7 @@ enum msgcode {
+@@ -319,6 +317,7 @@ enum msgcode {
  #endif
  
  #include <assert.h>