Fixed failing hunks.
[rsync-patches.git] / early-checksum.diff
index a819d2f7676c56526141a3253105d8c95666e4f3..d910ab4e0ca387634e0af6fe958ea1b0414cdb04 100644 (file)
@@ -24,7 +24,7 @@ To use this patch, run these commands for a successful build:
  extern int module_id;
  extern int ignore_errors;
  extern int numeric_ids;
-@@ -723,6 +724,15 @@ static struct file_struct *recv_file_ent
+@@ -730,6 +731,15 @@ static struct file_struct *recv_file_ent
                        bp = tmp_sum;
                }
                read_buf(f, bp, checksum_len);
@@ -42,7 +42,7 @@ To use this patch, run these commands for a successful build:
        return file;
 --- old/generator.c
 +++ new/generator.c
-@@ -71,6 +71,7 @@ extern int ignore_timeout;
+@@ -70,6 +70,7 @@ extern int ignore_timeout;
  extern int protocol_version;
  extern int fuzzy_basis;
  extern int always_checksum;
@@ -50,7 +50,7 @@ To use this patch, run these commands for a successful build:
  extern int checksum_len;
  extern char *partial_dir;
  extern char *basis_dir[];
-@@ -507,7 +508,8 @@ void itemize(struct file_struct *file, i
+@@ -505,7 +506,8 @@ void itemize(struct file_struct *file, i
  
  
  /* Perform our quick-check heuristic for determining if a file is unchanged. */
@@ -58,9 +58,9 @@ To use this patch, run these commands for a successful build:
 +int unchanged_file(char *fn, int fnamecmp_type, struct file_struct *file,
 +                 STRUCT_STAT *st)
  {
-       if (st->st_size != file->length)
+       if (st->st_size != F_LENGTH(file))
                return 0;
-@@ -516,6 +518,8 @@ int unchanged_file(char *fn, struct file
+@@ -514,6 +516,8 @@ int unchanged_file(char *fn, struct file
           of the file time to determine whether to sync */
        if (always_checksum && S_ISREG(st->st_mode)) {
                char sum[MD4_SUM_LENGTH];
@@ -69,7 +69,7 @@ To use this patch, run these commands for a successful build:
                file_checksum(fn, sum, st->st_size);
                return memcmp(sum, F_SUM(file), checksum_len) == 0;
        }
-@@ -752,7 +756,7 @@ static int try_dests_reg(struct file_str
+@@ -750,7 +754,7 @@ static int try_dests_reg(struct file_str
                        match_level = 1;
                        /* FALL THROUGH */
                case 1:
@@ -78,7 +78,7 @@ To use this patch, run these commands for a successful build:
                                continue;
                        best_match = j;
                        match_level = 2;
-@@ -1420,7 +1424,7 @@ static void recv_generator(char *fname, 
+@@ -1418,7 +1422,7 @@ static void recv_generator(char *fname, 
                ;
        else if (fnamecmp_type == FNAMECMP_FUZZY)
                ;
@@ -89,7 +89,7 @@ To use this patch, run these commands for a successful build:
                        handle_partial_dir(partialptr, PDIR_DELETE);
 --- old/hlink.c
 +++ new/hlink.c
-@@ -235,7 +235,7 @@ int hard_link_check(struct file_struct *
+@@ -234,7 +234,7 @@ int hard_link_check(struct file_struct *
                                                }
                                                break;
                                        }
@@ -176,11 +176,11 @@ To use this patch, run these commands for a successful build:
  
 --- old/rsync.h
 +++ new/rsync.h
-@@ -61,6 +61,7 @@
- #define FLAG_SENT (1<<1)      /* sender/generator */
- #define FLAG_XFER_DIR (1<<2)  /* sender/receiver/generator */
- #define FLAG_MOUNT_DIR (1<<3) /* sender/generator */
-+#define FLAG_SUM_DIFFERS (1<<3)       /* receiver/generator (non-dirs) */
- #define FLAG_MISSING_DIR (1<<4)       /* generator (dirs only) */
- #define FLAG_HLINK_INFO (1<<5)        /* receiver/generator */
+@@ -66,6 +66,7 @@
  #define FLAG_HLINK_FIRST (1<<6)       /* receiver/generator */
+ #define FLAG_HLINK_LAST (1<<7)        /* receiver/generator */
+ #define FLAG_LENGTH64 (1<<8)  /* sender/receiver/generator */
++#define FLAG_SUM_DIFFERS (1<<9)       /* receiver/generator */
+ /* update this if you make incompatible changes */
+ #define PROTOCOL_VERSION 30