Matt's --copy-devices patch.
[rsync/rsync-patches.git] / checksum-updating.diff
index 63911a7..ce7cd03 100644 (file)
@@ -372,7 +372,7 @@ To use this patch, run these commands for a successful build:
  int push_pathname(const char *dir, int len)
  {
        if (dir == pathname)
-@@ -973,34 +1280,24 @@ static struct file_struct *recv_file_ent
+@@ -980,34 +1287,24 @@ static struct file_struct *recv_file_ent
        return file;
  }
  
@@ -413,7 +413,7 @@ To use this patch, run these commands for a successful build:
        char *bp;
  
        if (strlcpy(thisname, fname, sizeof thisname) >= sizeof thisname) {
-@@ -1076,6 +1373,8 @@ struct file_struct *make_file(const char
+@@ -1086,6 +1383,8 @@ struct file_struct *make_file(const char
        if (is_excluded(thisname, S_ISDIR(st.st_mode) != 0, filter_level)) {
                if (ignore_perishable)
                        non_perishable_cnt++;
@@ -422,7 +422,7 @@ To use this patch, run these commands for a successful build:
                return NULL;
        }
  
-@@ -1114,9 +1413,16 @@ struct file_struct *make_file(const char
+@@ -1124,9 +1423,16 @@ struct file_struct *make_file(const char
                        memcpy(lastdir, thisname, len);
                        lastdir[len] = '\0';
                        lastdir_len = len;
@@ -440,7 +440,7 @@ To use this patch, run these commands for a successful build:
        basename_len = strlen(basename) + 1; /* count the '\0' */
  
  #ifdef SUPPORT_LINKS
-@@ -1192,11 +1498,44 @@ struct file_struct *make_file(const char
+@@ -1202,11 +1508,44 @@ struct file_struct *make_file(const char
        }
  #endif
  
@@ -488,7 +488,7 @@ To use this patch, run these commands for a successful build:
        /* This code is only used by the receiver when it is building
         * a list of files for a delete pass. */
        if (keep_dirlinks && linkname_len && flist) {
-@@ -1482,6 +1821,9 @@ static void send_directory(int f, struct
+@@ -1499,6 +1838,9 @@ static void send_directory(int f, struct
  
        closedir(d);
  
@@ -498,7 +498,7 @@ To use this patch, run these commands for a successful build:
        if (f >= 0 && recurse && !divert_dirs) {
                int i, end = flist->used - 1;
                /* send_if_directory() bumps flist->used, so use "end". */
-@@ -1925,7 +2267,11 @@ struct file_list *send_file_list(int f, 
+@@ -1942,7 +2284,11 @@ struct file_list *send_file_list(int f, 
                         * file-list to check if this is a 1-file xfer. */
                        send_extra_file_list(f, 1);
                }
@@ -511,7 +511,7 @@ To use this patch, run these commands for a successful build:
  
        return flist;
  }
-@@ -2218,7 +2564,7 @@ void flist_free(struct file_list *flist)
+@@ -2235,7 +2581,7 @@ void flist_free(struct file_list *flist)
  
        if (!flist->prev || !flist_cnt)
                pool_destroy(flist->file_pool);
@@ -522,7 +522,7 @@ To use this patch, run these commands for a successful build:
        if (flist->sorted && flist->sorted != flist->files)
 --- old/loadparm.c
 +++ new/loadparm.c
-@@ -149,6 +149,7 @@ typedef struct
+@@ -152,6 +152,7 @@ typedef struct
        int syslog_facility;
        int timeout;
  
@@ -530,7 +530,7 @@ To use this patch, run these commands for a successful build:
        BOOL fake_super;
        BOOL ignore_errors;
        BOOL ignore_nonreadable;
-@@ -197,6 +198,7 @@ static service sDefault =
+@@ -200,6 +201,7 @@ static service sDefault =
   /* syslog_facility; */               LOG_DAEMON,
   /* timeout; */                       0,
  
@@ -538,7 +538,7 @@ To use this patch, run these commands for a successful build:
   /* fake_super; */            False,
   /* ignore_errors; */         False,
   /* ignore_nonreadable; */    False,
-@@ -313,6 +315,7 @@ static struct parm_struct parm_table[] =
+@@ -316,6 +318,7 @@ static struct parm_struct parm_table[] =
   {"lock file",         P_STRING, P_LOCAL, &sDefault.lock_file,         NULL,0},
   {"log file",          P_STRING, P_LOCAL, &sDefault.log_file,          NULL,0},
   {"log format",        P_STRING, P_LOCAL, &sDefault.log_format,        NULL,0},
@@ -546,7 +546,7 @@ To use this patch, run these commands for a successful build:
   {"max connections",   P_INTEGER,P_LOCAL, &sDefault.max_connections,   NULL,0},
   {"max verbosity",     P_INTEGER,P_LOCAL, &sDefault.max_verbosity,     NULL,0},
   {"name",              P_STRING, P_LOCAL, &sDefault.name,              NULL,0},
-@@ -418,6 +421,7 @@ FN_LOCAL_BOOL(lp_fake_super, fake_super)
+@@ -421,6 +424,7 @@ FN_LOCAL_BOOL(lp_fake_super, fake_super)
  FN_LOCAL_BOOL(lp_ignore_errors, ignore_errors)
  FN_LOCAL_BOOL(lp_ignore_nonreadable, ignore_nonreadable)
  FN_LOCAL_BOOL(lp_list, list)
@@ -561,10 +561,10 @@ To use this patch, run these commands for a successful build:
  int ignore_non_existing = 0;
  int need_messages_from_generator = 0;
 +int checksum_updating = 0;
- int max_delete = -1;
+ int max_delete = INT_MIN;
  OFF_T max_size = 0;
  OFF_T min_size = 0;
-@@ -302,6 +303,7 @@ void usage(enum logcode F)
+@@ -303,6 +304,7 @@ void usage(enum logcode F)
    rprintf(F," -q, --quiet                 suppress non-error messages\n");
    rprintf(F,"     --no-motd               suppress daemon-mode MOTD (see manpage caveat)\n");
    rprintf(F," -c, --checksum              skip based on checksum, not mod-time & size\n");
@@ -572,7 +572,7 @@ To use this patch, run these commands for a successful build:
    rprintf(F," -a, --archive               archive mode; equals -rlptgoD (no -H,-A,-X)\n");
    rprintf(F,"     --no-OPTION             turn off an implied OPTION (e.g. --no-D)\n");
    rprintf(F," -r, --recursive             recurse into directories\n");
-@@ -542,6 +544,7 @@ static struct poptOption long_options[] 
+@@ -544,6 +546,7 @@ static struct poptOption long_options[] 
    {"checksum",        'c', POPT_ARG_VAL,    &always_checksum, 1, 0, 0 },
    {"no-checksum",      0,  POPT_ARG_VAL,    &always_checksum, 0, 0, 0 },
    {"no-c",             0,  POPT_ARG_VAL,    &always_checksum, 0, 0, 0 },
@@ -580,7 +580,7 @@ To use this patch, run these commands for a successful build:
    {"block-size",      'B', POPT_ARG_LONG,   &block_size, 0, 0, 0 },
    {"compare-dest",     0,  POPT_ARG_STRING, 0, OPT_COMPARE_DEST, 0, 0 },
    {"copy-dest",        0,  POPT_ARG_STRING, 0, OPT_COPY_DEST, 0, 0 },
-@@ -1899,7 +1902,9 @@ void server_options(char **args,int *arg
+@@ -1913,7 +1916,9 @@ void server_options(char **args,int *arg
                                args[ac++] = basis_dir[i];
                        }
                }
@@ -593,7 +593,7 @@ To use this patch, run these commands for a successful build:
                args[ac++] = "--append";
 --- old/rsync.h
 +++ new/rsync.h
-@@ -591,6 +591,7 @@ extern int xattrs_ndx;
+@@ -592,6 +592,7 @@ extern int xattrs_ndx;
  #define DEV_EXTRA_CNT 2
  #define DIRNODE_EXTRA_CNT 3
  #define SUM_EXTRA_CNT ((MAX_DIGEST_LEN + EXTRA_LEN - 1) / EXTRA_LEN)
@@ -601,7 +601,7 @@ To use this patch, run these commands for a successful build:
  
  #define REQ_EXTRA(f,ndx) ((union file_extras*)(f) - (ndx))
  #define OPT_EXTRA(f,bump) ((union file_extras*)(f) - file_extra_cnt - 1 - (bump))
-@@ -1076,6 +1077,12 @@ isDigit(const char *ptr)
+@@ -1077,6 +1078,12 @@ isDigit(const char *ptr)
  }
  
  static inline int
@@ -616,7 +616,7 @@ To use this patch, run these commands for a successful build:
        return isprint(*(unsigned char *)ptr);
 --- old/rsync.yo
 +++ new/rsync.yo
-@@ -307,6 +307,7 @@ to the detailed description below for a 
+@@ -322,6 +322,7 @@ to the detailed description below for a 
   -q, --quiet                 suppress non-error messages
       --no-motd               suppress daemon-mode MOTD (see caveat)
   -c, --checksum              skip based on checksum, not mod-time & size
@@ -624,7 +624,7 @@ To use this patch, run these commands for a successful build:
   -a, --archive               archive mode; equals -rlptgoD (no -H,-A,-X)
       --no-OPTION             turn off an implied OPTION (e.g. --no-D)
   -r, --recursive             recurse into directories
-@@ -502,9 +503,9 @@ uses a "quick check" that (by default) c
+@@ -518,9 +519,9 @@ uses a "quick check" that (by default) c
  of last modification match between the sender and receiver.  This option
  changes this to compare a 128-bit MD4 checksum for each file that has a
  matching size.  Generating the checksums means that both sides will expend
@@ -637,7 +637,7 @@ To use this patch, run these commands for a successful build:
  
  The sending side generates its checksums while it is doing the file-system
  scan that builds the list of the available files.  The receiver generates
-@@ -512,12 +513,42 @@ its checksums when it is scanning for ch
+@@ -528,12 +529,42 @@ its checksums when it is scanning for ch
  file that has the same size as the corresponding sender's file:  files with
  either a changed size or a changed checksum are selected for transfer.