Fixed failing hunks.
authorWayne Davison <wayned@samba.org>
Sat, 26 Feb 2005 05:30:48 +0000 (05:30 +0000)
committerWayne Davison <wayned@samba.org>
Sat, 26 Feb 2005 05:30:48 +0000 (05:30 +0000)
fname-convert.diff
source-cd.diff
time-limit.diff

index 3807df6..4d7d670 100644 (file)
@@ -87,17 +87,17 @@ 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-02-23 02:57:26
-+++ flist.c    2005-02-21 11:04:00
+--- orig/flist.c       2005-02-26 05:22:50
++++ flist.c    2005-02-26 05:23:26
 @@ -63,6 +63,7 @@ extern int force_delete;
  extern int orig_umask;
  extern int make_backups;
  extern unsigned int curr_dir_len;
 +extern char *fname_convert_cmd;
- extern char *log_format;
  extern char *backup_dir;
  extern char *backup_suffix;
-@@ -346,7 +347,10 @@ void send_file_entry(struct file_struct 
+ extern int backup_suffix_len;
+@@ -345,7 +346,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;
  
-@@ -562,6 +566,9 @@ static struct file_struct *receive_file_
+@@ -561,6 +565,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)
-@@ -1075,6 +1082,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();
-@@ -1257,6 +1267,9 @@ struct file_list *send_file_list(int f, 
+@@ -1256,6 +1266,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, who_am_i());
  
-@@ -1278,6 +1291,9 @@ struct file_list *recv_file_list(int f)
+@@ -1277,6 +1290,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");
        received_flist = flist;
  
-@@ -1331,6 +1347,9 @@ struct file_list *recv_file_list(int f)
+@@ -1330,6 +1346,9 @@ struct file_list *recv_file_list(int f)
                        io_error |= read_int(f);
        }
  
@@ -382,9 +382,9 @@ 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-02-23 02:57:26
+--- orig/generator.c   2005-02-26 03:22:59
 +++ generator.c        2005-02-03 02:07:33
-@@ -342,7 +342,13 @@ static int find_fuzzy(struct file_struct
+@@ -343,7 +343,13 @@ static int find_fuzzy(struct file_struct
   * start sending checksums.
   *
   * Note that f_out is set to -1 when doing final directory-permission and
@@ -399,9 +399,9 @@ Note that you'll need to run 'make proto' after applying this patch.
  static void recv_generator(char *fname, struct file_list *flist,
                           struct file_struct *file, int ndx,
                           int f_out, int f_out_name)
---- orig/log.c 2005-02-21 07:28:59
+--- orig/log.c 2005-02-26 05:22:50
 +++ log.c      2004-07-03 20:18:02
-@@ -62,6 +62,7 @@ struct {
+@@ -63,6 +63,7 @@ struct {
        { RERR_STREAMIO   , "error in rsync protocol data stream" },
        { RERR_MESSAGEIO  , "errors with program diagnostics" },
        { RERR_IPC        , "error in IPC code" },
@@ -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-02-23 02:57:26
+--- orig/options.c     2005-02-25 18:44:31
 +++ options.c  2005-02-14 02:50:32
-@@ -136,6 +136,7 @@ char *basis_dir[MAX_BASIS_DIRS+1];
+@@ -137,6 +137,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;
-@@ -317,6 +318,7 @@ void usage(enum logcode F)
+@@ -318,6 +319,7 @@ void usage(enum logcode F)
    rprintf(F," -y, --fuzzy                 find similar file for basis if no dest file\n");
    rprintf(F,"     --compare-dest=DIR      also compare destination files relative to DIR\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," -C, --cvs-exclude           auto-ignore files the same way CVS does\n");
    rprintf(F," -f, --filter=RULE           add a file-filtering RULE\n");
-@@ -425,6 +427,7 @@ static struct poptOption long_options[] 
+@@ -426,6 +428,7 @@ static struct poptOption long_options[] 
    {"compare-dest",     0,  POPT_ARG_STRING, 0, OPT_COMPARE_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 },
index c1603cf..d479da5 100644 (file)
@@ -6,17 +6,17 @@ rsync -avR --source-cd=/usr local/bin host:/
 
 For two systems where one uses /usr/local/bin and the other /local/bin.
 
---- orig/flist.c       2005-02-23 02:57:26
-+++ flist.c    2005-02-22 18:06:57
+--- orig/flist.c       2005-02-26 05:22:50
++++ flist.c    2005-02-26 05:24:15
 @@ -63,6 +63,7 @@ extern int force_delete;
  extern int orig_umask;
  extern int make_backups;
  extern unsigned int curr_dir_len;
 +extern char *source_cd;
- extern char *log_format;
  extern char *backup_dir;
  extern char *backup_suffix;
-@@ -1079,13 +1080,14 @@ struct file_list *send_file_list(int f, 
+ extern int backup_suffix_len;
+@@ -1078,13 +1079,14 @@ struct file_list *send_file_list(int f, 
  
        io_start_buffering_out();
        if (filesfrom_fd >= 0) {
@@ -36,9 +36,9 @@ For two systems where one uses /usr/local/bin and the other /local/bin.
  
        while (1) {
                char fname2[MAXPATHLEN];
---- orig/options.c     2005-02-23 02:57:26
+--- orig/options.c     2005-02-25 18:44:31
 +++ options.c  2005-02-22 18:06:58
-@@ -80,6 +80,7 @@ char *remote_filesfrom_file = NULL;
+@@ -81,6 +81,7 @@ char *remote_filesfrom_file = NULL;
  int eol_nulls = 0;
  int recurse = 0;
  int xfer_dirs = 0;
@@ -46,7 +46,7 @@ For two systems where one uses /usr/local/bin and the other /local/bin.
  int am_daemon = 0;
  int daemon_over_rsh = 0;
  int do_stats = 0;
-@@ -266,6 +267,7 @@ void usage(enum logcode F)
+@@ -267,6 +268,7 @@ void usage(enum logcode F)
    rprintf(F," -R, --relative              use relative path names\n");
    rprintf(F,"     --no-relative           turn off --relative\n");
    rprintf(F,"     --no-implied-dirs       don't send implied dirs with -R\n");
@@ -54,7 +54,7 @@ For two systems where one uses /usr/local/bin and the other /local/bin.
    rprintf(F," -b, --backup                make backups (see --suffix & --backup-dir)\n");
    rprintf(F,"     --backup-dir=DIR        make backups into hierarchy based in DIR\n");
    rprintf(F,"     --suffix=SUFFIX         set backup suffix (default %s w/o --backup-dir)\n",BACKUP_SUFFIX);
-@@ -416,6 +418,7 @@ static struct poptOption long_options[] 
+@@ -417,6 +419,7 @@ static struct poptOption long_options[] 
    {"list-only",        0,  POPT_ARG_VAL,    &list_only, 2, 0, 0 },
    {"relative",        'R', POPT_ARG_VAL,    &relative_paths, 1, 0, 0 },
    {"no-relative",      0,  POPT_ARG_VAL,    &relative_paths, 0, 0, 0 },
@@ -62,7 +62,7 @@ For two systems where one uses /usr/local/bin and the other /local/bin.
    {"rsh",             'e', POPT_ARG_STRING, &shell_cmd, 0, 0, 0 },
    {"block-size",      'B', POPT_ARG_LONG,   &block_size, 0, 0, 0 },
    {"max-delete",       0,  POPT_ARG_INT,    &max_delete, 0, 0, 0 },
-@@ -911,6 +914,11 @@ int parse_arguments(int *argc, const cha
+@@ -910,6 +913,11 @@ int parse_arguments(int *argc, const cha
                        batch_name = NULL;
                }
        }
@@ -74,7 +74,7 @@ For two systems where one uses /usr/local/bin and the other /local/bin.
        if (read_batch && files_from) {
                snprintf(err_buf, sizeof err_buf,
                        "--read-batch cannot be used with --files-from\n");
-@@ -1007,6 +1015,14 @@ int parse_arguments(int *argc, const cha
+@@ -1006,6 +1014,14 @@ int parse_arguments(int *argc, const cha
                        backup_dir = sanitize_path(NULL, backup_dir, NULL, 0);
                if (files_from)
                        files_from = sanitize_path(NULL, files_from, NULL, 0);
@@ -89,7 +89,7 @@ For two systems where one uses /usr/local/bin and the other /local/bin.
        }
        if (server_filter_list.head && !am_sender) {
                struct filter_list_struct *elp = &server_filter_list;
-@@ -1394,6 +1410,11 @@ void server_options(char **args,int *arg
+@@ -1395,6 +1411,11 @@ void server_options(char **args,int *arg
        } else if (keep_partial)
                args[ac++] = "--partial";
  
@@ -101,7 +101,7 @@ For two systems where one uses /usr/local/bin and the other /local/bin.
        if (ignore_errors)
                args[ac++] = "--ignore-errors";
  
---- orig/rsync.yo      2005-02-23 02:57:27
+--- orig/rsync.yo      2005-02-26 05:22:51
 +++ rsync.yo   2005-02-22 18:20:24
 @@ -304,6 +304,7 @@ to the detailed description below for a 
   -R, --relative              use relative path names
index 213b05d..b2722e8 100644 (file)
@@ -3,8 +3,8 @@ to be simpler and more efficient by Wayne Davison.
 
 Do we need configure support for mktime()?
 
---- orig/io.c  2005-02-20 01:12:42
-+++ io.c       2004-07-17 15:28:36
+--- orig/io.c  2005-02-26 03:22:59
++++ io.c       2005-02-26 05:28:35
 @@ -51,6 +51,7 @@ extern int eol_nulls;
  extern int csum_length;
  extern int checksum_seed;
@@ -13,14 +13,13 @@ Do we need configure support for mktime()?
  extern char *remote_filesfrom_file;
  extern struct stats stats;
  
-@@ -137,17 +138,22 @@ static void check_timeout(void)
+@@ -138,16 +139,24 @@ static void check_timeout(void)
  {
        time_t t;
  
--      if (!io_timeout)
-+      if (!io_timeout && !stop_at_utime)
-               return;
++      if ((!io_timeout || ignore_timeout) && !stop_at_utime)
++              return;
++
 +      t = time(NULL);
 +
 +      if (stop_at_utime && t >= stop_at_utime) {
@@ -28,6 +27,9 @@ Do we need configure support for mktime()?
 +              exit_cleanup(RERR_TIMEOUT);
 +      }
 +
+       if (!io_timeout || ignore_timeout)
+               return;
        if (!last_io) {
 -              last_io = time(NULL);
 +              last_io = t;
@@ -36,14 +38,12 @@ Do we need configure support for mktime()?
  
 -      t = time(NULL);
 -
--      if (t - last_io >= io_timeout) {
-+      if (io_timeout && t - last_io >= io_timeout) {
+       if (t - last_io >= io_timeout) {
                if (!am_server && !am_daemon) {
                        rprintf(FERROR, "io timeout after %d seconds -- exiting\n",
-                               (int)(t-last_io));
---- orig/options.c     2005-02-23 02:57:26
+--- orig/options.c     2005-02-25 18:44:31
 +++ options.c  2005-01-28 19:35:23
-@@ -104,6 +104,7 @@ int checksum_seed = 0;
+@@ -105,6 +105,7 @@ int checksum_seed = 0;
  int inplace = 0;
  int delay_updates = 0;
  long block_size = 0; /* "long" because popt can't set an int32. */
@@ -51,7 +51,7 @@ Do we need configure support for mktime()?
  
  
  /** Network address family. **/
-@@ -340,6 +341,8 @@ void usage(enum logcode F)
+@@ -341,6 +342,8 @@ void usage(enum logcode F)
    rprintf(F,"     --password-file=FILE    read 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");
@@ -60,7 +60,7 @@ Do we need configure support for mktime()?
    rprintf(F,"     --write-batch=FILE      write a batched update to FILE\n");
    rprintf(F,"     --read-batch=FILE       read a batched update from FILE\n");
  #ifdef INET6
-@@ -357,6 +360,7 @@ enum {OPT_VERSION = 1000, OPT_DAEMON, OP
+@@ -358,6 +361,7 @@ enum {OPT_VERSION = 1000, OPT_DAEMON, OP
        OPT_FILTER, OPT_COMPARE_DEST, OPT_LINK_DEST,
        OPT_INCLUDE, OPT_INCLUDE_FROM, OPT_MODIFY_WINDOW,
        OPT_READ_BATCH, OPT_WRITE_BATCH, OPT_TIMEOUT, OPT_MAX_SIZE,
@@ -68,7 +68,7 @@ Do we need configure support for mktime()?
        OPT_REFUSED_BASE = 9000};
  
  static struct poptOption long_options[] = {
-@@ -441,6 +445,8 @@ static struct poptOption long_options[] 
+@@ -442,6 +446,8 @@ static struct poptOption long_options[] 
    {"log-format",       0,  POPT_ARG_STRING, &log_format, 0, 0, 0 },
    {"itemize-changes", 'i', POPT_ARG_NONE,   &itemize_changes, 0, 0, 0 },
    {"bwlimit",          0,  POPT_ARG_INT,    &bwlimit, 0, 0, 0 },
@@ -77,7 +77,7 @@ Do we need configure support for mktime()?
    {"backup-dir",       0,  POPT_ARG_STRING, &backup_dir, 0, 0, 0 },
    {"hard-links",      'H', POPT_ARG_NONE,   &preserve_hard_links, 0, 0, 0 },
    {"read-batch",       0,  POPT_ARG_STRING, &batch_name, OPT_READ_BATCH, 0, 0 },
-@@ -852,6 +858,36 @@ int parse_arguments(int *argc, const cha
+@@ -854,6 +860,36 @@ int parse_arguments(int *argc, const cha
                        basis_dir[basis_dir_cnt++] = (char *)arg;
                        break;
  
@@ -114,7 +114,7 @@ Do we need configure support for mktime()?
                default:
                        /* A large opt value means that set_refuse_options()
                         * turned this option off. */
-@@ -1341,6 +1377,15 @@ void server_options(char **args,int *arg
+@@ -1342,6 +1378,15 @@ void server_options(char **args,int *arg
                args[ac++] = arg;
        }
  
@@ -130,7 +130,7 @@ Do we need configure support for mktime()?
        if (backup_dir) {
                args[ac++] = "--backup-dir";
                args[ac++] = backup_dir;
---- orig/rsync.yo      2005-02-23 02:57:27
+--- orig/rsync.yo      2005-02-26 05:22:51
 +++ rsync.yo   2005-02-01 10:46:35
 @@ -378,6 +378,8 @@ to the detailed description below for a 
       --password-file=FILE    read password from FILE
@@ -141,7 +141,7 @@ Do we need configure support for mktime()?
       --write-batch=FILE      write a batched update to FILE
       --read-batch=FILE       read a batched update from FILE
       --checksum-seed=NUM     set block/file checksum seed (advanced)
-@@ -1169,6 +1171,19 @@ transfer was too fast, it will wait befo
+@@ -1225,6 +1227,19 @@ transfer was too fast, it will wait befo
  result is an average transfer rate equaling the specified limit. A value
  of zero specifies no limit.